PDA

View Full Version : CreateTextureReferenceObject without child nodes?


indestructibleman
04-01-2006, 05:26 AM
is there any way to make a reference object without duplicating the heirarchy?

i've got some scenes with robots animated. textures are swimming so i wanted to make reference objects.

there are lots of individual objects in the scene, so i wrote the following script:

string $XXpoly[] = `ls-sl`;

for ($p in $XXpoly)

{
select -r $p;
CreateTextureReferenceObject;
};

select -cl;

the problem is, because of the way things were rigged (sloppily, that is), many of these objects have children parented under them.

when you create a referenceObject, it duplicates child nodes too. this is resulting in me having multiple nodes with the same name and is just generally messing things up.

please let me know if there's any way to make a reference object without duplicating the child nodes.


thanks,
will

Bonedaddy
04-01-2006, 05:08 PM
Hi Will!

There's a couple things you could do.

If you're using 2d textures, and are worried about the projections and whatnot swimming, just duplicate the robot sans children at a good frame, and use polygon->transfer UV, because that's what is causing the swimming.

If you're using 3d textures, you can bake out the textures into 2d ones, which will save you some processing speed anyway. It's in the multilister, but the command is convertSolidTx. If you want to convert an animated texture, look up km_bakeAnimatedTexture.mel on highend3d. This will also be the only way it'll work for video game stuff.

Failing that, you can duplicate it and just try to connect the .message attribute of the duplicated shape node to the target transform node's .referenceObject attribute. That's what it appeared to be doing in the hypergraph from 10 seconds of exploration, so that might work.

indestructibleman
04-01-2006, 08:00 PM
thanks for the tip on the connections.

i just realized that the makeReferenceObject command goes through and makes these connections for all the children nodes as well. so the duplication is actually useful.

the project was just cancelled an hour ago so this is all academic anyway.

CGTalk Moderation
04-01-2006, 08:00 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.