Jump to content

Recommended Posts

Posted

I agree but otherwise looking good :)

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Posted

Hl2 smg? Haha anyway great work it would be great to see a peek at some of the code... wink.png From my experience with the source engine I'd personally like to see effects work on an per entity basis. So you can layer effects onto anything.

 

EDIT: I am currently looking to make an explosion effect to work with. Can you provide some code basis of how you started?

Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5.

 

 

 

Life is too short to remove USB safely.

Posted

Here is the source of explosion class.It's very basic and I think everybody can edit it to optimize it for your application.

 

(included materials and textures smile.png

Explode.rar

 

Test:

Explode explosion0;
explosion0.CreateExplosions(Vec3(10,10,10),1);
and in the loop
explosion0.Update();

 

Hl2 smg?

 

Why?

  • Upvote 1
Posted

I get an:

 

Unhandled exception at 0x1017eace in Explosion.exe: 0xC0000005: Access violation reading location 0x00000058.

 

Dont know why.

 

 

EDIT: Needed an explosion sound wink.png

Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5.

 

 

 

Life is too short to remove USB safely.

Posted

The random emitter trails didnt work for me... Ended up with a non stopping smoke emitter at the bottom.

Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5.

 

 

 

Life is too short to remove USB safely.

Posted

yes I know this error.Have you created some explosions in the same time?

 

You have to wait for the active variable,because when you create a new explosion in the same time as the other isn't ready (not all emitters are created) you overwrite the old emitters,so the old emitter wouldn't stop.

 

When you create only 1 class ,you have to wait for the "active" variable,than it would work biggrin.png

 

Something like :

 

Explode ex;

loop:
ex.Update();
if(KeyHit(KEY_A) && ex.active == false)
   ex.CreateExplosions(Vec3(2,3,4),1);

Posted

When I do that I get an error with PauseEmitter I get an unhandled exception

Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5.

 

 

 

Life is too short to remove USB safely.

Posted

In the Explosion.cpp file (overwrite the other):

else if(Trailtime < 0.1)
{
 for(int i = 0;i < 6;i++)
 PauseEmitter(smoke[i]);
 if(EmitterPaused(smoke[5]))
  active = false;  //The emitter are ready for a new explosions
}

 

 

Now when you check the active state first it works ;D

Posted

As I make a new explosion class with a crysis like explosion right now.

 

Yeah it'd be great to just see that little bit more detail in it.

  • Upvote 1

Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5.

 

 

 

Life is too short to remove USB safely.

Posted

I will make a new class design and a new explosion,because that was only a test class ,so it can return errors :)

I try to make it like in Cryengine 2 (not exactly the same )

Posted

Ohhhhh I can't do that.......

Sry but I can't make a crysis like explosion with the Leadwerks Emitters, because there are still other emitter settings I have to do.

Maybe somebody has the time to make that ..

Posted

Well we have the guy who is working on emitters at the moment

Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5.

 

 

 

Life is too short to remove USB safely.

Posted

As an aside, when building an FX system for CombatHelo we used SendMessage(....) which can take a delay in microseconds as a parameter. The FX system uses a dummy entity in the scene that works as a mediator (if you know your design patterns).

 

It creates and removes FX objects which might include emitters, sounds, lights, even structure collapse.

 

This example code is part of the structure collapse update method, it's fired when the building object has reached the end of collapsing motion. The message id EFFECT_REMOVE_ENTITY is sent to to the mediator to remove itself after 20000 ms which is enough time for the audio and dust effects to dissipate. Typically the building is replaced with a destroyed version (or pile of rubble) but we don't want the original model too.

 

  game.scene.SendFXMessage(TEntity(fxEntity), EFFECT_REMOVE_ENTITY, fxEntity.position, 0, 0, TEntity(fxEntity), 20000) ;

 

A mediator approach lets you create compound effects made from your own pool of effect code to make many variations. My code ended up being large due to having lots of extended classes to deal with specific kinds of objects. Not just for explosions but also ambient audio effects, triggers and a bunch of other things I need in my game.

 

What it can't do is jump around, once it's been sent to the message queue you can't get at it till it plays.

  • Upvote 1

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

  • 1 month later...
Posted

Here is the source of explosion class.It's very basic and I think everybody can edit it to optimize it for your application.

 

(included materials and textures smile.png

Explode.rar

 

Test:

Explode explosion0;
explosion0.CreateExplosions(Vec3(10,10,10),1);
and in the loop
explosion0.Update();

 

 

 

Why?

 

Hello,

 

I'd like to change the dimention of the explosion (smaller) without changing the position z ;-)

 

I tried to put a scale parameter of the radius, but it change the diameter of a particle :-( but not of the explosion.

 

anyone has a solution for me?

 

Thank you in advance

Posted

When you want to make the explosion bigger or smaller in the diameter you have to change the SetEmitterVelocity(Vec3(0,0,0),Vec3(1,1,1)) and (optional) the waver value

 

For Example:

Big Explosion:
SetEmitterWaver(emitter,50.0);
SetEmitterVelocity(Vec3(0,1,0),Vec3(5,0,5)) //When the particles moves very fast you need more particles otherwise the distance between the particles are too big and it looks bad
Small Explosion:
SetEmitterWaver(emitter,5.0);
SetEmitterVelocity(emitter,Vec3(0,1,0),Vec3(1,0,1));

  • Upvote 1

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.

×
×
  • Create New...