I was hoping to avoid reimporting everything, but it works fine as long
as I don't reimport the file every-time. I just save the file to a
string and use that, its much faster (This is still rebuilding, but not
really reimporting). It works great. Now I have colored chunks in my
explosions!
Thanks for the tips!
On Dec 9, 2006, at 4:42 PM, Jeff Quan wrote:
That's how cloning works.
If your model has only one trimesh in it, (to quote Joe Strout:)
"So, to clone a TriMesh, you would make a new TriMesh, set its number
of vertices and triangles and such to the same as your original, and
then call Copy on the VertexPositions, VertexNormals, Triangles,
VertexColors (if applicable), and VertexUVs (ditto)."
Now you can change the Material on that Trimesh.
Another way you can make a copy is to reload the model each time you
need a new instance and then change that instance's material (or
materials if you have several textures in your model) after loading.
This is done for Zombies (source at:
http://www.codenautics.com/zombies).
So in both cases, you'd need to create a New Object3D for each copy,
thus ensuring that they don't have any vertices and materials in
common. Note that changing materials on an object can be slow.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|