Jump to content
georgeashby123

Making my door a bone in 3ds max.

Recommended Posts

I have made a simple door with a screenshot of it below. Yet i have no idea how to make it a bone and how to name it so i can use it in cfgSkeletons. I am guessing i need to make the whole project as 1 door as i need it all to rotate together. Does anyone have any idea how i setup my door to be 1 singular bone with a name that i use in cfgSkeletons?

 

Picture of door: https://gyazo.com/47df6e176f19f6d047ccb242452507cb

Share this post


Link to post
Share on other sites

Technically you can name it whatever you want. I like to start with Door_01.

I don't know about setting it up in another program other then object builder but in there you just select the object and go to the name property box and create a new name for it

Share this post


Link to post
Share on other sites

Technically you can name it whatever you want. I like to start with Door_01.

I don't know about setting it up in another program other then object builder but in there you just select the object and go to the name property box and create a new name for it

Ahhh, i didnt know that i could setup bones in object builder, so i can just select a face of the object and make it a bone, which buttons do i press when i have the face selected.

Share this post


Link to post
Share on other sites

In Object Builder, select the part that you want to animate so that it is highlighted.

Right click in the Named Selections window, choose "New" and type in the name of the bone, eg. door_01

Share this post


Link to post
Share on other sites

In Object Builder, select the part that you want to animate so that it is highlighted.

Right click in the Named Selections window, choose "New" and type in the name of the bone, eg. door_01

Share this post


Link to post
Share on other sites

A door would normally be part of a building or a vehicle. It's unusual to find a door standing alone.

 

So in Object Builder, you would select the door faces from the building and name them eg "door_01".

 

Then you would add two memory points to the Memory LOD which act as the axis of rotation. Put them where one of the hinges would be. Call both memory points "door_01_axis".

 

In the model.cfg you setup the bones in the CfgSkeletons{}

"door_01", ""

and the animation in CfgModels {}

class Door_01 {
    source = "Door_01";
    type = "rotation";
    selection = "door_01";
    axis = "door_01_axis";
    angle0 = "rad 0";
    angle1 = "rad 90";
    minValue = 0;
    maxValue = 1;
};

In config.cpp you add an AnimationSource

class AnimationSources {
    class Door_01 {
        source = "door";
        animPeriod = 1;
        initPhase = 0;
    };
};

and two UserActions for open and close

class UserActions {
    class Door_01_Open {
        displayName = "Open Door";
        radius = 3;
        position = "door_01_axis";
        condition = "(this doorPhase 'Door_01' < 0.5)";
        statement = this animateDoor ['Door_01', 1];
    };
    class Door_01_Close : Door_01_Open {
        displayName = "Close Door";
        condition = "(this doorPhase 'Door_01' > 0.5)";
        statement = this animateDoor ['Door_01', 0];
    };
};

Share this post


Link to post
Share on other sites

 

A door would normally be part of a building or a vehicle. It's unusual to find a door standing alone.

 

So in Object Builder, you would select the door faces from the building and name them eg "door_01".

 

Then you would add two memory points to the Memory LOD which act as the axis of rotation. Put them where one of the hinges would be. Call both memory points "door_01_axis".

 

In the model.cfg you setup the bones in the CfgSkeletons{}

"door_01", ""

and the animation in CfgModels {}

class Door_01 {
    source = "Door_01";
    type = "rotation";
    selection = "door_01";
    axis = "door_01_axis";
    angle0 = "rad 0";
    angle1 = "rad 90";
    minValue = 0;
    maxValue = 1;
};

In config,cpp you add an AnimationSource

class AnimationSources {
    class Door_01 {
        source = "door";
        animPeriod = 1;
        initPhase = 0;
    };
};

and two UserActions for open and close

class UserActions {
    class Door_01_Open {
        displayName = "Open Door";
        radius = 3;
        position = "door_01_axis";
        condition = "(this doorPhase 'Door_01' < 0.5)";
        statement = this animateDoor ['Door_01', 1];
    };
    class Door_01_Close : Door_01_Open {
        displayName = "Close Door";
        condition = "(this doorPhase 'Door_01' > 0.5)";
        statement = this animateDoor ['Door_01', 0];
    };
};

