PDA

View Full Version : [?] How to make this kind of graphics



arthurprs
28-07-2007, 07:40 PM
Its glow ?

http://img403.imageshack.us/img403/7064/warmupwinner31vj4.th.jpg (http://img403.imageshack.us/img403/7064/warmupwinner31vj4.jpg)

:?
It's awesome

Huehnerschaender
28-07-2007, 08:51 PM
It seems like a normal effect bitmap (like I would use for particels) drawn with add method.... nothing unusual or special.

arthurprs
28-07-2007, 09:50 PM
It seems like a normal effect bitmap (like I would use for particels) drawn with add method.... nothing unusual or special.
Oh nice, how can i do that :) ?

how he made the "lines" linking the spaceship with the objects ?

czar
28-07-2007, 11:05 PM
You will be surprised how easy it is.

Here is an example using DanJetX made by Dirk

http://www.ericbehme.de/phpBB2DAN/viewtopic.php?t=268&highlight=particle

arthurprs
29-07-2007, 12:24 AM
You will be surprised how easy it is.

Here is an example using DanJetX made by Dirk

http://www.ericbehme.de/phpBB2DAN/viewtopic.php?t=268&highlight=particle

Links does not work here :cry:

czar
29-07-2007, 05:41 AM
Does for me.

Otherwise look in the forum there

DanJetX - Delphi Component Forum Index -> DanJetX graphics

and topic Particle Engine + Demo

EDIT: smaller link name thanks ;) (http://www.ericbehme.de/phpBB2DAN/viewtopic.php?t=268&start=0&postdays=0&postorder=asc&highlight=particle&sid=8531969531ecf7c616d8c1ed1a744853)

WILL
29-07-2007, 08:09 AM
Sorry czar, couldn't resist. :P Page-size altering posts drive me nuts. It's in my DNA I guess. :lol:

I was thinking particles too. The arcs seemed a bit too thick to be a simple lightning effect and general shape was too random to be a single bitmap (unless it was a series of arcs, but that would be a wasteful way to do it)

czar
29-07-2007, 09:47 AM
No Worries Will. How do you make those shorter links?

On my wide screen it doesn't cause the windows to stretch :)

WILL
29-07-2007, 10:14 AM
np, I'm just nit-picky sometimes :lol:

Just 'Edit' the post and you'll see that all I did was use the [url] tags. By using the = inside the opening tag you can have even a super-long url then just place the nice short pretty text inside and you're golden. ;)

arthurprs
29-07-2007, 07:36 PM
Does for me.

Otherwise look in the forum there

DanJetX - Delphi Component Forum Index -> DanJetX graphics

and topic Particle Engine + Demo

[url=http://www.ericbehme.de/phpBB2DAN/viewtopic.php?t=268&start=0&postdays=0&postorder=asc&highlight=particle&sid=8531969531ecf7c616d8c1ed1a744853]EDIT: smaller ]

^^ downloading the demo, THX!

The guy made those lines linking the spaceship with objects with particles ?


EDIT: I see the demos and code, its 3d on the pic is 2d :?

NecroDOME
29-07-2007, 09:02 PM
Its not glow, just a texture. Easy to make...

Huehnerschaender
29-07-2007, 11:09 PM
In only 10 minutes I got this result.

I used a simple circle, distorted it a little in paintshop and then in a little delphi application I draw the background and over it this circle, using add blendmode. The result is visible on the screen. It would look better with a little colortweaking and rotation and such stuff, but I guess the screen in the initial post uses the same technique. Very easy!


http://upload2.postimage.org/25370/test.jpg (http://upload2.postimage.org/25370/photo_hosting.html)

arthurprs
30-07-2007, 12:55 AM
In only 10 minutes I got this result.

I used a simple circle, distorted it a little in paintshop and then in a little delphi application I draw the background and over it this circle, using add blendmode. The result is visible on the screen. It would look better with a little colortweaking and rotation and such stuff, but I guess the screen in the initial post uses the same technique. Very easy!


http://upload2.postimage.org/25370/test.jpg (http://upload2.postimage.org/25370/photo_hosting.html)

What is blendmode ?

But how he made that lines ? They look perfect independent of the angle :?

Huehnerschaender
30-07-2007, 07:46 AM
The blendmode is the way the video card draws an image.

If you chose no blendmode, then its set to normal, which is, a black pixel is black and a green pixel is green.

There are several blendmodes available which also can be combined.

The blendmode I am talking about adds the pixel color of the circle to the pixel color of the background. I also draw the circle a little alphablended, too, so it is a little more transparency. This gives the effect shown in the picture.


The lines are as easy as the circle.

Basically, each frame you have to do the following:

- calculate the angle between the two circles.
- calculate a line from midpoint of circle1 to midpoint of circle2
- cut the line at the points where it intersects with the circle
Now you just have to inherit along this line and draw little particles with blendmode "add". You can vary the drawing position of each particle one or two pixels randomly so the line gets a litte distorted look like on your screenshot.

Basically thats it... nothing special, just a little math!

Greetings,
Dirk

arthurprs
30-07-2007, 07:24 PM
The blendmode is the way the video card draws an image.

If you chose no blendmode, then its set to normal, which is, a black pixel is black and a green pixel is green.

There are several blendmodes available which also can be combined.

The blendmode I am talking about adds the pixel color of the circle to the pixel color of the background. I also draw the circle a little alphablended, too, so it is a little more transparency. This gives the effect shown in the picture.


The lines are as easy as the circle.

Basically, each frame you have to do the following:

- calculate the angle between the two circles.
- calculate a line from midpoint of circle1 to midpoint of circle2
- cut the line at the points where it intersects with the circle
Now you just have to inherit along this line and draw little particles with blendmode "add". You can vary the drawing position of each particle one or two pixels randomly so the line gets a litte distorted look like on your screenshot.

Basically thats it... nothing special, just a little math!

Greetings,
Dirk

;) now i understand, thanks for all the help

