View Single Post
# 9 30-12-2007 , 01:39 AM
t1ck135's Avatar
Registered User
Join Date: May 2004
Location: UK
Posts: 1,991
cheers for the file Dave, it helps understand things better.
After having a quick look (its getting late) I think I understand a little more about what is going on. I might be wrong but the pointWorld value determines the xyz position in space that is being sampled. This means that when the image is rendered what is happening is that the samplerInfo node is grabbing all the pointWorld xyz values (effectively going from 0,0,0 to 0,0,1 to 0,0,2 all the way to for example 20,20,20 as points in space) and pumping them into the setRange node which is restricting the R, G or B value that is passed to the blinn shader (in this case to a value between 0.2 and 0.8). The values passed to the blinn material are mixed and the point color is produced. Phew......

So a test (if my theory is right):
Go to the samplerInfo node where you will see the pointWorld x,y and z attributes as 0,0,0.
In the script editor run the following command
Code:
$rTest = `getAttr "blinn1.colorR"`;
$rTest2 = `getAttr "blinn1.colorG"`;
$rTest3 = `getAttr "blinn1.colorB"`;
print ($rTest + " " + $rTest2 + " " + $rTest3);
It will come back with 0.5 0.5 0.5 (middle of the road)

Now alter the first pointWorld attribute value to 1 and run the code again. This time it comes back with 0.62 0.5 0.5, a higher red value. changing it to 2.5 or over results in the setRange node restricting it back to 0.8 as in its settings. Altering the second pointValue changes the Green value and the third pointWorld the Blue value. A combination of these values therefore determines what color each point (and therefore rendered pixel) on the box should be based on its position in the xyz planes.

I've not yet figured out how to get the physically intersected points where the points of the box are in 3D space but if the samplerInfo node allows you to get that then it should just be a case of iterating through all those points and dumping the position out along with the rgb values.

All this might not be useful to you yet but its real interesting to me user added image
If I get the chance tomorrow I'l look into it further

Simon


Examples of bTraffic - a traffic animation tool for Maya
bFlocking - a tool for Maya 8.5+ to generate flocking and swarming behaviours
Jan/Feb Challenge 2007 Entry and W.I.P
May/Jun Challenge 2006 Entry and W.I.P
Mar/Apr Challenge 2006 Entry and W.I.P
Jan/Feb Challenge 2006 Entry and W.I.P
Nov/Dec Challenge 2005 Entry and W.I.P
Sep/Oct Challenge 2005 Entry and W.I.P
Jul/Aug Challenge 2005 Entry
www.flash-fx.net

Last edited by t1ck135; 30-12-2007 at 01:43 AM.