Thanks bro

Share this post


Link to post
Share on other sites

A door would normally be part of a building or a vehicle. It's unusual to find a door standing alone.

Not necessarily. You can do it as a stand along object it works just the same as you described above. And since it's just the door you get the benefit of it being modular.

Share this post


Link to post
Share on other sites

 

A door would normally be part of a building or a vehicle. It's unusual to find a door standing alone.

 

So in Object Builder, you would select the door faces from the building and name them eg "door_01".

 

Then you would add two memory points to the Memory LOD which act as the axis of rotation. Put them where one of the hinges would be. Call both memory points "door_01_axis".

 

In the model.cfg you setup the bones in the CfgSkeletons{}

"door_01", ""

and the animation in CfgModels {}

class Door_01 {
    source = "Door_01";
    type = "rotation";
    selection = "door_01";
    axis = "door_01_axis";
    angle0 = "rad 0";
    angle1 = "rad 90";
    minValue = 0;
    maxValue = 1;
};

In config.cpp you add an AnimationSource

class AnimationSources {
    class Door_01 {
        source = "door";
        animPeriod = 1;
        initPhase = 0;
    };
};

and two UserActions for open and close

class UserActions {
    class Door_01_Open {
        displayName = "Open Door";
        radius = 3;
        position = "door_01_axis";
        condition = "(this doorPhase 'Door_01' < 0.5)";
        statement = this animateDoor ['Door_01', 1];
    };
    class Door_01_Close : Door_01_Open {
        displayName = "Close Door";
        condition = "(this doorPhase 'Door_01' > 0.5)";
        statement = this animateDoor ['Door_01', 0];
    };
};

I dont mean to be a complete pain, but how do i create memory points, i have created a memory LOD.

 

https://gyazo.com/4380389384f8a5f30eeeb1317175f658

Share this post


Link to post
Share on other sites

The OP seemed confused about which part of the model should be named so I was trying to put it into context, but you are of course correct.

Making it modular can add a few complications when it comes to texturing, as you can't apply hiddenSelectionTextures to proxies if you want buildings with different coloured doors from the same model, but yes, it could be done that way too.

Share this post


Link to post
Share on other sites

It looks as though, rather than create a Memory LOD, you have renamed your LOD1?

 

LOD1 will contain the door visual elements.

Memory LOD will contain memory points only. Single pixels, all named.

 

In the LOD's window, right click, select "New".

It will automatically create a new LOD, probably called "2.000". Right click that LOD and choose "Properties". Select "Memory".

 

Double click the Memory LOD.

It should be empty.

Put your mouse on the drawing area and press INSERT to create a point.

Create another point.

Select both points and make them a named selection "door_01_axis".

Move the points to align with a door hinge.

Share this post


Link to post
Share on other sites

It looks as though, rather than create a Memory LOD, you have renamed your LOD1?

 

LOD1 will contain the door visual elements.

Memory LOD will contain memory points only. Single pixels, all named.

 

In the LOD's window, right click, select "New".

It will automatically create a new LOD, probably called "2.000". Right click that LOD and choose "Properties". Select "Memory".

 

Double click the Memory LOD.

It should be empty.

Put your mouse on the drawing area and press INSERT to create a point.

Create another point.

Select both points and make them a named selection "door_01_axis".

Move the points to align with a door hinge.

I have placed 2 new points, how do i name then?

Share this post


Link to post
Share on other sites

Use the same method as in post #5 on this thread.

Hello mate, do you know why i cant spawn this ingame? In the editor?

 

Files and Folders: https://gyazo.com/820a124a1958848c1fa5a762e7ec4803

config.cpp: https://gyazo.com/0bc069e8b1f5d83ddc08be63bcc631a5

model.cfg: https://gyazo.com/8c6b78b6e6a938577b5a8694ec245208

Arma 3 Object Builder Object: https://gyazo.com/32ff67fe8e15603f62d3c1af4ff3cc6e

