View Full Version : GI - closestPointOnSurface
johnnyMac 01-19-2003, 06:15 PM perhaps you are familar with this tutorial http://www.highend3d.com/maya/tutorials/gi/ if you are then HELP ME OUT!!!!!
if you see the network diagram about half way down the page and it makes sense to you then you're the person i'm talking to. it's not all entirely greek but there seems to be some latin mixed in there and i'm not fluent in either. if someone can help me make sense of this or has done this tutorial and made it work i'd appreciate your input.
i've got pizza in the oven. i'll check back later. thanks for the help... whomever.
|
|
mark_wilkins
01-19-2003, 06:42 PM
Hey!
OK, so here's the idea:
All those directional lights are illuminating your scene. What the author wants is for the lights to take on the color of the nearest point on his multicolored, textured surface.
I think his script makes one of those networks of nodes for each light.
What that network of nodes does is calculate (using the closest point on surface node) what U and V coordinates on the textured surface are closest to a given light. This gets fed into a 2D texture placement node that looks up the color, and then that color is plugged into the color of the light.
So, if the nearest point on that surface is textured red, the light will be red, and so on.
Make sense?
-- Mark
johnnyMac
01-20-2003, 12:10 AM
thanks for the reply.
the idea makes perfect sense to me but it's the execution that is the problem. i guess i'm looking for more insight into how to set it up myself or maybe how to better understand the closestPointOnSurface command. i can worry about automating the command later. thanks.
mark_wilkins
01-20-2003, 01:58 AM
I see...
The closestPointOnSurface *command* works by making a closestPointOnSurface *node* and then, often, throwing it away. If you use a particular flag (I think it's -ch on) then the command will not just return the value, but it will leave the node it created lying around. Then, the rest of the script can hook it up so that it sits there constantly calculating the closest point on the surface for whatever the input attributes happen to be. This turns out to be much faster than using the command over and over again because using the command makes and destroys a node every time it's run.
At least I believe that's a reasonable explanation what's going on internally, I'm not 1000% sure. However, I do know that if you use the -ch on flag with that command you'll get a node that you can hook up into your scene that does nothing but calculate the closest point on the designated surface for the input location in space.
-- Mark
Aken009
01-20-2003, 05:37 AM
Rhonda's Top Ten Hints (http://www.rhonda.com/Maya_TopTen_08.html)
hey dude...also check out pixho's website...the Tips section under colour...that's where you will find a couple tutorials...it might help
Pixho (http://www.3dluvr.com/pixho/)
johnnyMac
01-20-2003, 03:24 PM
mark_wilkins
thanks for the help again. i think it's making more and more sense already but i have yet another question for you.
how can i reconnect the "sky_file" from his tutorial with my own image for all the lights without going from one light to the next? i am currently editing the mel script but i think my last edit made the lights in someone's house flicker on the other side of the country. go figure.
aken009 - rhonda graphics is da bomb. i'll have to look more in depth what is posted on that page. thanks.
CGTalk Moderation
01-14-2006, 05:00 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.