Для одной 2D картинки обычно используется трилинейная фильтрация 4 соседних пикселя * 2, с соседнего мипмапа (8 texel fetch). В этом случае нужно блендить между собой 4 соседних пикселя внутри текущего кубмапа * 2 (соседний мипмап кубмапа) * 4 соседних кубмапа * 2 (столько же соседнего каскада). Получается 4 * 2 * 4 * 2 = 8 * 8 = 256 тексельфетчей. Вроде и много, с другой стороны, всего в 8 раз больше обычной трилинейной картинки. Прикольно, надо брать)
нет, оно не так работает. каждый каскад -- это одна выборка в четырёхмерном пространстве. четырёхмерное -- потому что 2д выборка по пространству и 2д по направлению. в самой наивной реализации с четырёхлинейной интерполяцией (это как билинейная-трилинейная-четырёхлиненая) это 2^4=16 выборок на каскад. мипы с этой техникой использовать смысла нет, потому что максимально эффективно память используется на фиксированном отдалении камеры, поэтому запекается один соответствующий этому направлению мип. однако, в пространствах высокой размерности есть гораздо более эффективные методы интерполяции -- вместо 2^N мультилинейной интерполяции, можно использовать симплекс-интерполяцию, для которой нужно N+1 выборок. это становится особенно полезно для интерполяции в многомерных пространствах N>5.
@@Alexander_Sannikov 🤔 Ага, слегка понял, на если уж докапываться - то уже у шейдертое) Кстати, ведь из-за больших пустых областей можно хорошо сжать текстуру, сделав её размер пропорциональным не объему, а приблизить к количеству вокселей вблизи поверхности, что пропорционально площади поверхностей запекаемой сцены. Ещё любопытно, что каскады - это и GI probes, и как reflection cubemap-ы в одном) Интересно, а для достижения шероховатости можно ли обойтись без мультисемплинга или шума? 🤔 Я как-то носился с мыслью о GI, только думал запекать в сферические гармоники (через Фурье). Потом подумал, что это сложно и передумал) Короче, спасибо за видео, познавательно)
@@StanislavMarchevsky в идеале да, объём информации должен скейлиться пропорционально площади, а не объёму. в PoE2 каскады используются для SSAO, SSGI и для screenspace reflections. glossy reflections приближённо реализуются семплингом из низких каскадов (у которых угловое разрешение ниже, чем у высоких). диффузный GI собирается из нулевого каскада (с самым низким угловым разрешением) в SH1 сферические гармоники.
Блин, эти шейдер-боллы смотрятся максимально красиво. Какое уравнение освещения используете, не подскажете? Особенно красивые хромированный голубой и медный.
самый убогий в мире GGX IBL, реализован максимально совместимым с "Real Shading in Unreal Engine 4". разве что фейковый specular occlusion (на основе ambient occlusion) добавлен.
@@Alexander_Sannikov да ладно вам скромничать, 99% комментирующих ваши видео (включая меня), не смогут даже этого реализовать. Возможно, у меня просто фетиш на зеркальные поверхности, но глазу приятно.
Самое интересное, что техника изобретена еще в 2008 году, как вы сами указываете. То есть множество подобных оптимизаций могли быть реализованы ещё тогда, и, таким образом, можно было бы, например, побороть вечную проблему рендеринга больших массивов травы в играх. Я в курсе вашего решения через предрасчитанный raymarching, но, как я понял, сделать сложные шейдеры вроде расходящихся в разные стороны травинок, будет сложно, если не невозможно.
никак эта техника не масштабируется. она в light space, а не screenspace. ещё у неё нет никаких вторичных теней. это был мой первый опыт реализации одной и самых базовых техник.
@Alexander_Sannikov, Hello sir this is very mind blowing to me. Is there any way you have a tutorial on how the equations and bi-directional reflective distribution works? I've been tinkering with PBR which I assume is very antiquated now? I'm utterly fascinated and I use OpenGL C++ for my particle demos and side projects.
This demo uses the standard GGX BRDF and a full PBR pipeline. The difference compared to conventional renderers is that instead of calculating it for every pixel every frame, it pre-calculates it into radiance cascades and then just reads the results every frame.
Hi, great work! How do you render the parabolic cube maps and what pixel resolution do you start with? Looks already very high at the lowest level and you render all cube maps in realtime?
@@ChristianKahler maps are path traced offline. the total resolution of all cascades combined into a single image was something like 4k x 4k lowest cascade probe resolution is something like 4x4
@@ChristianKahler this demo demonstrates the fact that the data inside of RC is completely decoupled from the way you acquire it. Path tracing this takes minutes, but once it's baked into RC, I can render it in realtime in one millisecond. PoE2 uses screenspace raymarching to fill the data in cascades, so it's much faster to get the data. But the way the data is stored is mostly the same.
I'm just blown away by how FLAMEY this looks!! 😍 from a VFX perspective I'd see the flames form from sprite sheets and flipbooks but these seem to form by the space BETWEEN the particles! Super interesting!!! :O
What I gather: We're "storing" in some way how the 3d model looks like if viewed through a plane from any angle, without keeping the 3d model. The most obvious way to do that is to store for each pixel of the plane what the pixel would look like if viewed from every angle. We could store, say, 200 different angles, which would mean that we have to store for _every_ pixel 200 different colors. Then, when rendering, we could check what angle we're looking at a pixel, then linarly interpolate between the colors associated with similar angles. What this paper shows is that this is not necessary, and we can make the image still look decent while storing much less information. The key idea is that while we want to store a _few_ angles for _every_ pixel, we only need a _few_ pixels that store a _lot_ of angles. So for example, we could store 4 angles for _every_ pixel - then have a separate map that stores 8 angles for every 16th pixel - then another map that stores 16 angles but only every 36 pixels, and so on. By cleverly interpolating this information, we get a really life-like image, while only storing a fraction of the information (and, conversely, while only having to _calculate_ a fraction of the information, if running in real time).
the really important part is that the tradeoff of spatial:angular density is only possible for a given distance range. that's why RC stores radiance intervals, because they capture light coming from a certain distance range.
Александр, недавно ютуб начал рекомендовать ваши видео, а затем подкаст с вами в роли гостя и видео с экзайл кон'а. Очень вдохновляет! Интересно ваше мнение, может ли быть эта новая технология с каскадами полезна для рассчета поведения жидких и газообразных сред? Или если заглянуть еще глубже - для приблизительного, но быстрого рассчета каустик?
У нас на сервере есть деятель, который использует RC для спектрального расчёта плазмы. Если цель -- считать каустики, то это можно сделать гораздо проще (и эффективнее).
This, without denoiser, is absolutely perfect for particle fx, gunfire, explosions etc. where things happen fast or you dont notice details so much. Fantastic work, as always!
Your mention of the accuracy of penumbras makes me wonder if this same technique could be modified in the calculation of radiation dose calculation in radiation therapy. Basically we do a bunch of complex ray tracing or kernel convolutions to perform dose calculations in radiation therapy and calculate the interactions based on a fluence maps from particular angles. For us however reflectivity isn't so important. Mostly we just have attenuation (simple calculation), and a couple different types of scattering interactions (much more complex requiring monte carlo interactions). However, our accuracy in dose calculation tends to decrease at the edge of beams (at the penumbra) as the calculation becomes most difficult there with scattering interactions beginning to dominate over the attenuation interactions.
@@skicreature people are already applying RC to a bunch of non-light radiative transfer processes. any process where energy is propagated in rays is suitable.
Гениальный фильм, гениальная музыка. Что больше всего меня удивляет - как мог Данелия вовлечь во всё это таких актеров и сделать такой фильм. Ну и музыка - нет слов.
Interesting effect, somewhat like glitter immersed in plastic. How much memory does this demo use? Seems too resource intensive for complex real-time scenes.
Hey, iirc u doing it in Unreal Engine? Is it possible you gonna do guides on how one can reproduce this technique? also interested if it is possible to use in Godot engine so far? note that im noob in gamedev and don't know if my questions are lame, thanks!
Saw this video on my homepage recommendations, no relation to Half-life at all (haven't looked at source/half-life content in forever). To be honest I have no clue what this even means, but I'm very intrigued and I often enjoy watching people passionately explain something that to me is very niche. Thank you for sharing!