PDA

View Full Version : mental ray and texture coordinates


-Vormav-
06-24-2005, 09:42 PM
I'm not sure if this can even be done or not (I'm tending to think not - at least, not conveniently), but I'm curious to see if there's a way to determine if a coordinate of an object that a shader is using is within the volume of another object - like what you'd get with some points if you had a sphere interpenetrating a box, for example.
If I understand raytracing correctly, then you could get this by shooting a ray out from the coordinate in the opposite direction of the normals at that point, and then see if it hits another face of the object with its normals in the other direction. Is something like that possible (incase you couldn't tell, I'm new to a lot of this...)?

Also, I'm curious about another thing. It seems easy enough to setup a shader through Maya and Mental Ray such that the user can add lights from the scene to a light list array, and then the shader will access information from all of those lights. Is it possible to do the same for geometric objects in the scene? For a more specific example of what I'm talking about, let's say you're examining the coordinates of the object that your shader has been applied to, and you want to compare those coordinates directly with the coordinates of objects in your shader list. Can that be done through Mental Ray, and if so what would the syntax be like? I dug through the public shader source files, but I can't find any examples where they've done anything like this.

CGTalk Moderation
06-24-2005, 09:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.