realbasic-games
[Top] [All Lists]

Re: Animation and memory issue

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Animation and memory issue
From: Lo Saeteurn <realbasic at miensoftware dot com>
Date: Sun, 24 Jul 2005 13:12:22 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <FF3D4383-F5B1-4405-A67F-BDF52954811A at miensoftware dot com> <D52AC133-DDD0-4558-8725-9508D39F6E79 at chaoticbox dot com> <0A72BE38-C202-4ED1-B09D-92236A98CD91 at miensoftware dot com> <556A6CD9-F71F-46A2-83A9-CC1277FDC5E0 at chaoticbox dot com>
It's a bit much to explain in an email, but if you grab my Quesa Wrappers (use the version in 3DMF Workshop if possible) it'll go something like this:

    myObject.AddShapeFromGeometry New Trimesh3D

You'd usually want to create a DisplayGroup3D first though, add trimesh(es) to that, then add the display group to the Object3D. The above code only works for models with one mesh/texture.

Thanks I will try that.


Not sure what you mean by "per sequence" - I view sequences as useful boundaries you place on a set of keyframes for the sake of organization, but I prefer to treat the entire set of frames as one block of data.

As in Run, Walk, Jump...each of those I am referring to them as separate sequences.


So Shape(1) might have a dozen "run" frames for example? That should be easy to share - after adding a true copy of the base model as shape 0 you can just do this for each remaining shape/ sequence:

    cloneObj.AddShapeFromHandle = originalObj.GetShapeHandle(n)

The poses are not separate shapes. Every single key frame of the animation is stored separately in a memoryblock. Each Object3D has only 3 shapes, 1 for each level of detail.

So the walk, run, jump, attack, death, etc. sequences are stored in separate memoryblocks and are only used to manipulate the shape (0-2 for each LOD).

To be honest, I wouldn't keep keyframes inside an Object3D or even inside Quesa - it just complicates things for no good reason and uses more memory than is needed - but if you already got it working...

Nope, it is in a memoryblock containing all the points. I simply change the base model based on the tweening of two frames.


_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>