Jump to content
Sigma-6

Building Terrain Conformal

Recommended Posts

Having a weird problem where a custom building is spawning in the editor conformal to the terrain, as in, on a hill, it spawns on an angle. I know I've seen this before somewhere... anyone know how to stop a building from doing that?

Share this post


Link to post
Share on other sites

init box : this setVectorUp [0,0,1];

It will be then positioned based on his own Z axis (1 up / -1 upside-down) instead of relative to the terrain where it is placed if I get what you mean.

  • Like 1

Share this post


Link to post
Share on other sites

IIRC there's is a named property (or a couple of them) that you're supposed to use in the Geometry LOD of building models to make them stand upright on the terrain.

 

Can't remember which ones they are exactly from these pages here:

https://community.bistudio.com/wiki/Named_Properties

https://community.bistudio.com/wiki/Oxygen_2_-_Manual#Properties

and I don't have any of the sample models to hand at the moment, but if you look at some of the Arma 3 and/or Arma 2 sample models that might give you a hint.

 

From reading those pages I guess it'll be something like the placement = vertical one, possibly also requiring class = housesimulated or just class = house as well.

 

Oh and dude, I haven't seen you around these forums in years! It's striking up some OFP nostaligia :D

Share this post


Link to post
Share on other sites

Hey, yeah. :) Well, I worked for the company for a few years, actually, at BISim. Lots of travel. Trying to get back into things after kind of a hiatus.

 

The named selections aren't the problem, for sure. I have them all as required. I've seen this before, and I remember it breaking my head last time I encountered it. It's, as usual, something simple and obvious I've overlooked... ;)

 

I don't want to script it. The building is finished and ready to go... this is the only real issue. I just want it to show up in the editor without it thinking it's flying nap of the earth or something... :(

Share this post


Link to post
Share on other sites

The sample house model Test_House_01_F only has class = house, map = house, damage = building, Prefershadowvolume = 0 and sbsource = Shadowvolume properties, but as you say you probably have those right already.
 

I've noticed there's a parameter in the config for Land_BagBunker_Tower_F where it has keepHorizontalPlacement = 1; this structure stays vertical where the other bunkers (that are conformal to terrain) don't have the parameter. Seems most other buildings inherit it from the House_F base class.

Share this post


Link to post
Share on other sites

I inherited from House_F. I'll add that parameter and see how it goes, though...

Share this post


Link to post
Share on other sites

Last thing I can think of that is a standard for buildings is that the classnames are supposed to follow a convention of being named class Land_NameOfP3D. So if one had a building model called TAG_MyHouse.p3d you'd have to make its classname Land_TAG_myHouse. No idea what the reasoning for it is - I always figured it was a necessity for Visitor rather than having something to do with the ingame simulation.

 

Though again, maybe that's something you've already done.

Share this post


Link to post
Share on other sites

Unfortunately, it's something I've already done.   :blink:

 

Whatever it is, it's going to be one of those 'how did you overlook that?' things.  :banghead:

Share this post


Link to post
Share on other sites

By any chance, do you have a Landcontact LOD? You might need to rip that out (though I dont know how that will affect other workings)

Share this post


Link to post
Share on other sites

No landcontact LOD. IMHO, that'd be the first culprit if, for some obscure reason, one were there.

Share this post


Link to post
Share on other sites

I inherited from House_F. I'll add that parameter and see how it goes, though...

 

Strange because it definitely seems to be that parameter for me.

 

I made these two test objects and placed them in the dev branch 3D editor under the same settings (surface snapping and terrain-following turned on):

 

Sb7kLQKl.jpg

 

Blue, Red and Black one is class Land_MY_BuildBlob and Orange, Green and White one is Land_MY_BuildBlob2.

 

The only difference between the two (besides colour) is that I added keepHorizontalPlacement = 0; to Land_MY_BuildBlob2 where Land_MY_BuildBlob inherits keepHorizontalPlacement = 1; from class House_F.

 

My config is literally only this:

class CfgPatches
{
	class MY_BuildBlob
	{
		requiredAddons[] = {"A3_Structures_F"};
		requiredVersion = 0.1;
		units[] =
		{
			"Land_MY_BuildBlob",
			"Land_MY_BuildBlob2"
		};
		weapons[] = {};
	};
};

class CfgVehicles
{
	// Parent class declarations
	class House;
	class House_F: House
	{
		class DestructionEffects;
	};

	// Class of the my structure
	class Land_MY_BuildBlob: House_F
	{
		scope = 2;
		displayName = "My BuildBlob";
		model = \MY_BuildBlob\MY_BuildBlob.p3d;

		vehicleClass = Structures_Military;
		mapSize = 20.27;
		cost = 40000;
	};
	class Land_MY_BuildBlob2: Land_MY_BuildBlob
	{
		displayName = "My BuildBlob 2";
		model = \MY_BuildBlob\MY_BuildBlob2.p3d;
		keepHorizontalPlacement = 0;
	};

};

The two models (MY_BuildBlob.p3d and MY_BuildBlob2.p3d) have only the following Named Properties in the Geometry LOD, plus ran Structure\Topology\Find Components and applied some (large) mass to it as one would expect of the Geometry LOD for a structure.

 

YmQAiDr.png

 

Other basic LODs added were these ones:

 

7reT91L.png

  • Like 1

Share this post


Link to post
Share on other sites

Bizarre. That's pretty much exactly what I have. 

Share this post


Link to post
Share on other sites

Bizarre. That's pretty much exactly what I have. 

Well, there must be a discrepancy or it'd work, so check again  ;)

Share this post


Link to post
Share on other sites

Well, I'm not going to leave it unfinished, so obviously. ;)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×