Forest fires gadget - Page 2

Forest fires gadget

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Forest fires gadget

Post by Jools »

http://www.youtube.com/watch?v=svLywxCq ... ture=feedu

Here's how it looks now. It's still work in progress though.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Forest fires gadget

Post by knorke »

funky! maybe the burn effect should stay in place a bit longer.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Forest fires gadget

Post by Jools »

Yes, I agree. There's a delicate balance though between the fire fying out and spreading beyond control.

If it burns longer then on the one hand, there will be more CEG:s that have to be rendered. But on the other hand, the fire will spread more slowly and therefore there will be fewer trees on fire ssimultaneously. Or I think it goes something like this. But if it spreads too much then it will make the whole game lag out. Maybe there should be some kind of an emergency stop or something.

Actually the mechanism is already out of control, because I can't really predict how it spreads. I've created a Frankenstein's monster.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Forest fires gadget

Post by PicassoCT »

so real, even heard the com cough from all the smoke ;)

Srsly, lacks drama, a real fire just burns for a while, gathering power. It shouldnt wander that fast, and it needs coloured light, like behe used it for his lava map (dont steal it, its open source) You could add ash and fire flakes. And overdramatize. This is not a fire simulation.
This is what hollywood shows for fires, so you need to make it like a opera, a slow build up, a big crescendo. Imagine how it would burn if everythig was made of paper..... add "burned decals" basically ashdunes.. and still glowing tree trunks and wood pieces.


Makes me wish we could change maplighting ingame.. some red and orange light, would set the mood for a "Only you can preven them" campaign.

I wouldnt write so much if it werent good.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Forest fires gadget

Post by knorke »

Makes me wish we could change maplighting ingame.. some red and orange light, would set the mood for a "Only you can preven them" campaign.
http://springrts.com/wiki/Lua_UnsyncedCtrl#Rendering
Spring.AddMapLight
Spring.AddModelLight
I for one will welcome the heap of disco maps that 0.83 will bring.

I think too many CEG will cause trouble, lag and eventually some particles stop being drawn. Maybe gl can be used to draw fire sprites or something.
Or disregard the spreading part and just call it "features on fire" and then add some custom tags to features that can be used.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Forest fires gadget

Post by PicassoCT »

maybe use that spherical distortion shader everyone uses over the fire..
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Forest fires gadget

Post by Jools »

Been trying to complete the forest fires widget, but it only leads to huge lag. It's not even the cegs, even when I disabled them the fps goes down after a fire, and it doesn't recover even on LuaRules reload. It seems after all that the native gadget is quite good. Only thing I managed to do better is leave a wreck after the fire though.

Will keep on trying for a while, but I think it's more important to keep the game playable than to induce lag.

And those new effects may be nice, but I think they only work with advanced shading enabled, and I can't even get that to work in spring 83.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Forest fires gadget

Post by PicassoCT »

Jools wrote:Been trying to complete the forest fires widget, but it only leads to huge lag. It's not even the cegs, even when I disabled them the fps goes down after a fire, and it doesn't recover even on LuaRules reload.
This .. sounds strange. Lua memory leak, it exists?

Or something works on, the fire never extingiuished burns on in the DRAMs

As always post infolog (no matter how useless it is) Behave according the teachings of old, young one. How else shall we be able to complete the reply-ritual, and link you to outdated documentation?
User avatar
zoggop
Posts: 289
Joined: 07 Sep 2010, 18:47

Re: Forest fires gadget

Post by zoggop »

Made any progress? Forests that don't burn all at once and use non-engine trees would be awesome.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Forest fires gadget

Post by smoth »

zoggop wrote:Made any progress? Forests that don't burn all at once and use non-engine trees would be awesome.
But is ba gonna implement it? Because that is the real question.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Forest fires gadget

Post by Forboding Angel »

All features support flammable. They just have to have it set in their featuredef.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Forest fires gadget

Post by PicassoCT »

if map contains grass, set grass aflame=true

spawn selfiluminating detaltexture.. spawn sparks.. spawn smoke ... apply wind... if fire touches tree.. Inferno..

What you actually need are shaders, distort and bloom are your fires friend!
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Forest fires gadget

Post by Jools »

Forboding Angel wrote:All features support flammable. They just have to have it set in their featuredef.
Yes, but you can't control how a fire spreads that way, and there is no wreckage then either (it seems to skip featuredead)
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Forest fires gadget

Post by Jools »

PicassoCT wrote:if map contains grass, set grass aflame=true

spawn selfiluminating detaltexture.. spawn sparks.. spawn smoke ... apply wind... if fire touches tree.. Inferno..

What you actually need are shaders, distort and bloom are your fires friend!
Yeah, but then you would have to follow each spark, I think that's too complicated. What I did was instead look for features within a distance from the burning one, and set them on fire with some probability. Also the area to look in would be dependent on the wind.

I couldn't work with detail textures after new spring, and besides my gpu died, so have to wait until I get a new one until I can work more on this.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Forest fires gadget

Post by PicassoCT »

probability alone is bad... and it looks unrealistic to have a tree set aflame on lush green grass.

My advice.. stop looking on the features alone. Make the Flames travell over the grass in a game of life like way, the wind only lengthening the lifespan of some, extingiushing others earlier.

I know that sounds like a lot of work, and it is. But it definatly (with some grounddecals and cegs[to get the ground red Glowing]) will look more like a fire then some mysterious fire column travelling from tree to tree, yelling at bystanding princess to take there shoes off, because it swept the floor just seconds ago.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Forest fires gadget

Post by Forboding Angel »

Jools wrote:
Forboding Angel wrote:All features support flammable. They just have to have it set in their featuredef.
Yes, but you can't control how a fire spreads that way, and there is no wreckage then either (it seems to skip featuredead)
No it doesn't (at least I'm pretty sure it doesn't). However, if your featuredead feature is flammable, when it switches to that, it will burn that feature too.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Forest fires gadget

Post by Jools »

I checked that my featuredead definition was set to not flammable, and it was not created. When I did it with my own gadget, then I managed to create the featuredead feature.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Forest fires gadget

Post by Google_Frog »

PicassoCT wrote:My advice.. stop looking on the features alone. Make the Flames travell over the grass in a game of life like way, the wind only lengthening the lifespan of some, extingiushing others earlier.
Set precision fires to send deadly-flame-gliders at your opponent.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Forest fires gadget

Post by knorke »

Google_Frog wrote:
PicassoCT wrote:My advice.. stop looking on the features alone. Make the Flames travell over the grass in a game of life like way, the wind only lengthening the lifespan of some, extingiushing others earlier.
Set precision fires to send deadly-flame-gliders at your opponent.
nub, make vulcan!
Image
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Forest fires gadget

Post by PicassoCT »

but if the fire gliders life of the land.. than they cant feed of ash decals left behind by there forerunners.
Post Reply

Return to “Lua Scripts”