Funniness with creating Particle Systems

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
impulse3d
Posts: 17
Joined: Wed Jun 04, 2008 7:23 pm

Funniness with creating Particle Systems

Post by impulse3d »

Hi,

I've just begun using Irrlicht.NET CP, and I'm trying to create a particle system. I can make a basic scene, load meshes, use shaders, but I can't get a particle system up and running.

I treat particle system nodes like I do any other node, but for some reason their position seems accurate, but I can't get anything to show up. As a result, I've tried to child a billboard node underneath the particle system, but it won't display:

Code: Select all

            // Create an empty node.
            SceneNode empty = Program.Device.SceneManager.AddDummyTransformationSceneNode(Program.Device.SceneManager.RootSceneNode, 0);
            empty.Position = new Vector3D(0, 0, 10);

            // Adds a particle system.
            ParticleSystemSceneNode ps = Program.Device.SceneManager.AddParticleSystemSceneNode(true, Program.Device.SceneManager.RootSceneNode, 0);
            ps.ParticleSize = new Dimension2Df(32, 32);
            ps.Position = new Vector3D(0, 0, 10);

            ParticleEmitter emit = ps.CreatePointEmitter(new Vector3D(0, 0, -1), 50, 100, IrrlichtNETCP.Color.Red, IrrlichtNETCP.Color.Red, 400, 1100, 45);
            ps.SetEmitter(emit);

            ParticleAffector pspaf = ps.CreateFadeOutParticleAffector(IrrlichtNETCP.Color.Red, 5000);
            ps.AddAffector(pspaf);

            ps.SetMaterialFlag(MaterialFlag.Lighting, false);
            ps.SetMaterialTexture(0, Program.Device.VideoDriver.GetTexture(textureFileName);
            ps.SetMaterialType(MaterialType.TransparentVertexAlpha);

            BillboardSceneNode bill = Program.Device.SceneManager.AddBillboardSceneNode(ps, new Dimension2Df(16, 16), 0);
            bill.SetMaterialFlag(MaterialFlag.Lighting, false);
            bill.SetMaterialType(MaterialType.TransparentAddColor);
            bill.SetMaterialTexture(0, Program.Device.VideoDriver.GetTexture(textureFileName);
Irrlicht loads all of the textures fine. When I run this, with the billboard as a parent of the particle system, I do not see the billboard anywhere. When I put it as a child of the dummy node, I see it where I expect it to be.

Does anyone know what the problem may be?
Danny Gilbert
Posts: 54
Joined: Thu Oct 25, 2007 1:38 pm
Location: Montreal, Canada

Post by Danny Gilbert »

Hi !

You have no response from anybody because IRRLICHT .NET is not more supported. You start a project with a dead library. If you know C++ or you want to learn it, start your project with Irrlicht, the "original" one in C++.

Sorry.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

But this sems to be based on Irrlicht.Net CP, which is a (hopefully) still live project. However, they have their forums somewhere else...
Post Reply