11

Overview The appearance of volumes (also called participating media) in nature is caused by tiny particles, such as dust, water droplets or plankton, that are suspended in the surrounding fluid, such as air or water. These particles are solid objects, and light refracts or reflects off of these objects as it would on a normal surface. In theory, ...


6

There’s an interesting technique that’s been used in demoscene and Shadertoy projects for a while, and an analogue of which recently made it into Unreal Engine 4: using signed-distance fields and raymarching to produce high-quality soft shadows with accurate penumbras. There’s a good writeup of the idea, with some visual examples, by Íñigo Quílez here—I’m ...


6

When I was first reading about all of this I stumbled upon this link which helped me better understand this large subject. Also this goes into some more detail on things mentioned here. Light scattering is a natural phenomenon which arises when light interacts with particles distributed in a media as it travels through it. From Wikipedia: Light scattering ...


6

Volume rendering is not like ray-tracing, it is like "scene rendering". i.e. there exists several algorithms to render volumes. One close to ray-tracing is ray-marching, and has may variants. The simplest: for every pixel in the screen plane, trace a ray starting from the eye point to the screen pixel location, and advance along the ray by constant steps. ...


4

Ray marching is a ray tracing method where you take multiple steps along a ray to find intersection with geometry or to perform integration of in-scattered light from participating media (fog, clouds, water, etc.) along the ray. Signed distance fields doesn't really help you with participating media rendering since it's a method of finding the ray ...


4

One way to do it - which isn't exactly the "go to" solution, but can work nicely, is to find the distance that the ray traveled through the volume and use integration of some density function to calculate how much "stuff" was hit. Here is a link with an example implementation: http://blog.demofox.org/2014/06/22/analytic-fog-density/


3

Depends on the volume efffect. Uniform volume effects that do not belong do scattering can be simulated by just calculating ray enter and ray exit distances. Otherwise you need to do integration of the ray path, also known as ray marching. To avoid needing to shoot secondary rays the raymarching is often coupled with some sort of cache, like depthmap, ...


2

In techniques I've seen that use a frustum-aligned voxel grid (so-called "froxels"), it looks like option 2 in your diagram. The voxels are cuboids in post-projective screen space, so when transformed back to world space they look like mini-frusta, automatically expanding as they get farther from the camera. Marching along eye rays is then very easy: you ...


2

Ok after searching a whole lot on the internet I found a slide which answered most of my questions and doubts. I'm dumping it here in-case anybody else is curious what these datasets usually contain and what should be (in my opinion) the correct way to handle mappings. So apparently the CT scanner always records the densities of the substances in Hounsfield ...


2

Your equation for the absorption-only model is correct: You multiply the luminance $L_x$ at the surface by the transmittance of the participating media between eye and the surface. For homogeneous media you can calculate this analytically using Beer-Lambert law: $$L_y=L_xe^{-\mu|x-y|}$$ For heterogeneous medium you can calculate the transmittance by ray ...


1

This is called "deep shadow mapping" and deep compositing. Sadly invented long before you had this ideas yourself); Now you are talking about implementing this idea specifically on a given architecture (GPU). It's up to you to make it work for this given architecture, and if you have technical difficulties with that maybe you can ask a question on this ...


1

It seems you want to work with values between 0-255. For uint16 datasets, you can put it inside 0-255 range like this: $newValue = 255 * \frac{oldValue}{(2^{16} - 1)}$ where $oldValue$ is an uint16 value and $2^{16} - 1$ is the uint16 max number. For the float ones without any previous knowledge about its range, you could read all the values from the ...


1

After some research i think i have final answer. General fog equation looks something like this: $$ L(t)=L_p\color{red}{T(t)} + \int_0^t\color{blue}{T(x)}\color{green}{\sigma(x)L(x)}dx $$ Transmittance defined as: $$T(x)=e^{-\int_0^x\sigma(x) dx}$$ With const $\sigma$ become $$T(x)=e^{-\sigma x}$$ So color that will be visible is: Visible percent $\color{...


1

Temporal by definition will ghost. I’d limit past frame sampling, apply weight < 0.5, limit movement etc.


1

As a rule, SDFs do much better under interpolation than regular images do—it’s why you can mostly get away with using tiny textures for e.g. font data. You should be fine interpolating neighboring voxels.


1

You can use CGAL's half_space_intersection_3 or half_space_intersection_with_construction_3 functions, where the half-spaces are defined by the faces of the cuboids.


1

You can look into alias-free volumetric sampling algorithm by Huw Bowles for potential solution to the ray marching aliasing issues. The basic idea is to snap your samples to planes based on the ray direction that's best explained with this Shadertoy demo.


Only top voted, non community-wiki answers of a minimum length are eligible