[Sidefx-houdini-list] Rayhit returning wierd normal
andy at andynicholas.com
Sun Oct 12 10:36:32 EDT 2008
Thanks for that, the gather() loop worked a treat. With that, I can get
back anything I like from the ray which is awesome - I've not used it
before. More importantly, it actually returns the correct normal from the
intersected surface, so this means I can get my wetmap shader to work
without having to resort to something like an occlusion shader.
You might be interested to know that the rayhittest() function gave me
similar (crappy) results to using the rayhit VEX node. There's obviously
an issue there somewhere which I hope can be fixed soon. It seems like a
pretty fundamental bug for what I would regard to be one of the most
useful VEX shader nodes.
Anyway, thanks again!
> 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
> sample the N and do whatever you need, and for the rays that fails assign
> white color for example, as a workaround to the rayhittest could work.
> That makes sense?
> 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
>> 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
>> (since I must be outside that surface). If I hit something and the
>> is facing away, then I must be inside the surface, so I need to shade it
>> 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
>> 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
>> Appreciate any help you can give,
>> > 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
> Un saludo
> Best Regards
> Pablo Giménez
More information about the Sidefx-houdini-list