Need help with sampleF()

Discussion related to the LuxRender Material system, programming API and Scene file format.

Moderators: jromang, tomb, zcott, coordinators

Re: Need help with sampleF()

Postby paco » Thu Nov 10, 2011 4:38 pm

I'm currently at work so don't have time to code it - but will do so when I get a chance and post the diff.

Basically I just hard coded the layeredmatial getBSDF (?createBSDF) method to return a multiBSDF which contained both a specular reflector and a lambertian.

Then I altered the getWeight function in the specularReflection BxDF - and you can see the brightness fluctuate significantly when they are rendered (bidir + MLT). I spent a while looking at it and the multiBSDF methods look fine to me - and are similar to what I do in the layered mat. I suspect it's a bidir issue- but got lost looking through that code!
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: Need help with sampleF()

Postby paco » Mon Nov 14, 2011 6:49 am

Sorry for the delay - i'm away for work and have limited access to my files.

Attached is the patch and a sample scene - you might need to fix up some of the paths and supply your own hdri.

Here's the original result :

layered_demo_017_spec.Scene.00012_orig.jpg


And here's what you get with a weight of 10.0f :

layered_demo_017_spec.Scene.00012_w10.jpg


As you can see there is considerable darkening of the diffuse component.
Attachments
lux_rev3358.patch
(2.16 KiB) Downloaded 37 times
test_scene.zip
(218.65 KiB) Downloaded 33 times
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: Need help with sampleF()

Postby jeanphi » Mon Nov 14, 2011 4:00 pm

Hi,

I might have spotted the issue.

Jeanphi
jeanphi
Developer
 
Posts: 7241
Joined: Mon Jan 14, 2008 7:21 am

Re: Need help with sampleF()

Postby paco » Wed Nov 16, 2011 4:10 pm

Just noticed an update to MultiBSDF in the repo - does this fix the problem?
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: Need help with sampleF()

Postby jeanphi » Thu Nov 17, 2011 4:08 am

Hi,

I've not yet had time to test it, but it could.

Jeanphi
jeanphi
Developer
 
Posts: 7241
Joined: Mon Jan 14, 2008 7:21 am

Re: Need help with sampleF()

Postby paco » Fri Dec 02, 2011 4:59 pm

Hi jeanphi,

any luck hunting down the bug?
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: Need help with sampleF()

Postby jeanphi » Sat Dec 03, 2011 11:45 am

Hi,

I haven't had time to test if the change fixed the issue, have you?

Jeanphi
jeanphi
Developer
 
Posts: 7241
Joined: Mon Jan 14, 2008 7:21 am

Re: Need help with sampleF()

Postby paco » Sat Dec 03, 2011 11:44 pm

Just tested it, same result :

next_go.jpg


My gut feeling is that it's a weighting issue in bidir somewhere - i'm guessing one of the sample calls doesn't account for the pdf that gets returned, but I could be (and am often) wrong.
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Previous

Return to Materials, API & Scene file format

Who is online

Users browsing this forum: No registered users and 0 guests