Code Monkey home page Code Monkey logo

Comments (6)

mmp avatar mmp commented on June 30, 2024 1

The issue here is that the RGB values for sigma_a/sigma_s end up being represented using RGBSpectrum, which multiplies the value it returns by color space's illuminant. What we want here is RGBReflectanceSpectrum, which doesn't do that.

But, RGBReflectanceSpectrum only handles values in [0,1] (i.e., reflectances). Plus, it's clearly misnamed then.

So the proper fix will probably be to rename RGBReflectanceSpectrum to RGBSpectrum and fix it to handle values outside of [0,1], rename the old RGBSpectrum to RGBIlluminantSpectrum, and to patch everything up accordingly. This should be straightforward; I'll try to get to it soon.

from pbrt-v4.

shadeops avatar shadeops commented on June 30, 2024

I don't think this has to do with the conversion, for example rendering a cloudy torus with rgb values gives an interesting faint blue grid structure.

cloud

This looks similar to what surrounds the bunny, you can see some of the structure in the ears especially.

cloud.zip
Rendered with https://github.com/mmp/pbrt-v4/tree/ca0db69 on the cpu.

from pbrt-v4.

mmp avatar mmp commented on June 30, 2024

(Sorry I haven't had a chance to look into this yet, but yes, it doesn't look right..)

Possibly related, via @anderslanglands: the attached scene is a big white diffuse quad, lit by a white light. If the reflectance is 0.999, the average RGB channel values are all just under one, as would be expected

B: min      0.98291 max      1.01758 avg     0.999213 (0 infinite, 0 not-a-number)
G: min     0.994629 max      1.00098 avg     0.999048 (0 infinite, 0 not-a-number)
R: min     0.992676 max      1.00586 avg     0.998826 (0 infinite, 0 not-a-number)

If the diffuse reflectance is 1, then things go blue-ish:

B: min      0.98584 max      1.02051 avg        1.002 (0 infinite, 0 not-a-number)
G: min     0.975098 max     0.981445 avg     0.979393 (0 infinite, 0 not-a-number)
R: min     0.958984 max     0.971191 avg     0.964616 (0 infinite, 0 not-a-number)

x.pbrt.txt

from pbrt-v4.

shadeops avatar shadeops commented on June 30, 2024

This is looking good when rendered with https://github.com/mmp/pbrt-v4/tree/0e4b5ae

cloud

Edit for clarity
This is a render of the above torus scene, but with a sigma_a, sigma_s of (0.999, 0.999, 0.999) to test the majorant grid artifacts fixes.

Thanks Matt!

from pbrt-v4.

mmp avatar mmp commented on June 30, 2024

(Are you sure that one was rendered with RGB? I was still seeing a slight blue tinge with that cloudy doughnut scene that is now fixed(*) with e6b4d90. Here is ToT now:

image

(*) RGB of exactly 1,1,1 still comes out blue-ish; I need to chase that down but think I will file that as a separate bug. The attachment is rendered with 0.99 0.99 0.99. I've also confirmed that bunny-cloud comes out correctly with those RGB values.

Thanks for reporting this!

from pbrt-v4.

shadeops avatar shadeops commented on June 30, 2024

Opps sorry Matt, that was my bad I should have been more clear in what I was testing. My render in #28 (comment) was with a sigma_[as] of 0.999 as I was just testing the fix for majorant grid artifacts.

Thanks for making the Issue #54

from pbrt-v4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.