Spell Effects

Putting together a collection of spell effects to test out the latest updates to the emitter.

[video]http://youtu.be/KOcPQ-50HDE[/video]
[video]http://youtu.be/OaO9XXSZiIU[/video]
[video]http://youtu.be/td6m0Cv1tds[/video]
[video]http://youtu.be/ZTy71oeC4cQ[/video]

Most of the updates revolve around point emitter and limiting the direction of the emissions. Like… random tangent, random normal aligned, random normal negate, etc. for creating shapes from a single point. Anyways, as you can see, you can produce some pretty cool stuff without much effort.

10 Likes

Wow, like always you impress me.
Well done with this improvement and it will surely add to the way jME games/apps look.
It’s amazing, brilliant…

just wow!!!

They are all very nice effects but the last one is really amazing!
Just add a black catlike pupil in the center and you have the eye of Sauron.

O.O…wouaw…amazing !!!
I really like the first and the fourth made me curious (i love it too). How many emitters did you used? What is the setup? They seem really pro.

Lightnings in fourth one are really nice. I suppose these are non-moving particles with animation going through texture frames of lightning?

Edit:
http://xkcd.org/1313/
You may already have heard about regex golf. Maybe we could play particle golf? Somebody would publish the assets (textures and possible models) he used to create the particle effect and game would be to play with parameters/emitters/influencers to generate same effect. And we could do a repository of cool effects as well (but like shadertoy).

Of course, this would require Tonygod to release her particle code, which is entire reason why I came up with this idea :wink:

@t0neg0d I’m impressed by your work, keep it up =)

:-o amazing!!!

@all Thanks for the feedback!

@haze said: O.O...wouaw...amazing !!! I really like the first and the fourth made me curious (i love it too). How many emitters did you used? What is the setup? They seem really pro.

The first is 4
– One for the spiral flames at the bottom
– One for the spirals upward
– One for the blue sparkles
– One for the random hot coals

The fourth is 4
– One for the flames that stretch outward
– One for the spiral glow
– One for the pulsing light in the background
– One for the lightning

Likely, I’ll use these as “How to’s” when I finally get this thing packaged up and released.

@abies said: Lightnings in fourth one are really nice. I suppose these are non-moving particles with animation going through texture frames of lightning?

Edit:
http://xkcd.org/1313/
You may already have heard about regex golf. Maybe we could play particle golf? Somebody would publish the assets (textures and possible models) he used to create the particle effect and game would be to play with parameters/emitters/influencers to generate same effect. And we could do a repository of cool effects as well (but like shadertoy).

Of course, this would require Tonygod to release her particle code, which is entire reason why I came up with this idea :wink:

I’ll release it soon(ish). It needs to be refactored and commented. I need to rewrite the clone methods, as much has changed. I also have an issue with the read/write methods, as I’m not sure how you read/write a SafeArrayList. Maybe @pspeed can answer this?

@abies
I meant to answers your question about the lighting. It does use a spite influencer + an the alpha influencer using exponential curves like so:

[java]
lightning.getInfluencer(AlphaInfluencer.class).addAlpha(0f, Interpolation.exp10Out);
lightning.getInfluencer(AlphaInfluencer.class).addAlpha(1f, Interpolation.exp5In);
lightning.getInfluencer(AlphaInfluencer.class).addAlpha(0f);
[/java]

So, a fast curve weighted to the beginning of the blend and a slow curve weighted towards the end of the blend

@t0neg0d said: @all Thanks for the feedback!

The first is 4
– One for the spiral flames at the bottom
– One for the spirals upward
– One for the blue sparkles
– One for the random hot coals

The fourth is 4
– One for the flames that stretch outward
– One for the spiral glow
– One for the pulsing light in the background
– One for the lightning

Likely, I’ll use these as “How to’s” when I finally get this thing packaged up and released.

I’ll release it soon(ish). It needs to be refactored and commented. I need to rewrite the clone methods, as much has changed. I also have an issue with the read/write methods, as I’m not sure how you read/write a SafeArrayList. Maybe @pspeed can answer this?

<3 That would be great.

I think you can do like this :

[java]@Override
public void write(JmeExporter ex) throws IOException {
OutputCapsule oc = ex.getCapsule(this);
oc.writeSavableArrayList(new ArrayList(mySafeArrayList), “myListName”, null);
}

@Override
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
mySafeArrayList = new SafeArrayList<mySafeArrayListType>(mySafeArrayListType.class, ic.readSavableArrayList(“myListName”, null));
}[/java]

1 Like
@haze said: <3 That would be great.

I think you can do like this :

[java]@Override
public void write(JmeExporter ex) throws IOException {
OutputCapsule oc = ex.getCapsule(this);
oc.writeSavableArrayList(new ArrayList(mySafeArrayList), “myListName”, null);
}

@Override
public void read(JmeImporter im) throws IOException {
InputCapsule ic = im.getCapsule(this);
mySafeArrayList = new SafeArrayList<mySafeArrayListType>(mySafeArrayListType.class, ic.readSavableArrayList(“myListName”, null));
}[/java]

I thought I tried this and got an error. I’ll give it another go, as I was sure that would do it.

@t0neg0d said: I thought I tried this and got an error. I'll give it another go, as I was sure that would do it.

I had some troubles by the past too with my own emitters…i’ve choose to use a map cause influencers are unique for an emitter so a Map<String, Influencer> (with classname influencer for the string key) is savable without any error (for now) with something like this :

[java]@Override
public void write(JmeExporter ex) throws IOException {
super.write(ex);
OutputCapsule oc = ex.getCapsule(this);
oc.writeStringSavableMap(influencers, “influencers”, new HashMap<String, Influencer>(0));
}

@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule ic = im.getCapsule(this);
influencers = new ConcurrentHashMap<>((Map<String, Influencer>) ic.readStringSavableMap(“influencers”, new HashMap<String, Influencer>(0)));
}[/java]

@haze said: I had some troubles by the past too with my own emitters...i've choose to use a map cause influencers are unique for an emitter so a Map<String, Influencer> (with classname influencer for the string key) is savable without any error (for now) with something like this :

[java]@Override
public void write(JmeExporter ex) throws IOException {
super.write(ex);
OutputCapsule oc = ex.getCapsule(this);
oc.writeStringSavableMap(influencers, “influencers”, new HashMap<String, Influencer>(0));
}

@Override
public void read(JmeImporter im) throws IOException {
super.read(im);
InputCapsule ic = im.getCapsule(this);
influencers = new ConcurrentHashMap<>((Map<String, Influencer>) ic.readStringSavableMap(“influencers”, new HashMap<String, Influencer>(0)));
}[/java]

I went this route as well, but I think the benefits of direct access to the semi-static backing array is worth the effort of getting this right. Haven’t had a chance to do anything today, but will soon and this is the first thing I’m going to work on.

Speaking of things that have changed, here is a quick sample of some of what the radial velocity influencer is capable of:

[video]http://youtu.be/sX0SsSZ5GP4[/video]

You can do soooo much more with it… but the basics are pretty cool in itself.

1 Like