With declares, you should be able to do both of these in one shot
by grabbing each trimesh's data with Q3TriMesh_GetData and putting
a copy into a new (empty) trimesh with Q3TriMesh_SetData. IIRC, the
Q3TriMesh_GetData method copies only the attributeset reference
rather than duplicating it, so textures will be shared but each
trimesh will have their own geometry. Keep in mind you'll have to
duplicate the the whole display group hierarchy for multi-mesh
models, but that's not too difficult.
How would you create an empty trimesh and insert it into an empty
Object3D?
You can of course share one set of keyframes between all clones
You mean per animation sequence? Currently an entire animation
sequence (run, walk, jump, egc.) for a given model is shared between
one shape. What I'm trying to do is share that across multiple copies
of that model.
and if you want to refine it further you really only need one set
of triangle indices and texture UVs for the whole lot as well. That
would probably require you build the your trimeshes from scratch
and/or grab and keep that data locally in memoryblocks.
Yeah. That would be difficult to do and won't give much benefits in
terms of memory (saves 30-90k RAM per copy). What I'm more concern
with is texture memory.
In terms of processing, I think sharing animations that cycle such as
run and walk would save some CPU cycles, but I'm not sure how much.
_______________________________________________
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>
|