Jump to content
  • Advertisement
  • entries
  • comments
  • views

vortxGE 2.0 particles

Sign in to follow this  


Back and already done some fun stuff.. I'm rewriting my shaders for version 330 so forgive the lighting !!

Added a new particle system that supports bullet physics or animation per particle. Material is shared so animation will effect every object. No billboards yet, I may make another scene node for billboard particles anyway for best performance.

User side code to create the particles.

// ################################
// Test Particle system
asset_bs = new lsAsset_BulletShape( vortxge->getAsset_manager() );
asset_bs->Make_Box( 0.5, 0.5, 0.5 );
vortxge->getAsset_manager()->Add_Asset( "bullet/particlebox", asset_bs );

lsParticleEmitter *pe;

pe = new lsParticleEmitter( 1000, asset_bs, demo_scene, vortxge->getOpenGL(), demo_scene );
if( pe )
pe->position = lsVector3( 0.0, 25.0, 0.0 );

pe->Set_EmitRate( 100, 2*1000, 10*1000 );
pe->Set_Volume( 100.0, 10.0, 100.0 );

// Add light
demo_scene->Find_Node( demo_scene, "Spot" );
if( demo_scene->getFoundNode() )
lsLight *light = (lsLight*)demo_scene->getFoundNode();
pe->Add_Light( light );
// Set mesh
lsAsset_Mesh *amesh;

amesh = (lsAsset_Mesh*)vortxge->getAsset_manager()->Find_Asset( LSAT_MESH, "data/vbm/Cube.vbm" );
if( amesh )
pe->mesh = amesh->getMesh();
demo_scene->Add_Node( pe );

Sign in to follow this  


Recommended Comments

Thanks again ! I'm really having fun working on this, things are coming together nicely.
Sadly I cant take credit for the physics :-) I'm using the Bullet Physics lib. And all you see is still only running in one thread.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!