Page 1 of 1

What does the Henyay-Greenstein phase function do?

Posted: Sat Oct 06, 2007 6:06 pm
by hafunui
What does the Henyay-Greenstein phase function do?

Also, the manual for v0.9 has sss values and has 'g' parameters for r,g,b, but the blendigo exporter only has a uniform input. Does this mean rgb values dont work, or I just have to enter them in the igs file manually?

Posted: Sat Oct 06, 2007 6:15 pm
by Big Fan
ono hasnt made RGB 'g', as far as I know you should take an average of them for the single entry.

Posted: Sat Oct 06, 2007 6:55 pm
by WytRaven
I added the rgb values in by editing the igs after export. Indigo didn't complain.

Example:

Code: Select all

<phase_function>
  <henyey_greenstein>
    <g_spectrum>
      <rgb>
        <rgb>0.965 0.972 0.0</rgb>
        <gamma>1.0</gamma>
      </rgb>
    </g_spectrum>
  </henyey_greenstein>
</phase_function>

Posted: Sat Oct 06, 2007 7:47 pm
by Kram1032
@ BigFan (and SmartDen^^):
Indigo HAS those values.
I wondered myself, already.
How else could you make super realistic liquids? xD

Posted: Sat Oct 06, 2007 8:46 pm
by Big Fan
really when was that put in?
its not that way in the manual....

Posted: Sat Oct 06, 2007 11:36 pm
by Zom-B
Big Fan wrote:really when was that put in?
its not that way in the manual....
Check this link for a PDF with some values, and the whole thread for more infos.

Posted: Sun Oct 07, 2007 4:10 am
by Kram1032
oh, I didn't know, that it ever had NO RGB xD
I dunno, which release...

Posted: Sun Oct 07, 2007 6:02 am
by Big Fan
well... yeah.. I know there is data available for it - but until ono puts it in the manual I won't put it in the exporter (or rather my variant of it.)
presently there is no reference to entering 3 values for RGB components.
besides which the values can vary -1 to 1, not 0-1 so it is not RGB as per other RGB
I dont think you can just tack on RGB tags for it..
ono tells me before when I ask questions to read the manual ...and its not in there....
it has been my understanding the full solution is not implemented. :roll:

Posted: Sun Oct 07, 2007 9:23 am
by Anthony
Since when did blendigo not have rgb? My version does!? Beta 4

Posted: Sun Oct 07, 2007 9:40 am
by hafunui
Anthony wrote:Since when did blendigo not have rgb? My version does!? Beta 4
It does, but not for the Henyay-Greenstein 'g' value.

So I guess I could just use the average instead of rgb. But what does the henyay-greenstein function actually do?

Posted: Sun Oct 07, 2007 10:04 am
by Kram1032
It also has the g value but only uniformly...

It somehow changes the way, the light passes through...
I've NO idea, what it does exactly, but it makes some stuff look more real :)

And I can remember, Ono said something, that the clouds, he tried to simulate, have the wrong g-value or something.

I'll search in Wikipedia :)

Edit: here is, what I found, very quickly....
I guess, it has something to do with this spectrograph :)
http://en.wikipedia.org/wiki/Jesse_L._Greenstein
http://en.wikipedia.org/wiki/Louis_G._Henyey
http://en.wikipedia.org/wiki/Spectrograph

Posted: Sun Oct 07, 2007 10:07 am
by Anthony
I dunno. Maybe g stands for greenstein function or something. I think it makes the light weaken so it gets black in the middle or the back or something. Just do a test urself seeing as its only one thing 2 test

Posted: Sun Oct 07, 2007 10:13 am
by Kram1032
such a test already was done on a big chart....
but it was for uniform values (as it was a blender test, and blender never had rgb henyey greenstein...)

Posted: Sun Oct 07, 2007 10:22 am
by Big Fan
possibly it is a measure of diffraction in the scattering..
in a simple model the light is assumed to scatter 'uniformly' around in the 'material'.
and in a more complex model the light is diffracted as it scatters as well? :roll:
possibly a simple model is usually sufficient or perhaps it is more appropriate for some materials?... then again perhaps there is not a lot of 'g' data available? or it just adds more complexity for little effect than we really need for rendering purposes? dunno...
I guess ono needs to answer this whole question for us 8)

Posted: Sun Oct 07, 2007 6:36 pm
by OnoSendai
The Henyey-Greenstein phase function is a useful phase function for modelling assymetric (non-uniform) scattering, particularly forwards scattering.

The g parameter is called the assymetry parameter and determines the amount of forwards or back scattering. g=0.95 = mainly forwards, g = 0-.95 = mainly back. In fact g is the average cosine of the scattered direction with the incident direction.
The g parameter has nothing to do with the G (green) value in RGB colour, apart from sharing the same letter :)

Because g may vary with wavelength, the XML accepts a spectrum element when defining g.