PDA

View Full Version : Instances and mapping them!?!?!?!?!


stelhar_1999
02-14-2003, 09:43 PM
(keep in mind that I use MentelRay for this projects renderings)
I made a cylinder using a nurbs circle a curve and extruded it! then I made multiple duplicates using instances instead of duplicates. I used instances because they helped better in my scene than duplicates (read the online manual for cons and pros for instances)
I assigned a shader on the first cylinder that I created from the circle and the curve and then rendered! While I should have all the nurbs cylinders shaded with the same shader only the first one was shaded.
I used the same method for creating polygonal boxes (I created the first and then some instances). All things went great in this case, all boxes were shaded! What is the problem???
Sorry for the long post.

luminis
02-15-2003, 02:28 AM
Don't really know why that could have happened. The way it should really be is to shade only the selected object, and all others should be left untouched, even if they are instanced copies. The reason why this is so is that the shape node outputs different data to different shading nodes depending on which instanced object is being calculated.

http://www.luminis3d.com/etc/cgt/img/inst-shade.jpg

In the example above, the connections go like this:

pCubeShape1.instObjGroups[2] --> lambert3SG.dagSetMembers[1]
pCubeShape1.instObjGroups[1] --> lambert3SG.dagSetMembers[0]
pCubeShape1.instObjGroups[0] --> lambert2SG.dagSetMembers[0]

So depending on what effect you want (all instances with the same shader, or different instances with different shaders) you should set the shader for each object individually.

stelhar_1999
02-15-2003, 11:12 AM
I tried to assign the same shader to all of them by hand (one by one) and they only think happened is that only the first had a shader assigned and all the other instances had the default lambert assigned. And that only happens for nurbs not for the polygons. I'll check the shading nodes as you suggested to see what happens there!!!

CGTalk Moderation
01-14-2006, 10: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.