Random sized default trees

Random sized default trees

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
SirArtturi
Posts: 1164
Joined: 23 Jan 2008, 18:29

Random sized default trees

Post by SirArtturi »

We argued with smoth about trees being ugly or not in one topic and one idea arised:

Spring generated(default) trees could, at least have some randomized size and height(And if im not wrong, also rotation) variance algorithms. You can do this kind of stuff manually with custom features with tdf.

Spring default trees looks all the same, in size, and therefore highlights the ugliness...
User avatar
1v0ry_k1ng
Posts: 4656
Joined: 10 Mar 2006, 10:24

Re: Random sized default trees

Post by 1v0ry_k1ng »

trees are ugly unless you have graphics and most importantly shadows up to full, in which case they look quite ok. they would look much much better if they swayed dynamically to the same wind deciding wind-gen direction and income, but different sizes would be a good first step
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Random sized default trees

Post by jK »

I don't see any reason why to continue the work on the distinction of units, features & trees. IMO everything should be unified for simplicity and flexibility.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Random sized default trees

Post by Argh »

I 100% agree with you, jK. I really wish it was all the same stuff, just different tags. There's very little about Features that's even slightly necessary atm, other than the shadowmaps working properly for them, but not for Units.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Random sized default trees

Post by FLOZi »

Aren't features more efficient than gaia units?
jK wrote:-> LOD system for features is currently not doable, only if you use gaia units, which will increase the cpu overhead dramatically.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Random sized default trees

Post by smoth »

FLOZi wrote:Aren't features more efficient than gaia units?
yes they are esp since last version.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Random sized default trees

Post by jK »

FLOZi wrote:Aren't features more efficient than gaia units?
jK wrote:-> LOD system for features is currently not doable, only if you use gaia units, which will increase the cpu overhead dramatically.
unification != the same

unification -> universal :
  • including or covering all or a whole collectively or distributively without limit or exception; especially : available equitably to all members of a society <universal health coverage>
  • adapted or adjustable to meet varied requirements (as of use, shape, or size) <a universal gear cutter> <a universal remote control>
Means: features should not become units, neither should units become features, instead both should give their advantages in one pool, so both can select and profit of those.

So atm there are 4 separate model renderers: units, features, trees and projectiles.
This doesn't make any sense at all and it makes it nearly impossible to include new features, debugging, etc.
Instead there should be just one renderer for all of those types - yeah, even tress should be just _models_.
Also features and units could share optimizations, so an energy-storage is more feature-like than unit-like. And atm trees get some special optimizations feature don't get etc.
Last edited by jK on 04 Dec 2009, 21:49, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Random sized default trees

Post by Argh »

So atm there are 4 separate model renderers: units, features, trees and projectiles.
This doesn't make any sense at all and it makes it nearly impossible to include new features, debugging, etc.
Instead there should be just one renderer for all of those types - yeah, even tress should be should be just _models_.
Also features and units could share optimizations, so an energy-storage is more feature-like than unit-like. And atm trees got some special optimizations feature don't get etc.
I agree with all of that.

Trees as models? Hell yes. I don't have all the models for a complete deciduous "set", I will work on that. I have all sorts of pines.

And it would be nicer than hell to have these behavioral states be settable via Lua, btw. Then I can create a Unit, do some "animation" during the first frame of its existence to randomize Piece positions, then declare it's a Tree (obviously, part of that requires that Piece coordinates / rotations be saved in a static location at that point, so it will preserve them without having to do any further computation). Then we could have our cake and eat it, too.

That would be fricking awesome.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Random sized default trees

Post by zerver »

I also agree. There are some issues to work out of course. We would need a unit generator that replaces trees with similar looking units to maintain compatibility with old maps.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Random sized default trees

Post by FLOZi »

Ah, now I see what you mean. 8)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Random sized default trees

Post by smoth »

zerver wrote:I also agree. There are some issues to work out of course. We would need a unit generator that replaces trees with similar looking units to maintain compatibility with old maps.
umm that is REALLY easy.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Random sized default trees

Post by Tobi »

Just either define the trees as some (custom?) internal model format (with custom renderer?) and assign this as models to the tree units, or stuff some replacement tree models in springcontent.sdz :P

Either way getting rid of the separation would be good, but indeed first (probably) the unit code would need to get the functionality that is unique to features now (burning, geo smoke, not updating if there's nothing to update, and probably some more things). And some measurements of the performance change would be good too. (The units lists in CQuadField would suddenly contain a lot more objects; although possibly here the separation could be kept in some way, if combining units and features appears to be problematic.)

Features already use unit rendering code AFAIK so that part shouldn't be hard to combine even more I'd say.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: Random sized default trees

Post by Saktoth »

Rotation is the most important thing in making trees look less uniform. Though the spring default ones do have a degree of preshading IIRC so it may look like they are lit from different directions.

As a workaround to give your features rotation, create units, rotate them, and then kill them, making the feature the corpse. Corpses inherit rotation.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Random sized default trees

Post by Argh »

Spring defaults aren't preshaded. They just are not borked, shadowmap-wise. And Feature rotation's fixed in Buildbot Spring. I'm doing what you're suggesting as a workaround for now, though :-)
Post Reply

Return to “Feature Requests”