[Gadget] Replace spring default trees with random feature
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
[Gadget] Replace spring default trees with random feature
Basically the gadget would find spring default trees, and remove them, then replace in those locations, features from a list.
I wanted to do this myself, but tbh I don't really know how. Anyone wanna do it?
I wanted to do this myself, but tbh I don't really know how. Anyone wanna do it?
Re: [Gadget] Replace spring default trees with random feature
kind of similar:
http://code.google.com/p/conflictterra/ ... ner.lua#96
(replace metalrich features with mineable resources)
http://code.google.com/p/conflictterra/ ... ner.lua#96
(replace metalrich features with mineable resources)
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Gadget] Replace spring default trees with random feature
Thanks. That should give me a starting point. I don't actually need this, but I just thought it would be neat to have.
Re: [Gadget] Replace spring default trees with random feature
It's a nice idea, but there are many problems with outsourcing the tree development like this.
First, the behaviour of 3rd party features needs to be completed. I'm thinking mostly of fires and ability of units to demolish them.
Secondly, I think 3rd party features lack the ability of simplifying the structure when seen at large distance, thereby minimising lag. Having 7000 3rd party trees and bushes on a map causes a lot of lag on many systems.
So, in the end, a better solution would be to improve the default handling of trees in the engine. And in general, the correct way to develop the engine in general should be to in-source as much as possible, not to lua it. Why? Because things should be handled by the part that handles it best. Flexibility is overrated.
Well, that's my opinion. Go ahead and disagree.
First, the behaviour of 3rd party features needs to be completed. I'm thinking mostly of fires and ability of units to demolish them.
Secondly, I think 3rd party features lack the ability of simplifying the structure when seen at large distance, thereby minimising lag. Having 7000 3rd party trees and bushes on a map causes a lot of lag on many systems.
So, in the end, a better solution would be to improve the default handling of trees in the engine. And in general, the correct way to develop the engine in general should be to in-source as much as possible, not to lua it. Why? Because things should be handled by the part that handles it best. Flexibility is overrated.
Well, that's my opinion. Go ahead and disagree.
Re: [Gadget] Replace spring default trees with random feature
tons of other games have tons of trees and handle them better. It would be better to investigate WHY the features are expensive, how we can get lod on them and move on.Jools wrote:Translation:
You should not use features as the engine trees have lod.
Re: [Gadget] Replace spring default trees with random feature
I agree.smoth wrote: other games are expensive
Re: [Gadget] Replace spring default trees with random feature
?Jools wrote:I agree.smoth wrote: other games are expensive
Re: [Gadget] Replace spring default trees with random feature
It was just a response to the fact that you used a direct citation style and didn't reproduce my text in verbatim. You got the meaning of what I wrote right, but if you alter the contents you should use indirect style of citation.
Nothing personal, it seems to be a spring forum style that I'm unacquainted with, so I had to respond with my own miscitation.
Nothing personal, it seems to be a spring forum style that I'm unacquainted with, so I had to respond with my own miscitation.
- bobthedinosaur
- Blood & Steel Developer
- Posts: 2700
- Joined: 25 Aug 2004, 13:31
Re: [Gadget] Replace spring default trees with random feature
lod possibly? dont those "other games" use levels of polies based on LOD?
Re: [Gadget] Replace spring default trees with random feature
You don't need a gadget for that.
I already told you once you can just override the featuredefs and replace them with models.
And that I already did that for ZK, but never commited it cause the FPS-drop is just too huge currently (tested with trees with 300-500 triangles).
I already told you once you can just override the featuredefs and replace them with models.
And that I already did that for ZK, but never commited it cause the FPS-drop is just too huge currently (tested with trees with 300-500 triangles).
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Gadget] Replace spring default trees with random feature
I already tried that JK, but I didn't have any luck. Moreover, I would like to replace the engine trees with a slew of randomized trees instead of a single model.
@jools, you need to have another look at this: http://code.google.com/p/spring-feature ... 2Ffeatures
@jools, you need to have another look at this: http://code.google.com/p/spring-feature ... 2Ffeatures
Re: [Gadget] Replace spring default trees with random feature
Cool, a repository of 3rd party features to use. That's all nice, but I'm already using those AD0 trees.
I needed to work a lot more with them though, mainly scale them better and make their hitspheres cylindrical (cylY). I also added a featuredead tag and made them non-blocking.
So what's missing still is the fire gadget and an animation when they are demolished (but I guess that's not so important). I'm still working on the fire gadget.
My concern, and this was what I meant with my previous post, is that if we take a feature that's not a tree and make a tree of it, then spring doesn't anymore know that it's a tree, and all those things have to be made from scratch.
I needed to work a lot more with them though, mainly scale them better and make their hitspheres cylindrical (cylY). I also added a featuredead tag and made them non-blocking.
So what's missing still is the fire gadget and an animation when they are demolished (but I guess that's not so important). I'm still working on the fire gadget.
My concern, and this was what I meant with my previous post, is that if we take a feature that's not a tree and make a tree of it, then spring doesn't anymore know that it's a tree, and all those things have to be made from scratch.
Re: [Gadget] Replace spring default trees with random feature
There are like 20 different treedefs, you can give each one a diff model.Forboding Angel wrote:Moreover, I would like to replace the engine trees with a slew of randomized trees instead of a single model.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Gadget] Replace spring default trees with random feature
Yes, but all of them are so similar (there are only 2 distinct types) that most of us just picked one and used that one all over the entire map.
Re: [Gadget] Replace spring default trees with random feature
Much of that belongs in game logic(as in ba or whatever) not thrust upon all projects
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Gadget] Replace spring default trees with random feature
Well... duh.smoth wrote:Much of that belongs in game logic(as in ba or whatever) not thrust upon all projects
It's worth noting that your trees (the ones I used in riverdale) would make nice low poly replacements.
@jk, is there any chance you could point me towards the feature names for these 20 or so engine trees?
Re: [Gadget] Replace spring default trees with random feature
Code: Select all
-- $Id$
local DRAWTYPE = { NONE = -1, MODEL = 0, TREE = 1 }
local treeDefs = {}
local function CreateTreeDef(type)
treeDefs["treetype" .. type] = {
description = [[Tree]],
blocking = true,
burnable = true,
reclaimable = true,
energy = 25,
damage = 5,
metal = 0,
reclaimTime = 25,
mass = 20,
drawType = DRAWTYPE.MODEL,
object = ((type%4<1)and('tree0.s3o'))or((type%4<2)and('tree1.s3o'))or((type%4<3)and('tree2.s3o'))or('pine.s3o'),
footprintX = 2,
footprintZ = 2,
collisionVolumeTest = 0,
customParams = {
mod = true,
},
}
end
for i=0,20 do
CreateTreeDef(i)
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
return lowerkeys( treeDefs )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Re: [Gadget] Replace spring default trees with random feature
So no matter which tree is chosen, they have same parameters with regard to:
Some of these trees are bigger, some are small shrubbery. Those paramewters need to be set based on which tree is placed imo.
Code: Select all
height
mass
damage
featureDead
collisionVolumeScales