Foundations on buildings

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
Post Reply
User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Foundations on buildings

Post by Olrox »

I'm making some new models for structures, and I've got to a question:
Do the foundation of a building replace the ground tiles where it has been placed or is just put on the top of it?
Let's say, if a building had some parts below ground level (like ramps leading towards an entrace slightly below ground), would the current ground tiles show at these parts, like in the image attached?
Attachments
Untitled-3.jpg
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Foundations on buildings

Post by Per »

It is added on top, yes.
User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: Foundations on buildings

Post by Olrox »

Per wrote:It is added on top, yes.
So no descending ramps on my models? :(
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Foundations on buildings

Post by kage »

If the structure is set to be a defense structure, then the structure will conform to the terrain. If the structure is anything else (with a mat), the terrain will be flattened, and the structure will be placed on top. Thus for most buildings, the terrain will end up being flat around it.

But to answer your question, you absolutely can have descending maps: if you supply an mat PIE file without any polygons, you'll see that the renderer renders nothing under it -- in other words, if not for the mat PIE, the only thing you'd see is proof that the Earth is flat -- and the only reason you need a mat PIE is because, during construction, if the 'mat' is built into the main structure PIE, the construction "growing" effect doesn't quite work out looking nice without a separate mat.

So to get descending ramps, you need a custom made mat PIE with a "hole" where you want the ramp (or other subterrainean feature) to be, and then create the main structure PIE as you like -- as long as the holes/cut-out pieces in the mat are in the right places, you can see anything you want that goes below ground.
User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: Foundations on buildings

Post by Olrox »

kage wrote:So to get descending ramps, you need a custom made mat PIE with a "hole" where you want the ramp (or other subterrainean feature) to be, and then create the main structure PIE as you like -- as long as the holes/cut-out pieces in the mat are in the right places, you can see anything you want that goes below ground.
Very interesting. I'll (try to) use that to create more bunker-like structures, to fit the "acclaimed style" for warzone.
Thank you very much, kage, you're a valuable member of this community.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Foundations on buildings

Post by Per »

Kage - I just looked at the source for terrain drawing again, and I am pretty sure we draw building base plates on top of whatever terrain is there already. However, it would be rather easy, with the current drawing code, that is, to not do this, although we would have to find solutions for buildings like Repair Center that do not have base plates.
User avatar
Olrox
Art contributor
Posts: 1999
Joined: 03 Jul 2007, 19:10

Re: Foundations on buildings

Post by Olrox »

But the repair facility does have a base plate, it's only not the size it appears when you place it on terrain. Also, I think the 3x3 size is not considered after it is built, because you can place a factory 1 tile from its base, like only the 1x1 base were the building.
O_o
But I dunno which scripts control the "layout" before you build, nor the one that control the actual size of the building after construction (which, in this case would be more likely to be directly related to the answer for this little question of ours). :)
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: Foundations on buildings

Post by Zarel »

Olrox wrote:But the repair facility does have a base plate, it's only not the size it appears when you place it on terrain. Also, I think the 3x3 size is not considered after it is built, because you can place a factory 1 tile from its base, like only the 1x1 base were the building.
O_o
But I dunno which scripts control the "layout" before you build, nor the one that control the actual size of the building after construction (which, in this case would be more likely to be directly related to the answer for this little question of ours). :)
That's correct - the repair facility has size 1 internally.
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Foundations on buildings

Post by kage »

Per wrote:Kage - I just looked at the source for terrain drawing again, and I am pretty sure we draw building base plates on top of whatever terrain is there already. However, it would be rather easy, with the current drawing code, that is, to not do this, although we would have to find solutions for buildings like Repair Center that do not have base plates.
Subterranean features have been done by me and others, though I can't find my posts about it, since the posts seem to cut off now before an old enough date.
Post Reply