Search Results for

    Show / Hide Table of Contents

    Create Particle Systems


    Particles header

    Particle systems simulates and renders a large amount of quads called particles.

    Create a Particle Systems asset in Evergine Studio

    You can create a material click button on Plus Icon from Assets Details panel to deploy a create menu options and click on the option "Create particles"

    Create new particle system menu option

    Inspect Particle Systems in Asset Details

    You can find the particle system assets in the Assets Details panel when you select a folder in the Project Explorer.

    Material asset

    Particle System files in content directory

    The particle system file has the .weps extension.

    Material file

    Create a new Particle System from code

    The following sample code can be used to create a new particle system and apply to an entity in your scene:

    var assetsService = Application.Current.Container.Resolve<AssetsService>();
    var graphicsContext = Application.Current.Container.Resolve<GraphicsContext>();
    
    // Sets its particle emitter.
    ParticleEmitterDescription emitterDesc = new ParticleEmitterDescription()
    {
        ParticleTexture = EvergineContent.Textures.particle_png,
        ParticleSampler = EvergineContent.Samplers.LinearClampSampler,
        RenderLayer = EvergineContent.RenderLayers.Alpha,
    
        MaxParticles = 1000,
    
        InitLife = 2,
        InitSpeed = 1,
        InitSize = 0.1f,
        InitColor = Color.Red,
    };
    
    ParticlesEmitter emitter = new ParticlesEmitter(emitterDesc, graphicsContext, assetsService);
    
    // Creates the asset and sets its emitter.
    ParticleSystem particleSystem = new ParticleSystem();
    particleSystem.AddEmitter(emitter);
    
    In This Article
    Back to top
    Generated by DocFX