How to animate a splitting in half mesh

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
The Creator
Posts: 30
Joined: Wed Sep 10, 2008 9:04 pm

How to animate a splitting in half mesh

Post by The Creator »

Hello, for those who remember me, we've made some progress in the game we're making and we're looking for some eye candy now ;D.

Here's the thing:

I've an animated walking zombie i animated using a biped and the skin modifier. Now i want to make the zombie split in half, to use when the player cuts a zombie with the katana.
I tried deattaching the legs from the torso and re-attaching the legs to the torso to be able to select both parts with the element option of the polygon modifier (i'm using 3dmax btw) and tried to animate the mesh separately, but since i'm using md2 format to export i need some bones to control the mesh.

I tried using 2 diferent bipeds, one controls the torso and the other controls the legs. I also separated the mesh in two elements and reattached one of them to the other so that i've only ONE mesh that has both parts to select through the element option.
The problem is that when i try to separate the legs from the torso using the 2nd biped, instead of separating the parts it just stretches the whole mesh.
I've already checked the envelopes so that each biped affects it's corresponding part (the legs biped affects the legs and the torso one the torso).


Any suggestions?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Not exact sure about the problem here - is it a problem in the engine or in 3dmax? But maybe - use different objects. You have one object with a "whole" zombie. And once he is cut up you have two new objects with the two halves of a zombie. On cutting you remove the old object and place two new object at the same position.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

Sounds like something you can do with a physics engine.
multum in parvo
The Creator
Posts: 30
Joined: Wed Sep 10, 2008 9:04 pm

Post by The Creator »

Yeah, that's what i wanna do. But i was asking if there was a way of cutting the mesh in half through animation or if the only way was replacing the mesh with two meshes, one for each part.

I guess that we'll need to replace the meshes then
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

I've seen demos of PhysX cutting a curtain in two. So maybe you should take a look at PhysX or IrrPhysX.
Iirc you wouldn't have to deal with the mesh beacause the physics engine does the vertex manipulation.
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

cutting through a simple plane, and cutting through a complex mesh is two different story...

in my opinion, you have to model two different meshes, place exact there where your model was, and make them fly after that (maybe with physics or just animation, or somehow)

but i dont think there are any technics what make your zombi split into two zombi xD (you know, if you cut a zombi, it wouldnt be a sharp edge, but the inner objects would come out, the flesh will scratch and so on. physX WONT do that.)
Image
Image
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

http://de.truveo.com/ageia-physx-demo-v ... 3355377049

From 0:45 to the end.
These aren't "simple planes"

But yeah it will only cut the mesh in half. You have to do the rest of the effect yourself
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

omg nice O.o
but i wonder how many polygons are in that simple carpet xD
Image
Image
The Creator
Posts: 30
Joined: Wed Sep 10, 2008 9:04 pm

Post by The Creator »

Thanks for the info. I've already tell the programmer to look for that.

I've another problem now.

I've exported my animated "bone" mesh in the md2 format but it explodes when we try to use it. If i export the same mesh in the b3d format, we can use it just fine.

I don't know what could be happening, because if i use a biped instead of bones, the md2 format works just fine =X


Any ideas?
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

Don't use .md2 format for skeletal animations. It is used only for non-skeletal animations (Like facial movement). I'm not sure why it works with the biped, but i would recommend using a different format.
multum in parvo
Post Reply