just one more question, drawmodes like "BLENDMODE" is avaliable on SDL ?

Huehnerschaender
31-07-2007, 08:13 AM
I don't use SDL, but I am more than sure that those blendmodes are available, because they are essential for all kind of effects.

We have some SDL guys here on the forums who can surely help with this.

jasonf
31-07-2007, 11:44 AM
JEDI-SDL provides several functions for software blitting, addition/subtraction blitting and alpha. it is all in software and as such eats processor cycles.

For new stuff, you really should consider using 3D Hardware functions using OpenGL or DirectX as software 2D isn't quick enough.
Hardware copes with thousands of particles with utter ease compared to software. Also, decent rotation and scaling is available for free.. without slowing down the renderer.

If you don't think you can spare the time to learn about using the 3D stuff, then you can use the JEDI-SDL stuff. But be aware, it is a crutch. I still haven't made the leap to 3D for 2D and I really should have... and the longer I put it off, the less likely it is that I'll do it.

it sounds to me that you want to make some impressive visuals, I'd take the plunge and go hardware if I were you, better that than have to re-do all of your hard work when you realize you need better performance and can't get it.

arthurprs
31-07-2007, 04:47 PM
JEDI-SDL provides several functions for software blitting, addition/subtraction blitting and alpha. it is all in software and as such eats processor cycles.

For new stuff, you really should consider using 3D Hardware functions using OpenGL or DirectX as software 2D isn't quick enough.
Hardware copes with thousands of particles with utter ease compared to software. Also, decent rotation and scaling is available for free.. without slowing down the renderer.

If you don't think you can spare the time to learn about using the 3D stuff, then you can use the JEDI-SDL stuff. But be aware, it is a crutch. I still haven't made the leap to 3D for 2D and I really should have... and the longer I put it off, the less likely it is that I'll do it.

it sounds to me that you want to make some impressive visuals, I'd take the plunge and go hardware if I were you, better that than have to re-do all of your hard work when you realize you need better performance and can't get it.

Your post really helped, but i looked on SDL doc and do not found nothing about blending mode, i think i don't have to go hardware with this project but i hope you can tell me from start from using GPU power on 2d games

Huehnerschaender
31-07-2007, 05:06 PM
If you use a DirectX framework like Apshyre or DanJetX you get all 2D functions you need using the power of 3D GPUs. I know both engines and they are both great.

Asphyre in version 3.1 is a very good point to start. You can get it at www.afterwarp.net. There are also many examples around on the site.

DanJetX also has all you need to make a game in 2D. You can get it at
http://dan.mirgames.ru/main.php?page=djx

arthurprs
01-08-2007, 10:45 PM
If you use a DirectX framework like Apshyre or DanJetX you get all 2D functions you need using the power of 3D GPUs. I know both engines and they are both great.

Asphyre in version 3.1 is a very good point to start. You can get it at www.afterwarp.net. There are also many examples around on the site.

DanJetX also has all you need to make a game in 2D. You can get it at
http://dan.mirgames.ru/main.php?page=djx

I don't like VCL i hate it, both are component based :? ?

arthurprs
01-08-2007, 10:55 PM
If you use a DirectX framework like Apshyre or DanJetX you get all 2D functions you need using the power of 3D GPUs. I know both engines and they are both great.

Asphyre in version 3.1 is a very good point to start. You can get it at www.afterwarp.net. There are also many examples around on the site.

DanJetX also has all you need to make a game in 2D. You can get it at
http://dan.mirgames.ru/main.php?page=djx

I don't like VCL i hate it, both are component based :? ?

shit :!:

Asphyre is fast¬?¬?¬?¬?¬?¬? :twisted: :twisted: :twisted:

:arrow: Awesone :!:

i think i will have to live with VCL :roll:

pstudio
01-08-2007, 11:08 PM
The newest version of Asphyre (4.1) isn't vcl so you can use that instead. However it may be easier to use the older version pointed out by Huenschaender

Huehnerschaender
01-08-2007, 11:09 PM
Oh, you should reconsider your opinion about VCL... It is not a way of being fast or not.. its just a way of interface to the user, which is in this case, the programmer.... it does not say a single thing about speed.


Do you remember the game Wicked Defense? You posted in the thread.... You said the game is awesome.... well..... its made with Asphyre :)

The frameworks I suggested are both awesome... each in its own way.... and they are fast as hell too!

Greetings :)

arthurprs
01-08-2007, 11:25 PM
Oh, you should reconsider your opinion about VCL... It is not a way of being fast or not.. its just a way of interface to the user, which is in this case, the programmer.... it does not say a single thing about speed.


Do you remember the game Wicked Defense? You posted in the thread.... You said the game is awesome.... well..... its made with Asphyre :)

The frameworks I suggested are both awesome... each in its own way.... and they are fast as hell too!

Greetings :)

I think i don't have problems with a nonVCL program anymore and it will save 400kb on .exe size