Fire

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
say113
Gnoblar
Posts: 5
Joined: Sat Jan 08, 2005 5:59 pm
Location: Bristol, UK
Contact:

Fire

Post by say113 » Wed Jan 12, 2005 8:31 pm

Hey guys,

Just wondering if anyone has (or know someone who has) made any excellent fire effects (like a log fire) using the particle system. I looked around the boards..but cannot find any mention of such a thing. Hopefully there isn't one that I've missed :D


Thanks

User avatar
eugen
OGRE Expert User
OGRE Expert User
Posts: 1422
Joined: Sat May 22, 2004 5:28 am
Location: Bucharest
x 8
Contact:

Post by eugen » Wed Jan 12, 2005 10:29 pm

I know i did, somehow in the past...i dont know if i still have the code for it! it was a particle system so dont expect using it for performance...i just liked to way it looked ! :)

User avatar
leedgitar
OGRE Community Helper
OGRE Community Helper
Posts: 61
Joined: Wed Jan 22, 2003 1:58 am
Location: Baltimore, MD
Contact:

Post by leedgitar » Wed Jan 12, 2005 10:34 pm

Have you checked out the Smoke demo that comes with Ogre? Perhaps the particle system used for that could be tweaked to your liking.

User avatar
eugen
OGRE Expert User
OGRE Expert User
Posts: 1422
Joined: Sat May 22, 2004 5:28 am
Location: Bucharest
x 8
Contact:

Post by eugen » Wed Jan 12, 2005 10:43 pm

here is a image of what i had in mind and the fire.particle file
hope it will help u...u can adjust it at your on will :)
Image
http://www.laserrollen.de/eu/OgreForum/Fire.particle

it should work! this is a 0.13 program but the resources must be there for this new version!

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho » Thu Jan 13, 2005 12:00 am

Have you seen the fire in SoulCalibur II ? That's a very realistic fire (at least for me) that is done combining a simple fire particle system, with an animated fire texture (the animation is quite simple -- fire waving). If you have the chance, take a look at that fire :) (you can see it around the Charade character)
Image

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard » Thu Jan 13, 2005 12:30 am

Nice looking fire eugen!

AssiDragon
Greenskin
Posts: 145
Joined: Wed Apr 28, 2004 12:10 pm
Location: Hungary
Contact:

Post by AssiDragon » Thu Jan 13, 2005 1:02 am

Nice work eugen. Mine (http://assidragon.uw.hu/tempstore/flames.jpg ) doesn't look the same good lol, seems there's more to learn at this part too ;)
Hope is the first step on the road to disappointment.

User avatar
alphageek
Gnome
Posts: 365
Joined: Mon Jan 03, 2005 11:56 am

Post by alphageek » Thu Jan 13, 2005 3:37 am

I was fiddling with this a while ago. You can get quite different effects based on what texture you use.

Image

Image

The first one looks much better when animated. I would encourage you to experiment with a noisy texture, unless you want a more amorphous glow-style fire.
Axiomatic: action-packed space shooter
TaskScheduler 0.3

nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz » Thu Jan 13, 2005 6:34 am

alphageek: very cool effects!

User avatar
epopov
Halfling
Posts: 85
Joined: Tue Jun 10, 2003 2:57 pm
Contact:

Post by epopov » Thu Jan 13, 2005 8:23 am

Another one:

Image

The particle script:

Code: Select all

TRPlayer/Torch
{
    	material		TRPlayer/Fire
    	particle_width  	250
    	particle_height 	250
    	cull_each       	false
    	quota           	50
    	billboard_type  	point
    
    	// Area emitter
    	emitter Point
    	{
		angle               		15
        	emission_rate       		25
        	time_to_live_min        		1
        	time_to_live_max        		1
        	direction           		0 -1 0
        	velocity_min        		100
        	velocity_max        		500
	}

	affector Scaler
   	{
		rate 	-200
   	}

}
The material script:

Code: Select all

material TRPlayer/Fire
{
	technique
	{
		pass
		{
			lighting off
			scene_blend add
			depth_write off

			texture_unit
			{
				texture flare.tga
				tex_address_mode clamp
			}
		}
	}
}
The tga used in the material is here: http://www.evpopov.com/images/flare.tga

Note: if you use the particle script, you may need to modify the unit scale (particle width/height, velocity min/max), as in my prog 1 meter is approx 500 units.

say113
Gnoblar
Posts: 5
Joined: Sat Jan 08, 2005 5:59 pm
Location: Bristol, UK
Contact:

Post by say113 » Thu Jan 13, 2005 6:58 pm

Wow, some truly awesome stuff there guys =) Thanks very much for your fast responses and I certainly look forward to trying them out =)

User avatar
alphageek
Gnome
Posts: 365
Joined: Mon Jan 03, 2005 11:56 am

Post by alphageek » Thu Jan 13, 2005 11:21 pm

Epopov that's awesome.
I'd love to see that with a glow billboard: I find it helps lighting look softer.
:)
Axiomatic: action-packed space shooter
TaskScheduler 0.3

User avatar
charlie
Greenskin
Posts: 146
Joined: Mon Nov 15, 2004 1:43 pm
Location: Austria
Contact:

Post by charlie » Sun Jan 16, 2005 9:09 pm

The fire in the screenshot posted by Epopov looks really great.

I wanted to get some hands on that and tried it myself (first time I was dealing with particles),
So I toke the code from the particle demo of ogre, and the files posted by you.
Although I played with the parameter Epopov mentioned I didn't get an effect that was as impressiv as on the screenshots.

I wanted to ask if you could recomment some parameters.
I can't say what's a meter in my demo, but I'm using the car form ogreode and the crate.mesh to see how big things get.

Any ideas how I should choose the params?

User avatar
epopov
Halfling
Posts: 85
Joined: Tue Jun 10, 2003 2:57 pm
Contact:

Post by epopov » Sun Jan 16, 2005 10:56 pm

How to proceed to see the fire effect in the Ogre smoke demo:

- put the particle script in the Media/particle folder. Modify the direction vector from '0 -1 0' to '0 1 0'
- put the material script in the Media/materials/scripts folder
- put the tga file in the Media/materials/textures folder
- in the Smoke.h file from the smoke demo, modify the name of the particle script from "Examples/Smoke" to "TRPlayer/Torch" and comment the line which sets the SkyDome ('mSceneMgr->setSkyDome(...)'). Indeed, if you don't do this, the torch will not look good because it will be too bright because of the blue/white background. It's better to see it on a black background.

Recompile and run, that should work.
If you want to modify the size of the particles, act simultaneously on (for eg, divide all them by 10):
- particle_width, particle_height, velocity_min, velocity_max, rate

HTH

User avatar
TobascoSpam
Halfling
Posts: 86
Joined: Thu Nov 18, 2004 2:30 am
Location: Texas

Post by TobascoSpam » Wed Feb 02, 2005 6:13 pm

There's a fire shader and some other shaders at: http://www.cgshaders.org/shaders/

say113
Gnoblar
Posts: 5
Joined: Sat Jan 08, 2005 5:59 pm
Location: Bristol, UK
Contact:

Post by say113 » Wed Feb 02, 2005 7:12 pm

Oh very nice :D

Plenty of other awesome GPU based effects there too. Cool find :)

Post Reply