Java-Gaming.org
Java4K - to go         Javadoc:
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, peek at the official java tutorials or join us at irc #jgo.
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  particle effects  (Read 1350 times)
0 Members and 1 Guest are viewing this topic.
Offline Nate

JGO Neuromancer
****

Posts: 1033
Medals: 26


mooooo


« on: 2010-03-07 03:42:32 »

I'm trying to get some nice particle effects for a game. I've played around a bit and I am having a lot of trouble getting anything that looks nice. I then decided to mimic one of the effects I found in a particle system tool. They combine these two images:




Here are my results:



On the left is the particle system tool, with a feature called "intense" enabled. The middle is the same tool but without "intense". The right is what I have implemented using GL_SRC_ALPHA, GL_ONE.

How could I mimic the "intense" blending that the tool is doing? I'd like to do it as simple as possible.

Also, any other tips on how to get nice particle effects would be helpful.

Offline indexunknown

Jr. Member
**

Posts: 83
Medals: 1



« Reply #1 on: 2010-03-07 03:55:17 »

aren't the glow and blur post processing effects those that make the particles look shiny and such.
Online Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5509
Medals: 204


Hand over your head.


« Reply #2 on: 2010-03-07 09:25:57 »

Additive blending, which is either glBlendFunc(GL_SRC_ALPHA, GL_ONE) or glBlendFunc(GL_ONE, GL_ONE) depending on your needs.

I just saw you already did that. Anyway, just do it ahead-of-time, and render the resulting texture.

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Games published by our own members! Go get 'em!
Offline Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3478
Medals: 39


Game Engineer


« Reply #3 on: 2010-03-07 11:28:26 »

Additive blending, which is either glBlendFunc(GL_SRC_ALPHA, GL_ONE) or glBlendFunc(GL_ONE, GL_ONE) depending on your needs.
Yeah I'd mess around with blending combinations, and if you can't get it exactly then you can always create what you want in Photoshop and just draw it.

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Online Riven
« League of Dukes »

JGO Kernel
*****

Posts: 5509
Medals: 204


Hand over your head.


« Reply #4 on: 2010-03-07 11:31:13 »

Yeah, the thing is, you'd have to render the result to a texture, because you probably don't want to render the 'combination' through additive blending. You'd quickly reach 'white' pixels. One benefit of additive blending is that you don't need to depth-sort your particles. Have fun.

Hi, appreciate more people! Σ ♥ = ¾

Learn how to award medals... and work your way up the social rankings
Offline Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3478
Medals: 39


Game Engineer


« Reply #5 on: 2010-03-07 11:33:52 »

Yeah, the thing is, you'd have to render the result to a texture, because you probably don't want to render the 'combination' through additive blending. You'd quickly reach 'white' pixels. One benefit of additive blending is that you don't need to depth-sort your particles. Have fun.
Yeah, that's a good point. For this reason my particle systems are almost always just a Sprite being drawn over and over, with color changes (glColor4f), rotations, and scales applied. This works pretty well for mostly anything, and there is very little in-engine processing.

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Offline Nate

JGO Neuromancer
****

Posts: 1033
Medals: 26


mooooo


« Reply #6 on: 2010-03-07 23:10:06 »

Have fun.

I am trying, but it isn't working out so far. :p I hadn't much luck with nice looking effects by creating my own assets in Photoshop, so I looked around at some particle tools. I was hoping to get somewhere using their assets, but even that failed! I guess I'll play around in Photoshop with the spiky particle and try to get it to blend like I want. Does anyone know how to mimic GL_SRC_ALPHA, GL_ONE in Photoshop?

I've built a pretty sweet particle engine tool, which I'll share when it is done. I guess if you're bored you could take a sneak preview. I might as well ask how you guys feel about my triangle-based particles. I use degenerate triangles and do the translate/rotate/scale math to render with glDrawArrays. I was a little worried (on Android) since it is a bit more work than just point sprites, but I'm hoping it isn't that much worse. Haven't had a chance to test it yet.

Offline Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3478
Medals: 39


Game Engineer


« Reply #7 on: 2010-03-08 00:20:35 »

Does anyone know how to mimic GL_SRC_ALPHA, GL_ONE in Photoshop?
Just try out the different opacity options (put the two in different layers and then give the top one opacity and mess with Multiply, Overlay, etc.).

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Offline Nate

JGO Neuromancer
****

Posts: 1033
Medals: 26


mooooo


« Reply #8 on: 2010-03-08 02:28:09 »

I did. I posted an image showing the results I get with GL_SRC_ALPHA, GL_ONE. I believe GL_ONE, GL_ONE looked the same. Using the same images, it doesn't look as good as the particle tool's blending.

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.32 seconds with 21 queries.