terier / vpt

VPT: The Volumetric Path Tracing Framework
GNU General Public License v3.0
32 stars 31 forks source link

Add diffuse gradient and specular reflection to multi-scattering? #3

Closed engineer1109 closed 2 years ago

engineer1109 commented 3 years ago

I found that multi-scattering is not with gradients. (EM also) If an object is all the same pixel value, it will be rendered with same color.

engineer1109 commented 3 years ago

It should be called BRDF or BRSF?

CirilBohak commented 3 years ago

Both Multiple scattering and EAM do support gradients. You can see this in the function sampleVolumeColor, where rg is sampled. r - value, g - gradient. You do need appropriate data. The gradients are not calculated on the fly, they must be bundled with the data ... this is where the BVP format we are using comes in handy.

Specular reflections? This is volumetric path tracing, and reflections are there and are the results of the process itself.

We do not have any support for BRDF or BSDF (I guess you mistyped BRSF), since we are not doing surface rendering. There is an anisotropic phase function used in the rendering.

engineer1109 commented 3 years ago

@CirilBohak image

See https://github.com/engineer1109/VolumeRenderPhotos/blob/main/photos Volume Renders can also have reflections. BRDF is also supported for volume render.

CirilBohak commented 3 years ago

Of course, you can have specular reflections in case you present.

However, as I said VPT only supports isotropic phase functions and not BRDFS. When one uses BRDFs one needs to assume there are surfaces in the volume. We do not assume this. You can check also the work of Kroes et al. Exposure render: an interactive photo-realistic volume rendering framework.

We do plan to add such support at some point in the future as well as support for non-uniform per-voxel defined extinction values which would also enable some great effects.

engineer1109 commented 3 years ago

@CirilBohak The exposure render. I have migrated it into Linux. https://github.com/engineer1109/exposure-render-for-Linux.git I am trying to migrate to GLSL.

CirilBohak commented 3 years ago

That's great. Good work. I will check it out in more detail.

It would be interesting to see its implementation in Vulkan and/or WebGPU :)

CirilBohak commented 3 years ago

@engineer1109: I have also seen, you are learning Vulkan. You might check our lightweight Vulkan framework Logi, which makes a lot of things easier (e.g., GPU memory manager via Vulkan Memory Allocator, Object-oriented approach, and automatic managing of object hierarchy memory allocation/dealocation.