ZackMisso / TransmittanceEstimation

A set of example tests from my SIGGRAPH Asia 2019 publication: Integral formulations of volumetric transmittance
31 stars 4 forks source link

Issue when trying to render scattering media #2

Closed mmmovania closed 1 year ago

mmmovania commented 1 year ago

I am trying to make the bunny_cloud scene. I get the bunny rendered but its all coal black no matter what values i set for sigma_a and sigma_s. By right as shown in the pbrt cloud and smoke scene files, i should be able to set a value of sigma_a as 10,10,10 and sigma_s as 90,90,90 for a scattering heterogeneous medium appearing more white and if i swap the two values, it should be a more abosptive medium appearing more black. In this code, i get a black bunny partially rendered and then the code crashes. I tried all estimators and nothing seems to solve this. Here is the output I am getting with sigma_a (10,10,10) and sigma_s (90,90,90). image

If I use the default values of sigma_a (0.3,0.3,0.3) and sigma_s (0.8,0.8,0.8), I get this output image

If i set sigma_a (0.8,0.8,0.8) and sigma_s (0.3,0.3,0.3) I get this output image

There is no change in the two renders so it seems that there is either some setting that I am missing or some parameters are wrongly calculated. Do you have any idea of how to resolve this issue? I am looking to create a more scattering bunny rather than a more absorptive one.

ZackMisso commented 1 year ago

Hello!

I am currently in the middle of a SIGGRAPH deadline crunch so I can't exactly look into this until that is over, but I wanted to acknowledge that I see these issues and have some guesses as to what is wrong.

In regards to the first image, most of my renders were done using equal extinction-calls comparisons and I would forcefully quit renders after some max number of calls were reached. I am going to guess using insanely large values for sigma_t = sigma_s + sigma_a hit that threshold before a single pixel sample could be finished.

For the paper that this project was apart of we only had comparisons between transmittance estimators with no scattering to remove all other sources of noise for comparison sake, which means I either hard coded that there would be no scattering somewhere, or it is a feature of which free flight sampler is used. This explains the other two images, since for both of them sigma_t is the same.

My personal version of this codebase is a few years newer than what is here and I don't remember if this is a feature of this version or a more recent one, but check and see which ff_sampler is being used. ff_absorptive should force zero scattering and is what I think I used for all results in this paper. ff_delta implements delta tracking and should give you actual scattering results.

I'll relook at my code and come back to this thread once the SIGGRAPH deadline is over and offer more specific help.

ZackMisso commented 1 year ago

For the extinction call limit make sure maxExtCalls in the integrator is set to -1, this turns off the equal-extinction-call termination and just renders how many ever pixel samples you specify. If you are using pbrt's file format you need to probably hard code this, if you are using my programatic scene initialization, this is a parameter in ExperimentBase::initializeIntegrator()

mmmovania commented 1 year ago

Wonderful thanks for a prompt response. Yeah ff_sampler is set to absorptive. I will try with the delta tracking variant and share if the results are fine. Good luck for you SIGGRAPH submission.

mmmovania commented 1 year ago

Hey thanks it works fine. ratio