Page 1 of 2

The pink elefant

Posted: Sun Dec 31, 2017 10:44 am
by Dade
Spectral rendering done in LuxCore :o
spectral1.jpg
(who is used to old LuxRender renderings can easily spot the rainbow-ish white on early stage of the rendering)
spectral2.jpg
This is just the result of a test (direct light only) to check if the general idea can work. I think it is worth some further investigation. It would be the perfect solution:

- it is optional (no cost for normal RGB rendering);
- it does require very little code changes;
- it works on GPUs;
- it works with path, bidir and everything else.

P.S. The pink elephant is a quote from: http://www.luxrender.net/forum/viewtopi ... =8&t=12454

Re: The pink elefant

Posted: Sun Dec 31, 2017 1:27 pm
by Sharlybg
- it is optional (no cost for normal RGB rendering);
- it does require very little code changes;
- it works on GPUs;
- it works with path, bidir and everything else.
Wow incredible move ! thanks you so much for sharing such juicy news with us. can't wait to see more screenshots with this (indirect light/ glass render). But take your time. with such great features it's worth to be patient. :D .

the pink elephant is going to be a small white mouse in your labs :lol:

Re: The pink elefant

Posted: Sun Dec 31, 2017 3:15 pm
by Piita
Ah, spectral, old friend. I missed you. You do require a lot of render time in order to look good but when you are done you sure are gorgeous :)
Awesome work, Dade!

Re: The pink elefant

Posted: Sun Dec 31, 2017 6:25 pm
by neo2068
:o wow, great news. Looking forward for next year development. 😊

Re: The pink elefant

Posted: Mon Jan 01, 2018 10:57 am
by Dade
Normal rendering (BIDIRCPU):
spectral2.png
Spectral rendering (BIDIRCPU):
spectral1.png
:lol: :lol: :lol:

P.S. at the moment, I'm not even sure if it is theoretically correct, for sure, it is damn good at faking it.

Re: The pink elefant

Posted: Mon Jan 01, 2018 12:08 pm
by Dade
psor.png

Re: The pink elefant

Posted: Mon Jan 01, 2018 11:01 pm
by Sharlybg

P.S. at the moment, I'm not even sure if it is theoretically correct, for sure, it is damn good at faking it.
:shock: :shock: wow it is very very beautifull and very real. And i also think it is a very well integrated code. I ve never seen this before with a renderer ( the possible to activate and desactivate spectral rendering on the fly). Bravo .

Re: The pink elefant

Posted: Tue Jan 02, 2018 11:30 am
by Dade
Added the support glass dispersion on GPUs:
dispgpu.png
I have merged the experimental branch with the main one.

Glass dispersion can be enabled using the ".dispersion" flag in Glass material definition. Volumes/Glass IORs can now accept 3 values instead of 1 (red IOR, green IOR, blue IOR). For instance:

Code: Select all

scene.materials.Cubo_Prism_01_MAT.type = glass
scene.materials.Cubo_Prism_01_MAT.kr = 1. 1. 1.
scene.materials.Cubo_Prism_01_MAT.kt = 0.8 0.8 0.8
scene.materials.Cubo_Prism_01_MAT.ioroutside = 1.0 1.0 1.0
scene.materials.Cubo_Prism_01_MAT.iorinside = 1.28 1.4 1.52
scene.materials.Cubo_Prism_01_MAT.dispersion = 1
P.S. you can still use a single value for IORs (but indeed there will be not dispersion).

Re: The pink elefant

Posted: Tue Jan 02, 2018 3:50 pm
by B.Y.O.B.
This is pretty cool.
It's not even much slower than without dispersion, both attached images were rendered for 16 minutes.
Dade wrote:
Tue Jan 02, 2018 11:30 am
Volumes/Glass IORs can now accept 3 values instead of 1 (red IOR, green IOR, blue IOR).
How should we expose this in exporters?
Should we allow the user to set 3 separate values?
Or would it be better to have only one IOR-value in the UI and have a "Dispersion Strength"-slider which specifies the diverting IORs?

For example:
IOR: 1.5
Dispersion Strength: 0.02
-> exported as iorinside = 1.48 1.5 1.52

By the way, I'm getting a crash when using Tiled Path + dispersion when I stop the render.

Re: The pink elefant

Posted: Tue Jan 02, 2018 5:08 pm
by Dade
B.Y.O.B. wrote:
Tue Jan 02, 2018 3:50 pm
How should we expose this in exporters?
Should we allow the user to set 3 separate values?
Or would it be better to have only one IOR-value in the UI and have a "Dispersion Strength"-slider which specifies the diverting IORs?

For example:
IOR: 1.5
Dispersion Strength: 0.02
-> exported as iorinside = 1.48 1.5 1.52
The "strength" solution sounds a lot easier to use (and more artist oriented).

I could potentially add, in the future, the support for tabulated texture in order to potentially have a different IOR for each visible wave length (at the moment, the IOR is just interpolated between the 3 RGB wave lengths). But it is frankly the kind of feature that 99.999999999% of Blender users are never going to use.
B.Y.O.B. wrote:
Tue Jan 02, 2018 3:50 pm
By the way, I'm getting a crash when using Tiled Path + dispersion when I stop the render.
Uh, I never tried with TILEPATH, strange, going to check ... it doesn't seems to happen here (it may be a different problem, not related to dispersion), can you post how reproduce the problem.