Jump to content

Blender animation with particlesystem


Kilombo
 Share

Recommended Posts

Good afternoon everyone,

 

I'm trying to beginAnimation with one imported mesh from blender, but something is going wrong cause nothing happens.

Supposely, the animation is started when a ship is destroyed, can some one take a look? I'm missing something for sure.

The animation consists on the ship beeing destroyed, so I putted a particle system on the mesh and added a modifier (explosion) (in blender of course), it's supposed to work. But it's not....

unit.prototype.setMesh = function (mesh){        this.mesh = mesh;    this.mesh.position.x = this.getShipPosx();    this.mesh.position.z = this.getShipPosz();    this.mesh.rotation.y = this.getShipRotation();    this.mesh.position.y = 0;    if (this.destroy === true){        console.log("chega aqui");        scenes[0].beginAnimation(ship, 0, 100, true);        console.log(ship);        this.destroy = false;    }};unit.prototype.setDamage = function(power) {    if (this.shieldSize > 0){        this.shieldSize = this.shieldSize - power;    } else if (this.shieldSize < 0){        this.shieldSize = 0;     } else {        this.armor = this.armor - power;    }        if (this.armor <= 0){        this.armor = 0;        this.destroy = true;        this.setMesh(this.mesh);    }};unit.prototype.load3D = function(name,imageFileName,posx,posz,roty,meshid,type,octree){    var temp = this;    BABYLON.SceneLoader.ImportMesh(name, "Assets/babylonreadyfiles/", imageFileName, scenes[0], function(newMeshes) {        ship = newMeshes[0].clone();                ship.scaling.x = constants.shipScale;        ship.scaling.y = constants.shipScale;        ship.scaling.z = constants.shipScale;                               ship.actionManager = new BABYLON.ActionManager(scenes[0]);                     if (selfchecker === 0) {        selfchecker = 1;        temp.setShipPos(posx,posz,roty);        //temp.loadParticlesEngine(newMeshes[0]);                        };         makeOverOut(ship,meshid,type);         octree.dynamicContent.push(ship);         octree.useOctreeForCollisions;         //newMeshes[0].checkCollisions = true;         temp.setMesh(ship);        });};
Link to comment
Share on other sites

I Dk, Does the animation importer supports the blender particle system and the explode modifier? I'm starting to think that can be something relationed with that. Cause when I check in the console log (with console.log(this.mesh)) it returns "animations: Array[0]", so... there's no animation exported :( Do you know of some problem relationed with this features ?

Link to comment
Share on other sites

This has caused me to alter Tower of Babel (not moved up yet), defensively so far.  I have now added a 13th warning type.  In the first pass through all of the objects in scene.objects.  If the object.type is not a 'CAMERA', 'LAMP', 'ARMATURE', 'MESH', or 'EMPTY'  (Materials are not objects), then it now actively says it is being ignored:

 

     TowerOfBabel.log('WARNING: following object is not currently exportable thus ignored: ' + object.name)

 

This should at least not silently leave one wondering when something does not transfer over.  I have tested it with a .blend file that has lattices & the message works.

 

I looked through the 350 odd .blends that Blender support has & I find no example of particlesytems, let alone ones that animate it.  There is some stuff called particles in the hair section, but not sure if they are the same.

 

If you produce the simplest possible .blend you can that has this & append it to this thread as a sample.blend.txt,  I will at least take a look at it.  It would not be prior to getting shapekeys through, so no hurry.

 

Jeff

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...