Tutorial on A3D Particle Systems creation

Software: Away3D 4.x

Ludovic, Jr. Member
Posted: 20 May 2014 02:28 AM   Total Posts: 31

Hi!

I found 2 sample codes using A3D Particle Systems.
I am slowly deconstructing them piece by piece but without a high level introduction to the concepts it is a really difficult job to make sense of it all just by analyzing and simplifying the code.

Is there a tutorial on A3D Particle Systems creation that introduce the concepts and the Classes needed?

I only want to use Particle Systems for those relatively common things:
- Explosion
- Fire
- Smoke
- Rain/Snow
- Sparkles

   

JackYao, Newbie
Posted: 20 May 2014 05:12 AM   Total Posts: 4   [ # 1 ]

Hey, you can try sparticle editor. It’s an awesome tool for particle effect.
Visit http://www.effecthub.com/t/sparticle and download this tool.
There are two tutorials:
http://www.effecthub.com/topic/54
http://www.effecthub.com/topic/92

   

Ludovic, Jr. Member
Posted: 21 May 2014 12:37 AM   Total Posts: 31   [ # 2 ]

Hi JY!

That’s great I played with it and I love it but I ran into one issue though.

After putting together an animated texture project and saving it I set to learn how those are loaded into the app using the Asset Loader example found at:

http://www.effecthub.com/download/software/sparticleparser

But even after adding the source paths:
- .../Away3d 4.1.4/src
- .../Sparticle/Parser/src

The Samples AssetLoader will not compile as some of the Away3d classes used by the examples no longer exist in 4.1.4

For examples the sparticle class: ParticleSegmentedScaleNodeSubParser
makes use of an unavailable Away3d class: ParticleSegmentedScaleNode

Is there a newer version of the Sparticle library on GitHub that works hand in hand with A3D 4.1.4 and that I could download?

Many thanks grin

   

JackYao, Newbie
Posted: 21 May 2014 02:50 AM   Total Posts: 4   [ # 3 ]

Hello, as this thread http://www.effecthub.com/topic/5 mentioned:
Download the latest dev branch of Away3D lib on github https://github.com/away3d/away3d-core-fp11/tree/dev

I guess you should update your Away3D lib, but not the sparticle lib.

   

JackYao, Newbie
Posted: 21 May 2014 02:52 AM   Total Posts: 4   [ # 4 ]

Here’s a template project for quick start
http://www.effecthub.com/download/software/templateproject

   

Ludovic, Jr. Member
Posted: 21 May 2014 07:00 AM   Total Posts: 31   [ # 5 ]

Hi JY,

I had already downloaded the parser and LoadAsset example which is what is not working and causing me the issues listed above.

I also copied again the Dev branch at https://github.com/away3d/ (making sure I got the latest dev branch).

The project folder has the following class path added in that order:
- src
- away3d dev src
- parser src

But I still get the errors below.

On the blog of the Sparticle creator I also read a post saying that the parser is now part of Away3d starting from 4.1.x which adds to my confusion.

Here is a copy and paste of the compile output:

\parser\src\away3d\loaders\parsers\particleSubParsers\nodes\ParticleUVNodeSubParser.as(33): col: 47 Error:
Access of possibly undefined property UV_CYCLE through a reference with static type Class.
_cycleValue = new valueCls(ParticleUVNode.UV_CYCLE);
                              ^
\parser\src\away3d\loaders\parsers\particleSubParsers\nodes\ParticleUVNodeSubParser.as(47): col: 48 Error:
Access of possibly undefined property UV_SCALE through a reference with static type Class.
_scaleValue = new valueCls(ParticleUVNode.UV_SCALE);
                                ^
\parser\src\away3d\loaders\parsers\particleSubParsers\nodes\ParticleUVNodeSubParser.as(69): col: 130 Error:
Incorrect number of arguments.  Expected no more than 4.
_particleAnimationNode = new ParticleUVNode(ParticlePropertiesMode.GLOBAL, _cycleValue.setter.generateOneValue(), 1, _axis, _formula);
                                                                                      ^
\parser\src\away3d\loaders\parsers\particleSubParsers\nodes\ParticleUVNodeSubParser.as(71): col: 166 Error:
Incorrect number of arguments.  Expected no more than 4.
    _particleAnimationNode = new ParticleUVNode(ParticlePropertiesMode.GLOBAL, _cycleValue.setter.generateOneValue(), _scaleValue.setter.generateOneValue(), _axis, _formula);
                                                                                                              ^
\parser\src\away3d\loaders\parsers\particleSubParsers\nodes\ParticleUVNodeSubParser.as(74): col: 136 Error:
Incorrect number of arguments.  Expected no more than 4.
_particleAnimationNode = new ParticleUVNode(ParticlePropertiesMode.LOCAL_STATIC, _cycleValue.setter.generateOneValue(), 2, _axis, _formula);
                                                                                          ^
\parser\src\away3d\loaders\parsers\particleSubParsers\nodes\ParticleUVNodeSubParser.as(83): col: 136 Error:
Incorrect number of arguments.  Expected no more than 4.
_particleAnimationNode = new ParticleUVNode(ParticlePropertiesMode.LOCAL_STATIC, _cycleValue.setter.generateOneValue(), 1, _axis, _formula);
                                                                                          ^
\parser\src\away3d\loaders\parsers\particleSubParsers\nodes\ParticleUVNodeSubParser.as(85): col: 172 Error:
Incorrect number of arguments.  Expected no more than 4.
_particleAnimationNode = new ParticleUVNode(ParticlePropertiesMode.LOCAL_STATIC, _cycleValue.setter.generateOneValue(), _scaleValue.setter.generateOneValue(), _axis, _formula);
                                                                                                                  ^
\parser\src\away3d\loaders\parsers\particleSubParsers\nodes\ParticleUVNodeSubParser.as(88): col: 136 Error:
Incorrect number of arguments.  Expected no more than 4.
_particleAnimationNode = new ParticleUVNode(ParticlePropertiesMode.LOCAL_STATIC, _cycleValue.setter.generateOneValue(), 2, _axis, _formula);
                                                                                          ^
Build halted with errors (fcsh).
(fcsh)
Done(1)

   

Ludovic, Jr. Member
Posted: 23 May 2014 03:20 PM   Total Posts: 31   [ # 6 ]

For the benefit of others, After downloading the latest Dev + Refactor branches on Github, I was able to run those AWP examples.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X