Bookmark this item
GFX Forums > Skills and Techniques [ST] > A return to 3d Studio 3ds files

A return to 3d Studio 3ds files Avatar
tgraupmann | 04/15/2003 @841 | Edit edit post
With all the information at:
http://lib3ds.sourceforge.net
http://www.wotsit.org
http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg5.htm
http://www.gametutorials.com/forum/topic.asp?TOPIC_ID=5281

I can't find any information on the object track hierachy.

Does anyone know how the animation tracks should be applied to a child object when the parent is an object?

Applying parent to child was straightforward when the parent is a group and the child is an object because you just apply the position, rotation, and scale tracks from the group to the object.

But what do you do if the parent is an object and the child is an object? Does that even make sense (how could an object be a parent)? The only thing I can think of is that by having a parent object you get the effect that the objects are linked. In that case what should be done? Find a common vertex between the two and pivot on that?

Any ideas?

Re: A return to 3d Studio 3ds files Avatar
tgraupmann | 04/19/2003 @859 | Editedit post
Here is a better way to look at the problem:

The green sphere at the bottom is 0,0,0 for each object. All objects have a common 0,0,0 apparently?

The red spheres are each objects vertex[0] point.



The lower leg and foot are now moving together. Can you see why the upper leg and lower leg aren't pivoting together?

Re: A return to 3d Studio 3ds files Avatar
tgraupmann | 04/30/2003 @291 | Editedit post
The solution *IS* for this model:

Read the position keys, but skip subtracting position[0] and the pivot from each vertex.

After the hierarchy is read, search for linked object hierarchies (any object that has a parent object).

Subtract position[0] and the pivot from each vertex for all objects the lack parents. Don't do this for linked objects or groups.

Call animate model recursively, so that the upper most parent is animated first working downward from parent to child until the node being displayed is animated.

The animated routine is a little different. If a linked object is detected then operate using the following conditions:
{
- If a node lacks a parent, translate by vertex[1].
- If a node has a parent, and its parent lacks a parent, translate by vertex[last].
- If a node has a parent, and its parent has a parent, translate by vertex[1].
}

If the node is not a group, translate by position[x].

Scale by master scale.

Rotate by rotation[x].

If a linked object was detected then operate using the following conditions:
{
- If a node lacks a parent, translate by -vertex[1].
- If a node has a parent, and its parent lacks a parent, translate by -vertex[last].
- If a node has a parent, and its parent has a parent, translate by -vertex[1].
}

And that's all the is to it.

Now the strange part is that depending on the model the logic changes. To display the DarkBasic H-Hound model, it uses the following conditions
{
- If a node lacks a parent, translate by -vertex[1].
- If a node has a parent, and its parent lacks a parent, translate by -vertex[1].
- If a node has a parent, and its parent has a parent, translate by -vertex[1].
}

The only thing that makes these models different is the number of verteces in the nodes that this logic is applied to.

Would it be correct to switch between the two implementations of this logic depending on the number of verteces in each node?

Here is some info about the two models:
H-Cyborg
======
LF_Thigh: 39 verteces
LF_Calf: 44 verteces
LF_Foot: 38 verteces

H-Hound
=======
LF_Thigh: 28 verteces
LF_Calf: 24 verteces
LF_Foot: 12 verteces

So the number of verteces is different, is this cause enough to vary the animation algorithm???

Re: A return to 3d Studio 3ds files Avatar
tgraupmann | 05/05/2003 @820 | Editedit post
Great News! http://www.gametutorials.com posted my 3ds animation source code. You know what this means. Beta tests are on. Test your models and send me bugs reports. Download the source here:
http://www.gametutorials.com/download/CodeDump/3DSAnimation2_MOD.tar.gz /

-Tim Graupmann
tgraupmann@yahoo.com
http://tgraupmann.hypermart.net




[Message edited on 05/05 @834]

Re: A return to 3d Studio 3ds files Avatar
tgraupmann | 05/12/2003 @906 | Editedit post
2003-05-12 Ported to Linux/GLX.

Re: A return to 3d Studio 3ds files Avatar
tgraupmann | 09/21/2003 @211 | Editedit post
The latest code update can be found at my new site.

http://tgraupmann.uwvcd.com

Re: A return to 3d Studio 3ds files Avatar
tgraupmann | 09/23/2003 @814 | Editedit post
Sorry for the plug. Trying to let google know about my 3ds site.

BTW, have you seen the new $10,000 programming contest at google?
http://www.google.com/codejam

I've made some progress lately -- Please check out the new site:
http://tgraupmann.uwvcd.com/cgi-bin/index.pl
http://tgraupmann.uwvcd.com/cgi-bin/index2.pl
http://tgraupmann.uwvcd.com/cgi-bin/index3.pl
http://tgraupmann.uwvcd.com/cgi-bin/index4.pl
http://tgraupmann.uwvcd.com/cgi-bin/dev.pl
http://tgraupmann.uwvcd.com/cgi-bin/gfx.pl
http://tgraupmann.uwvcd.com/cgi-bin/sketches.pl
http://tgraupmann.uwvcd.com/cgi-bin/genespan.pl
http://tgraupmann.uwvcd.com/cgi-bin/nanosim3d.pl
http://tgraupmann.uwvcd.com/cgi-bin/lod-demo.pl
http://tgraupmann.uwvcd.com/cgi-bin/simpleglengine.pl
http://tgraupmann.uwvcd.com/cgi-bin/nanosim.pl
http://tgraupmann.uwvcd.com/cgi-bin/companyresearch.pl
http://tgraupmann.uwvcd.com/cgi-bin/vrann.pl
http://tgraupmann.uwvcd.com/cgi-bin/resources.pl
http://tgraupmann.uwvcd.com/cgi-bin/contact.pl

previous page 1 next page
Search the site
SiteSearch

Web GFXartist.com

Profile
GFXuser name:
   tgraupmann
Full Name:
  Timothy A. Graupmann
Gender:
  Male
Birthdate:
  09/27/1978 (31)
Country:
  United States
Member since:
  04/15/2003

Actions:

view profile View profile
visit site Visit website
Online members
@177: Canuck13
@177: akpe
@176: Xid
@176: zeedaam
@174: jolte
Sponsored Links


Affiliates