Page 1 of 1

Newest particle effect creation: Pentagram

Posted: 17 Feb 2008, 01:20
by Crush
A pentagram on the ground created with 5 linear emitters:
Image

Code: http://rafb.net/p/PxXzuw40.html
(requires latest SVN version)

To create this I had to use a little trick to create linear emitters with a desired angle and length. The trick was to create an emitter that spawns invisible particles in the desired angle with powers between 0 and the desired length and a lifetime of 1. Then you can give these particles child emitters which spawn the visible particles you are seeing.

Now I just had to create 5 emitters like that and calculate their positions and angles with a bit applied trigonometry and a pocket calculator.

Re: Newest particle effect creation: Pentagram

Posted: 17 Feb 2008, 01:32
by Crush
With a circle around it:
Image

Code: http://rafb.net/p/ppwktx74.html

A circle-shaped emitter can be created with the same technique. The only difference is that instead of a fixed angle with a variable power you use a variable angle (between 0 and 360) and a fixed power (the radius).

The circle emitter is the first emitter in the file.


When you make both the angle and the power variable you will get a filled circle with a notable concentration in the center (this one is without the pentagram):
Image

Re: Newest particle effect creation: Pentagram

Posted: 17 Feb 2008, 08:06
by GonzoDark
wow, that looks great ;-)

// GonzoDark

Re: Newest particle effect creation: Pentagram

Posted: 17 Feb 2008, 08:38
by Platyna
In nomine dei nostri Satanas luciferi excelsi I like it. :twisted:

Regards.

Re: Newest particle effect creation: Pentagram

Posted: 17 Feb 2008, 11:00
by Len
Platyna wrote:In nomine dei nostri Satanas luciferi excelsi I like it. :twisted:

Regards.
Ave Satanas :twisted: I also like it

Re: Newest particle effect creation: Pentagram

Posted: 17 Feb 2008, 11:41
by i
Ave Crush :) I do like it :P

Now try something harder... The Sierpinski Triangle Fractal.
Image

Re: Newest particle effect creation: Pentagram

Posted: 17 Feb 2008, 13:06
by Crush
I am afraid filled triangular shapes are not possible with the particle engine. The closest thing I could imagine are filled circle segments ("pizza slices"). These can be created by creating a filled circle and limit the range of the angle.

But I think that it should be possible to create a filled parallelogram by chaining two linear emitters.

Re: Newest particle effect creation: Pentagram

Posted: 17 Feb 2008, 16:06
by Jaxad0127
Technically, as you take the fractal further, the filled parts get smaller and more separated. All we'd need is the outline of the triangles.

Re: Newest particle effect creation: Pentagram

Posted: 18 Feb 2008, 03:02
by 5t3v3
the circle of the pentagram lacks perspective
I found this on the web, it's not the right angle, but just to give an idea ....
Image
Notice that the middle of the perspective (line cc) is higher then the middle of the flat image (line ee) so it's not a perfect ellips, the bottom half is bigger then the top half. Of course the problem is that the tiles used in the game don't respect the perspective either, but since they are squared it doesn't stand out that much.

Re: Newest particle effect creation: Pentagram

Posted: 18 Feb 2008, 14:16
by Crush
The perspective is correct. We are using orhogonal perspective in TMW, not vanishing point perspective. Introducing objects in vanishing point perspective would look wrong.

Re: Newest particle effect creation: Pentagram

Posted: 18 Feb 2008, 19:10
by Modanung
Nice. The circle will come in handy no doubt.