[Sidefx-houdini-list] Rayhit returning wierd normal

Pablo Giménez pablogipi at gmail.com
Sat Oct 11 07:16:49 EDT 2008


I haven´t been using the rayhit stuff for some time, but sometimes the VOP
nodes not use all the features of a VEX command, or it use it in different
ways, so my advice for the moment is to use an inline VOP to hardcode the
rayhit command and see what happens.
Also you can use a gather() loop in the shader and for the the rays that hit
sample the N and do whatever you need, and for the rays that fails assign a
white color for example, as a workaround to the rayhittest could work.
That makes sense?
cheers

2008/10/10 Andy Nicholas <andy at andynicholas.com>

> 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
> >
>
>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



-- 
Un saludo
Best Regards
Pablo Giménez



More information about the Sidefx-houdini-list mailing list