Skip to content

Renanse's Particle Editor

ricardolpd edited this page Nov 3, 2012 · 4 revisions

Application screenshot

Summary

This simple utility allows you to create, experiment with, save, load and merge Ardor3D particle systems.

Prerequisites

To run this utility, you must first have Java 6.0 or greater installed.

Download & Install

Get the binary here: Version 1.0 (zip)

To install, unzip to desired location. Open the resulting folder. In this folder will be a .jar file and a native folder. Locate your OS folder under native and copy the contents of that folder to the same directory as the .jar. So, if I were running a Mac, for example, I would copy the three files in [folder]/native/macosx/ to [folder] resulting in something like this:

Finder particle editor file structure

Running

Once properly installed, to run the editor on most systems you can simply double click on Ardor3DParticleEditor.jar.

If for some reason this does not work, you can open a command prompt, cd to the editor's folder and type:

java -jar Ardor3DParticleEditor.jar

Using the Editor

This is merely intended as a start of the documentation of the editor. But maybe if some text appears here, somebody else will feel inclined to correct the mistakes I might make and through the process of internet collaboration this will evolve in a very good article on the usage of Renanse's editor.

The editor should be fairly straightforward if you are familiar with the particle system in Ardor3D. And if you're not, it is a good place to become familiar with it :-).

The best way to learn is to simply open the examples and toy around with a bit. I'll just provide a little overview of what's where, and how you should import the generated file in your project.

The Editor

The screen is divided in a small work area to the left, and a large preview to the right. The work area is itself divided into two distinct areas, at the top an overview of the layers for this particle system. And below that the controls to edit the current layer.

The controls are divided in 6 tabs, which are pretty much self-explanatory.

Appearance

Controls the appearance of a single particle. The appearance timeline and the Animation timeline are important, as they control how your particle behaves throughout its lifetime.

Emission

Controls the emitter. So type, translation, rotation etc. And initial velocity.

Flow

Controls how old your particles will get, and if you use a flow controller.

Scene

How many particles + some controls I don't fully understand :-).

Influences

Particle influences.

Examples

A good place to start.

Importing the particle system

I use the following code. Not sure if it's the best way to go, but it works for me. Anyway, at least it's a start.

File f = new File(path.getString());

ParticleSystem particles = (ParticleMesh) BinaryImporter.getInstance().load(f);

particles.getParticleGeometry().setModelBound(new BoundingBox());
startSize = particles.getStartSize();
endSize = particles.getEndSize();
			

final BlendState blend = new BlendState();
blend.setBlendEnabled(true);
blend.setSourceFunction(BlendState.SourceFunction.SourceAlpha);
blend.setDestinationFunction(BlendState.DestinationFunction.One);
particles.setRenderState(blend);

final ZBufferState zstate = new ZBufferState();
zstate.setWritable(false);
particles.setRenderState(zstate);

final LightState lt = new LightState();
lt.setEnabled(false);
particles.setRenderState(lt);

final ShadingState st = new ShadingState();
st.setEnabled(false);
particles.setRenderState(st);



final FogState fs = new FogState();
fs.setEnabled(false);
particles.setRenderState(fs);

particles.getSceneHints().setDataMode(DataMode.Arrays);
particles.setTranslation(new Vector3(0, 2, 0));

this.addChild(particles);
particles.getParticleGeometry().setModelBound(new BoundingBox());
particles.getSceneHints().setDataMode(DataMode.Arrays);
particles.getSceneHints().setRenderBucketType(
					RenderBucketType.Transparent);
this.getGlobalParent().getSceneHints().setTextureCombineMode(
					TextureCombineMode.CombineClosestEnabled);