Animated mesh in 3DSMax

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
zthom
Posts: 8
Joined: Sun Jul 06, 2008 12:57 pm

Animated mesh in 3DSMax

Post by zthom »

Can I create animated mesh in 3DSMax? Or how can I animate *.3ds files?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

of course you can... :lol:
but Irrlicht won't play them (3ds animations are not supported by Irrlicht)... ;)
export it to another format like DX (.x), for example !!!
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
zthom
Posts: 8
Joined: Sun Jul 06, 2008 12:57 pm

Post by zthom »

Problem :( , my 3DS Max cannot export in .x
But it can export in these files:
*.Al
*.ASE
*.ATR
*.BLK
*.DF
*.DWG
*.DXF
*.W3D
moriwo
Posts: 40
Joined: Fri Jul 04, 2008 9:29 pm

Post by moriwo »

you have to use exporter plug-in.
"panda exporter" , "kw-exporter" ,..etc.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Get this exporter for you MAX package. It's a B3D format exporter (Blitz 3D)

http://www.onigirl.com/pipeline/

3DS format does not support animation (even thru MAX->MAX). Max user uses mostly the FBX format to export. This is an inter-exchange format for many 3D packages that support static meshes and animated mesh + bones and other features. But IRRlicht does not support this format at the moment.

B3B is at the moment one of the best supported format for animated and static meshes on IRRlicht. I highly recommend it.

There is also the Collada format (DAE), But I've not tested how well the inter-exchange is working between max and IRRlicht.
alrusdi
Posts: 19
Joined: Tue Mar 25, 2008 8:20 am
Location: Russia, Tyumen

Post by alrusdi »

christianclavet Irrlicht have some limitations for using .b3d
Succes is possible only for static .b3d meshes, and meshes with sceletal animations.
We probably need to create commandline meshviewer and replace with him original one...
B3DPipeline Extensions unsupported too.
Sorry for my english :-)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

There are no other b3d animations (as already discussed in a different thread). Don't know exactly what you mean with command line mesh viewer, but in Irrlicht 1.5 the mesh viewer will allow to load meshes from command line.
What are b3dpipeline extensions?
alrusdi
Posts: 19
Joined: Tue Mar 25, 2008 8:20 am
Location: Russia, Tyumen

Post by alrusdi »

There are no other b3d animations (as already discussed in a different thread).
I mean non boned animations.
http://schola.ru/public/tmp/triangle.zip - this (very simple, just one rotating triangle) model unanimated in Irrlicht, but animated in Blitz3D, because Irrlicht can't animate non boned models.
Don't know exactly what you mean with command line mesh viewer, but in Irrlicht 1.5 the mesh viewer will allow to load meshes from command line.
Yes, I mean loading meshes from command line. B3DPipeline (recomended in this topic by christianclavet) has viewer (writen in Blitz3D) for realtime preview of exported b3d-models. We can replace this viewer with another one, writen in Irrlicht. When day of Irrlicht 1.5, and new mesh viewer have come, I will do it (at least for me).
What are b3dpipeline extensions?
B3d Extensions allow you to export more scene data from 3D Studio Max than is currently supported in the b3d file format (cameras, lights, fog, ambient colors, references etc...). Extensions use a combination of nodes and naming prefixes to encode extra information in a b3d file. The B3d Extensions Library decodes this information and recreates the original scene data in Blitz3d.
I think Irrlicht does not need to implement this functionality.
Sorry for my english :-)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hmm, only read about these extensions for the MilkShape format. Scene loading is quite useful, and many formats do support it. I guess we have to find a neat solution to combine the current scene loading and mesh loading approaches. This simplifies a lot of things for the artists pipeline.
I guess I have to read the b3d specs once more to figure out this type of animation...
EDIT: The keys are properly read and stored in the joint. But I guess that since there are no weights applied, there's no animation visible. Maybe Luke can enlighten us how animation of joints without weights is possible.
Luke
Admin
Posts: 449
Joined: Fri Jul 14, 2006 7:55 am
Location: Australia
Contact:

Post by Luke »

that kind of animation is easily added. (but not sure if blitz3d even supports it) but would probably be best to do by transforming the meshbuffer for animation, but there are lots of problems with that. I think it's best to wait till they are fixed first.

could just add a weight to all the vertices in the meshbuffer, but it's slow..
[url=irc://irc.freenode.net/irrlicht]irrlicht irc[/url] - corrodinggames.com
alrusdi
Posts: 19
Joined: Tue Mar 25, 2008 8:20 am
Location: Russia, Tyumen

Post by alrusdi »

Luke, yes it's good idea to add weights for each vertex (we can animate my triangle by this way)... But .b3d file may contain node without mesh (pivot node in Blitz3D terms). Pivot node may be empty, or may be parent for one or more other nodes. Child nodes may not contain any animations itself, but must be animated because parent node is animated.
This behavior is present in Blitz3D. I can provide some examples.
Is it possible to add this feature to Irrlicht?
How i can implement this behavior in my application?
May be for now we need to add warning in B3Dloader if user tries to load .b3d model with non boned animations? We also can skip loading unuseful animation keys, when it happens.

Code: Select all

bool CB3DMeshFileLoader::readChunkKEYS(CSkinnedMesh::SJoint *InJoint)
{
	s32 flags;
	file->read(&flags, sizeof(flags));
	#ifdef __BIG_ENDIAN__
		flags = os::Byteswap::byteswap(flags);
	#endif
	if (InJoint->Weights.size()==0){
		os::Printer::log("B3dMeshLoader: Animation of non boned models is currently unsupported!!!");
	}
	...
EDIT: is code below correct? (i am trying to add weight for each unweighted vertex)

Code: Select all

if (InJoint->Weights.size()==0){
        u32 avvIDs=AnimatedVertices_VertexID.size();
        for (u32 i=0; i<avvIDs; i++){
                CSkinnedMesh::SWeight *Weight=AnimatedMesh->createWeight(InJoint);
                Weight->strength=1;
                Weight->vertex_id = AnimatedVertices_VertexID[i];
                Weight->buffer_id = AnimatedVertices_BufferID[i];
            }
   }
Sorry for my english :-)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I think this is not really correct. You could also have a joint hierarchy just for other purposes, so the warning would be overacting. You'd have to check for keyframes as well, and only warn in the case they also exist.
The weight addition is probably also doing too much, or too less - depending on which information is stored in AnimatedVertices_VertexID. You'd have to add only to the vertices which are affected by that bone. And beware,this will hit performance considerably.
And yes, provide examples for the different types of animation. That will help to add more features.
alrusdi
Posts: 19
Joined: Tue Mar 25, 2008 8:20 am
Location: Russia, Tyumen

Post by alrusdi »

(( I see, my code is absolute incorrect...
As result we have no solution, only feature request for Irrlicht animation system (in Luke we trust:)) ).
I have created some .b3d animations for testing:
http://schola.ru/public/tmp/b3ds.zip
15.b3d - Red triangle animated but have unanimated parent (green) triangle
16.b3d - Visa versa. Parent (green) triangle animated, child (red) triangle doesn't have animation keys, but animated because his parent is animated
You can download B3DPipeline plugin from here: http://www.onigirl.com/pipeline/
and use his b3dviewer.exe for visualisation purposes. Usage: "b3dviewer.exe -file 15.b3d"
Sorry for my english :-)
Post Reply