Page 1 of 1
Animating buildings and ruins
Posted: 29 Nov 2012, 02:48
by VelvetClaw
Hi and sorry for the repeat post, but I have another question:
I have been tasked to create buildings in Blender for a 19th century conflict mod, but I am unsure just how buildings and ruins are created.
- If I create a windmill like the following, does it follow the same rule for units as well?
- If I want the building to have ruins, is it possible to get the building mesh to deform itself? or do I have to make different parts such as pillars and other items?
- How do I get ruins to change their colour? do I need to code in alternate pngs for each set of ruins?
-How about walls asnd bridges? does anyone know how to make climbable walls with gates and towers, like the following?

Re: Animating buildings and ruins
Posted: 29 Nov 2012, 08:57
by PicassoCT
A building is basically a unit that cant move. There is some more stuff to it (like the yardmaps) but thats basically it. It also has some additonal functions in spring.
QueryBuildSpot
QueryNano
StartBuilding
StopBuilding
No StartMoving StopMoving
Re: Animating buildings and ruins
Posted: 29 Nov 2012, 09:36
by Anarchid
- If I want the building to have ruins, is it possible to get the building mesh to deform itself? or do I have to make different parts such as pillars and other items?
As mentioned above, building is just a unit that can't move (by normal means). So if you want ruins, you give it a death animation and a corpse. The latter, then, represents ruins.
Re: Animating buildings and ruins
Posted: 30 Nov 2012, 00:15
by Forboding Angel
It should be noted that a unit can have an infinite chain (or loop) of corpses.
Re: Animating buildings and ruins
Posted: 30 Nov 2012, 01:03
by VelvetClaw
Thanks a lot!
I have three mods lined up for Spring, all historical, ranging from BCE300 to 1900CE. I had to make sure that I knew what I was supposed to be doing, so I just had to ask.
Re: Animating buildings and ruins
Posted: 30 Nov 2012, 14:53
by SinbadEV
Two things I don't see mentioned:
No Mesh Deformation... anything you want to move needs to be a separate "piece" in the model.
"Buildings" can't move (as in trans-locate) but they can still animate... "Features" cannot animate.
As far as climbable walls and ladders and gates and such, as well as having the texture change over time or with damage... all that stuff is possible with some clever Lua scripting.
Re: Animating buildings and ruins
Posted: 30 Nov 2012, 18:52
by zwzsg
Yes, no mesh deformation* is indeed what I feel as a the biggest drawback of Spring animation.
* except if you write the animation as a shader
SinbadEV wrote:As far as climbable walls and ladders and gates and such, [...] all that stuff is possible with some clever Lua scripting.
Not really. Yes, you could have a lua gadget "movectrl" units, but it's such a crude method you won't get any satisfactory results: from visual or command feedback, it's too obvious the unit is locked in a treadmill instead of moving of its own will.
SinbadEV wrote:"Buildings" can't move (as in trans-locate) but they can still animate... "Features" cannot animate.
Translocating buildings should be no problem. As long as you agree to get some sort of instant teleport button instead of smooth movement. And if you need control just like a mobile unit, there's still the solution of glueing a building to a mobile unit.
Re: Animating buildings and ruins
Posted: 30 Nov 2012, 19:03
by PicassoCT
to also set some light on the upside.. if you make a high quality corpse and set the pivots right, you can move it via math.random into quite alot of shapes, thus one or two building corpses with randomized debris may turn out into rather many varying types of debris.
Re: Animating buildings and ruins
Posted: 30 Nov 2012, 19:40
by knorke
zwzsg wrote:SinbadEV wrote:"Buildings" can't move (as in trans-locate) but they can still animate... "Features" cannot animate.
Translocating buildings should be no problem. As long as you agree to get some sort of instant teleport button instead of smooth movement.
http://www.youtube.com/watch?v=vNkUCjTXJ6A
no glue!
- How do I get ruins to change their colour?
playercolor works same way as for units
Re: Animating buildings and ruins
Posted: 30 Nov 2012, 22:06
by zwzsg
VelvetClaw wrote:f I create a windmill like the following, does it follow the same rule for units as well?
Which rule do you need?
You can have the blades spins, just like TotalA windmills.
VelvetClaw wrote:If I want the building to have ruins, is it possible to get the building mesh to deform itself? or do I have to make different parts such as pillars and other items?
No, you can't deformt the mesh. Yes, do make different pieces. While the unit is alive, you hide piece in the unit script, according to damage. So the more damaged it is, the more pieces are hidden. And when it's dead, create a corpse chain, where each wreck, when destructed, turn into another wreck that looks even more damaged.
VelvetClaw wrote:How do I get ruins to change their colour?
Assign them to different team so they have different color? Probably not what you want though.
VelvetClaw wrote:How about walls asnd bridges? does anyone know how to make climbable walls with gates and towers
Climbable, forget about it. But for gates, maybe you can use the footprint tag! Not sure which state it is now, but fifteen years ago it was possible to have passable squares in building with a good use of the footprint field.
Re: Animating buildings and ruins
Posted: 01 Dec 2012, 10:10
by PicassoCT
Climbable.. is doable.. but its basically fixxed and would be limited to certain unittypes.. and it definatly would be a challenge to animate.
Basically, a Wall becomes a transportunit, and then moves the Unit slowly up. Walkable walls are done allready. So no move ctrl comes into play (move controll doesent work reliable, (it constantly has flashbacks to the place you assumed it)
Re: Animating buildings and ruins
Posted: 01 Dec 2012, 18:18
by zwzsg
You'll still get the treadmill lock feeling.
Re: Animating buildings and ruins
Posted: 01 Dec 2012, 20:56
by PicassoCT
yep, but thats due to unsynced climbing animtion and moveupthewallspeed.. if you calc it through, you can avoid that..
Re: Animating buildings and ruins
Posted: 08 Dec 2012, 10:35
by Google_Frog
Ask CarRepairer about walls. He has made some fully walkable walls just using terraform.