[Sidefx-houdini-list] Rayhit returning wierd normal

Andy Nicholas andy at andynicholas.com
Fri Oct 10 18:59:29 EDT 2008


Hmmm, didn't manage to figure this out. It's a really odd one.

Just to explain what I'm trying to do. I need to do a "wet map". So I was
trying to put together a shader that could detect if its surface was
inside another object (the liquid) or not.

The way I was going to do this was to fire a ray in the direction of the
surface normal. If I don't hit anything, I shade the surface white. If I
hit something and it's normal faces towards me, then I also shade it white
(since I must be outside that surface). If I hit something and the normal
is facing away, then I must be inside the surface, so I need to shade it
black.

The idea is that I can then use "mantra -u" (or the render parameter
equivalent) to bake it into a texture to use as a wet map later.

Should be simple huh? The problem is that the RayHit VOP is returning me a
load of rubbish in the hit normal output, hence making this shader
impossible to write. Does anyone have any ideas how I can get this to
work, or what I'm doing wrong?

I have some possible workarounds using totally different methods, but I
really want to know why I can't make what seems like a trivially easy
shader.

Appreciate any help you can give,

Andy








> Hi,
> Just a quick question... has anyone had any issues with the VEX shader
> node "rayhit" returning utter rubbish in the output normal? I'm getting a
> whole load of moire like noise patterns being returned (I've made sure
> there's no intersecting geometry).
>
> Thanks
>
> Andy
>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>





More information about the Sidefx-houdini-list mailing list