Trees moving in the wind

Trees moving in the wind

Requests for features in the spring code.

Moderator: Moderators

Post Reply
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Trees moving in the wind

Post by submarine »

I'm not sure if this has already been suggested, I did a quick search without any result so I decided to post this idea:

I think trees moving in the wind would be a great way to make maps look more alive. Maybe tree movement could be linked to the current wind speed/direction to get an even more realistic feeling. I cant judge on the amount of work required to implement this, it does not sound very difficult to me (for someone who's more familiar with the engine - I would try to codeit myself but I think I better spend my time on AAI)

What do other ppl think?
User avatar
Cremuss
Posts: 364
Joined: 28 Oct 2006, 21:38

Re: Trees moving in the wind

Post by Cremuss »

I think it's a bit useless for an RTS engine. It sounds more an extra feature than a needed one actually.

I'm more interested by a new shield shader and a new shadow engine like Argh said :-)
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Trees moving in the wind

Post by FLOZi »

I'm more interested in a better grass shader
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Trees moving in the wind

Post by CarRepairer »

The answer my friend, is trees moving in the wind.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Trees moving in the wind

Post by yuritch »

This could be done if features (trees, and other things too) could have COB scripts running for them. As it is now, features are static, and can only change while taking damage (I'm not sure about the default trees however, many maps use custom tree features instead anyway).
This also means that moving trees are already possible if using something like Argh's World Builder (or some other piece of lua that spawns them), when they are actually neutral units that can have scripts and so can react to many things including wind.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Trees moving in the wind

Post by AF »

The trees have the feature names tree1- tree16, thus a lua gadget could replace all instances of the trees with neutral tree units.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Trees moving in the wind

Post by Tobi »

Do realize that anything which needs any update function being run at all is a lot more CPU intensive then anything which doesn't.

Normal trees only get in the list of features that require update when they start burning or falling down, and until that they are only rendered. (ie. feature update loop only goes through geos then I think)

IOW, I don't think putting 5000 moving trees on a map would be good idea :-)
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: Trees moving in the wind

Post by submarine »

I'm not very familiar with all these new LUA capabilities, maybe moving trees can be done via LUA scripting but that was not what i meant. Having 1000s of trees as units is not what I was talking about, I was rather thinking about updating the orientation of trees according to current wind every few frames hardcoded in the engine. It is not that performance hungry, is it?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Trees moving in the wind

Post by AF »

Only the trees currently onscreen need to move and only those close enough for it to be noticed
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Trees moving in the wind

Post by Tobi »

Which means you need to build entire new infrastructure to allow for mod/map defined unsynced animation that's only executed when on screen and close enough to camera :-P

Or hardcode it for built in trees but that's against general spirit of making things mod-definable :-)

Shouldn't be too hard tho to just glRotate() every built in tree thats rendered a bit in wind direction, if someone is bored.
submarine
AI Developer
Posts: 834
Joined: 31 Jan 2005, 20:04

Re: Trees moving in the wind

Post by submarine »

Tobi wrote: Shouldn't be too hard tho to just glRotate() every built in tree thats rendered a bit in wind direction, if someone is bored.
That's what I wanted to do...
User avatar
tizbac
Posts: 136
Joined: 19 Jun 2008, 14:05

Re: Trees moving in the wind

Post by tizbac »

I think that spring needs multiple lights support with shadows(very good for night maps) and allowing mod defined terrain & water shader
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Trees moving in the wind

Post by Tobi »

Mods/maps can already override shaders atm cause they are also loaded through the VFS.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Re: Trees moving in the wind

Post by Noruas »

Can't you have multiple features inside one looped code instead of having multiple features with each one having a unique code dedicated to it?
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: Trees moving in the wind

Post by REVENGE »

Can't we just allow MoveCtrl be applied to features as well? That way we could set orientation, move features around, have rockslides, etc.
Post Reply

Return to “Feature Requests”