[Sidefx-houdini-list] Rayhit returning wierd normal

Simon Barrick simon at primalpictures.com
Sat Oct 11 07:43:08 EDT 2008


I have shaders which do similar things and work fine, i have noticed though that you can get lots of misses if the geometry isn't triangles, but that's the only problems I've had.


-----Original Message-----
From: sidefx-houdini-list-bounces at sidefx.com on behalf of Andy Nicholas
Sent: Fri 10/10/2008 23:59
To: sidefx-houdini-list at sidefx.com; andy at andynicholas.com
Subject: Re: [Sidefx-houdini-list] Rayhit returning wierd normal
 
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


______________________________________________________________________
This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person.
This email has been scanned for Primal Pictures by the MessageLabs Email Security System.
______________________________________________________________________



More information about the Sidefx-houdini-list mailing list