Great video, thanks a ton, had a project in my company that needs to do some volume rendering of some CT scan data in Unity. Working on it right now , might take a month for me, but your video is the foundational for me
Writing on 19:14 so it may be discussed later - another way would be to extend last approach be subdividing plane into multiple triangles and discarding their rendering at compute stage (or mesh shader) if some triangle is outside data volume. This will result in an approximation of clipped plane and minimal overhead in fragment invocations (especially if tessellation can be used.
ngl, I'd either, just draw the box, use the normal of the visible faces to orient the data, and just go through the data in rays, where you exit on first "solid" voxel. or as a second approach I'd do the same with a screen space shader, if there's multiple volumes.
I see rasterization more related to triangles cause their flat nature as I see ray tracing more related to volumetric geometries using implicit equations or even explicit voxel grids, octrees partitioning, etc... What do you think?
Is it uncommon to have volumetric data where the samples have more than one dimension? What does the transfer function usually look like in those cases?
And yessss finally a nice of 3d textures that is not just hosting texture for instances… problem is how can i have a cohrent blur in a 3d texture…. Find a solution find a problem!!! ❤
19:00 I think we can render the cube first, then render these slices with some depth tests(greater than), which will discard those fragments in front of the cube plane. Is that doable?
What I don't really get is how to apply local illumination to a volume that is rendered using a CT-Volume and a transfer function. E.g. the tooth shown in 24:17 has some shiny reflection at the root canal. So there must be a light source that interacts with the surface. But how can this be done without normals? We just have voxels, don't we?
I may not be able to answer your question completely, but you can calculate normals from density samples. It is very easy. You take 6 samples in a cross pattern and subtract each pair. Search for "gradient normals".
@@DasAntiNaziBroetchen danke, ja wahrscheinlich würde man die Zentraldifferenz verwenden. Ich weiß nicht wie sinnvoll Sobel wäre, denn der glättet ja vorher.
Depends; if any of the pixels in the quad's lane still go through then it will still have to wait for that quad to finish. So you'd only gain perf if the entire quad is masked out. Though you're saving some perf by not having as much data divergence
@@nielsbishere Correct, but when drawing one big polygon, most of the time if a pixel is completely transparent, the other 3 of the quad is also transparent. So it's better to draw smaller polygons where data is expected. Or when one detects a pixel is out of bounds, to discard it without reading a texture.
@@DiThi you mean like cut out alpha masked stuff in the big lines and then cut off the rest in the pixel shader right? Because making polygons too small will waste helper lanes too
@@nielsbishere Yeah there's a balance between wasted transparent polygon drawing and too small polygons. The specifics depend on the hardware, but in most cases just clipping the polygon to the bounding box of what it's going to be drawn is generally enough. For some architectures it's worth to add many more polygons. For example for the classic iPhone and Samsung Galaxies of a decade ago, the PowerVR architecture was way faster drawing alpha blended polygons if we made two separate meshes: the inside part as opaque and the border around it as alpha blended. The tiled architecture was way faster drawing many polygons (and only a small fraction of pixels on screen alpha blended) than drawing one plane per image all alpha blended. Like, orders of magnitude faster!
It's probably for kids, very basic introduction and totally useless for practical volume rendering skill useful to render volumetric data like CT MRI etc...this dude apparently is clueless about this...