realbasic-games
[Top] [All Lists]

Re: More animation problems

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: More animation problems
From: Lo Saeteurn <realbasic at miensoftware dot com>
Date: Thu, 11 Aug 2005 21:23:44 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <A618E047-8F5D-426B-BA4D-8BCEDDB38F19 at miensoftware dot com> <74047942-9317-4DE4-A287-8A13DE3D5F91 at chaoticbox dot com>
Animations play perfectly and share much of the data. The problem now is with the lighting. If the animated object is rotated, the lighting does not change on the object. I suspect the normals have something to do with it. If so, how do I extract the normal list from a trimesh object and interpolate between the two frames?

Normals are stored in the vertex attributes of the trimesh data (same place you find the texture uvs).

So it is the normals that are causing this lighting issue? If so, it shouldn't be too difficult to find.

I can't recall the exact details involved with getting at them but it might help to check out the Trimesh3D.GetVertexNormals method in the Quesa Wrappers.

Now I'm guessing there's no way to share just the VertextNormals. It looks like it is mixed between the UV and the other vertex information. If this is the case, there may be performance issues going though them all?

Interpolating normals should be the same as interpolating vertex positions - just average them with the appropriate weight factors, and the result will still be normalized (or at least close enough).

That's good to know.

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