Arma 3 Object Builder Memory LOD: https://gyazo.com/c3871440d64ee1ee637c5815f7c629f9

Share this post


Link to post
Share on other sites

Have you set up and are you using an ArmA Project Drive P:\ ?

https://dev.arma3.com/post/techrep-00030

 

In your config.cpp add a CfgPatches entry at the top:

(if you are following the Arma 3 Samples, Test_House_01, that's what the line #include "cfgPatches.hpp" adds to the config.cpp, but they've put it in a separate file to confuse you!)

class CfgPatches {
	class TestDoor {
		requiredAddons[] = {"A3_Structures_F"};
		requiredVersion = 0.1;
		units[] = {"Door_01"};
		weapons[] = {};
	};
};

Recommend using quotation marks:

model = "TestDoor\TestDoor.p3d";

Place AnimationSources {} and UserActions {} inside class Door_01 {}

class Door_01 : House_F {
    ....
    class AnimationSources {
         ....
    };
    class UserActions {
       ....
    };
};

Share this post


Link to post
Share on other sites

 

Have you set up and are you using an ArmA Project Drive P:\ ?

https://dev.arma3.com/post/techrep-00030

 

In your config.cpp add a CfgPatches entry at the top:

(if you are following the Arma 3 Samples, Test_House_01, that's what the line #include "cfgPatches.hpp" adds to the config.cpp, but they've put it in a separate file to confuse you!)

class CfgPatches {
	class TestDoor {
		requiredAddons[] = {"A3_Structures_F"};
		requiredVersion = 0.1;
		units[] = {"Door_01"};
		weapons[] = {};
	};
};

Recommend using quotation marks:

model = "TestDoor\TestDoor.p3d";

Place AnimationSources {} and UserActions {} inside class Door_01 {}

class Door_01 : House_F {
    ....
    class AnimationSources {
         ....
    };
    class UserActions {
       ....
    };
};

When packing this in addon builder, do i need to binarise it, and the texture files? And yes my TestDoor is in the Project Drive.

Share this post


Link to post
Share on other sites

I use Mikero's pboProject, rather than Addon Builder so no expert, but yes I imagine you can check the binarize options but doubt that would be a reason for it not to be working.

Share this post


Link to post
Share on other sites

I use Mikero's pboProject, rather than Addon Builder so no expert, but yes I imagine you can check the binarize options but doubt that would be a reason for it not to be working.

I can now place it ingame, but i can walk through the object which may be the reason i dont have any actions when i scroll on it, how do i add the collisions?

Share this post


Link to post
Share on other sites

You now need to create a GEOMETRY LOD.

 

Read through this link:

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

 

Create a Geometry LOD.

Add a 6 sided box just a bit bigger than your door.

Give it a named selection of "door_01".

Add mass (highlight all, type a number in the Mass box, bottom left)

Check it is CLOSED (Structure > Topology > Find Non-Closed)

Make sure it is CONVEX (Structure > Convexity > Find non-convexities). If it isn't convex, try triangulating it (Structure > Triangulate Convex)

Add COMPONENTS (Structure > Topology > Find Components) You will see an additional named selection of "Component01".

 

Save

Build

Share this post


Link to post
Share on other sites

You now need to create a GEOMETRY LOD.

 

Read through this link:

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

 

Create a Geometry LOD.

Add a 6 sided box just a bit bigger than your door.

Give it a named selection of "door_01".

Add mass (highlight all, type a number in the Mass box, bottom left)

Check it is CLOSED (Structure > Topology > Find Non-Closed)

Make sure it is CONVEX (Structure > Convexity > Find non-convexities). If it isn't convex, try triangulating it (Structure > Triangulate Convex)

Add COMPONENTS (Structure > Topology > Find Components) You will see an additional named selection of "Component01".

 

Save

Build

How much mass do i need to apply? And my normal object named selection is Door_01 with a capital D, should i change my geometry box named selection to Door_01?

Share this post


Link to post
Share on other sites

Add whatever mass you consider correct for a door. Doesn't matter how much.

Door_01 or door_01 will both work equally well.

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

×