I just need something to calculate the raylength within an object (from the start of it's surface until it either hits the backside or another object).
BA_Color_Raylength should just do that, but unfortunately it seems to be broken. With an IOR of 1 it works correctly as expected, with an IOR of 1.33 e.g. it doesn't. Even an IOR of 1.01 darkens part of the surface completely.
Is there an alternative to that? Both in LW or Modo this is a piece of cake. I tried out all the settings in the shader, but without any success. Shouldn't be that difficult.
Any help is appreciated.
Cheers!
Raylength shader
-
rray
- Moderator
- Posts: 1810
- Joined: 26 Sep 2009, 13:51
- Location: Bonn, Germany
Re: Raylength shader
Hi! Give the "Tracer" shader (on rray.de) a try - it allows you to shoot a ray in any direction you'd like, and getting the resulting ray length or color.
You'll have to point it in the eye ray direction if you want to have the object's thickness (use a vector state node to get that)
You'll have to point it in the eye ray direction if you want to have the object's thickness (use a vector state node to get that)
softimage resources section updated Sep 26th 2026
-
Pancho
- Posts: 659
- Joined: 19 Sep 2010, 09:28
Re: Raylength shader
Mmh, doesn't look like stuff I'm looking for. I need something like a depth map but only inside of the object respecting the ior. The raylength shader does this correctly with an ior of 1.0, but not with the proper ior of water (1.33). Then the surface turns opaque.
-
Pancho
- Posts: 659
- Joined: 19 Sep 2010, 09:28
Re: Raylength shader
If this would be in ice, I'd cast a ray for each pixel with the raycast node, if the ray hits the specified object, i'd bend the ray according to the ior and then measure the length of this ray till it either hits the backside of the object or another mesh. This scalar value into a rescale node and there we are!
-
Pancho
- Posts: 659
- Joined: 19 Sep 2010, 09:28
Re: Raylength shader
After comparing the previews of the architecural shader and the BA-color_raylength shader I've found the error. It's in Holger's shader compound. It seems that somehow his compound inverts the IOR. For an IOR or 1.33 for water you need to insert 1 / 1.33, which is 0,752... something.
Would be nice if that could be fixed. The areas in my image which looked completely way off occured due to total internal reflection, even if it was on the outside of the object.
Cheers
Would be nice if that could be fixed. The areas in my image which looked completely way off occured due to total internal reflection, even if it was on the outside of the object.
Cheers
-
Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 22:38
- Location: St. Thomas, Ontario
Re: Raylength shader
You may want to contact Holger on his website and report the bug.
http://www.binaryalchemy.de/forum/index.php
http://www.binaryalchemy.de/forum/index.php
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif