Page 1 of 1

Foundations on buildings

Posted: 12 Oct 2008, 20:41
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?

Re: Foundations on buildings

Posted: 12 Oct 2008, 20:53
by Per
It is added on top, yes.

Re: Foundations on buildings

Posted: 13 Oct 2008, 02:03
by Olrox
Per wrote:It is added on top, yes.
So no descending ramps on my models? :(

Re: Foundations on buildings

Posted: 13 Oct 2008, 04:30
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.

Re: Foundations on buildings

Posted: 13 Oct 2008, 23:01
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.

Re: Foundations on buildings

Posted: 14 Oct 2008, 17:45
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.

Re: Foundations on buildings

Posted: 15 Oct 2008, 12:12
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). :)

Re: Foundations on buildings

Posted: 16 Oct 2008, 00:41
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.

Re: Foundations on buildings

Posted: 16 Oct 2008, 18:59
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.