snow

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
ja ja ja
Posts: 1
Joined: Tue Mar 21, 2006 6:44 am
Location: kenya

snow

Post by ja ja ja »

people l need heip how can l make snow speacial effect and make them
react/move if touched like in virtual fighter 4
mwafrika hodari
HantaCore
Posts: 21
Joined: Wed Mar 22, 2006 4:38 pm

Post by HantaCore »

hi ja ja ja,

with a particle emitter throwing particles to the ground you may create a snowfall effect (setting the proper falling speed and movement), but I don't know if it is possible to have them react to collisions
Currently working on a C# MMORPG using Irrlicht.NET
DeusXL
Posts: 114
Joined: Sun Mar 14, 2004 9:37 am
Contact:

Post by DeusXL »

Hello nein nein nein

For the snowfall, I think there's only one way : basic particle emitter over the head of the camera like HantaCore said.

For the collision problem, there's no magic way to solve it... It depends on what effects you can afford, what computers you aim and more than all what type of final effect you need... (sorry I never played to virtual fighter 4)
Irrlicht .NET complete and Cross Platform Wrapper
The kid on my avatar wrote:A painless lesson is one without any meaning
groats
Posts: 7
Joined: Tue Mar 21, 2006 11:49 am

Post by groats »

For snow go to http://zenprogramming.tripod.com/ has a great solution, unfortunately its written in C++ so heres the C# port. Just pop over to Zenprogramming to download the original to get the images for the snow particles.

Code: Select all

        private void StartSnowing()
        {
            IParticleSystemSceneNode ps = device.SceneManager.AddParticleSystemSceneNode(false, null, -1, new Vector3D(0,100,0), 
new Vector3D(1, 1, 1), new Vector3D(2,2,2));
            ps.ParticleSize = new Dimension2Df(2.0f, 2.0f);

            IParticleEmitter em = ps.CreateBoxEmitter(
                    new Box3D(-270, -200, -270, 270, 300, 300), new Vector3D(0.01f, -0.02f, 0.0f), 400, 800, new Color(0, 255, 255, 255), new Color(0, 255, 255, 255), 1800, 3000, 1);
            ps.SetEmitter(em);

            IParticleAffector paf = ps.CreateGravityAffector(new Vector3D(-0.05f, -0.03f, 0.0f), 2000);
            ps.AddAffector(paf);

            ps.SetMaterialFlag(MaterialFlag.LIGHTING, false);
            ps.SetMaterialTexture(0, device.VideoDriver.GetTexture(@"c:\media\snowparticle.bmp"));
            ps.SetMaterialType(MaterialType.TRANSPARENT_VERTEX_ALPHA );
        }
just fiddle with some of the variables to make more of less snow that swirls more less etc.

As for interacting with the snow I think DeusXL is right. Perhaps you could dynamically modify the particle affectors, or have more than one so you could localise over your player or target scenenode and change the gravity/swirl etc as the target is moved??
Locked