Difference between revisions of "My first: Item - Interactable socket items"

From Divinity Engine Wiki
Jump to: navigation, search
(Created page with "Interactable socket items are usually used for chairs, beds and any other object that change the position of a character. These usually exist out of 3D mesh, physics mesh and...")
 
Line 1: Line 1:
 
Interactable socket items are usually used for chairs, beds and any other object that change the position of a character. These usually exist out of 3D mesh, physics mesh and a position locator.<br />
 
Interactable socket items are usually used for chairs, beds and any other object that change the position of a character. These usually exist out of 3D mesh, physics mesh and a position locator.<br />
 
This guide will explain how we export these assets from 3DS Max and import them in the editor.
 
This guide will explain how we export these assets from 3DS Max and import them in the editor.
 +
 
<br />
 
<br />
 +
This article is part of a collection of guides, with a page for every type of item.
 +
 +
{| class="wikitable"
 +
|-
 +
| [[My first: Item | General]]
 +
|-
 +
| [[My first: Item - Scenery | Scenery]] (Rocks, plants, trees, shelves, etc.)
 +
|-
 +
| [[My first: Item - Lootable items | Lootable items]] (Shells, plates, food, gems, etc.)
 +
|-
 +
| [[My first: Item - Interactable animated items | Interactable animated items]] (Levers, doors, etc.)
 +
|-
 +
| [[My first: Item - Interactable socket items | Interactable socket items]] (Chairs, beds, etc.)
 +
|-
 +
| [[My first: Item - Weapons | Weapons]] (The sharp stuff)
 +
|-
 +
|}
 +
 
<br />
 
<br />
<big>''' Setup '''</big>
+
= Setup =
<br />
+
== Layer ==
<br />
+
 
'''Layer'''
 
<br />
 
<br />
 
 
The name of your layer will be the name of your visual, so pick something logical. Inside this layer you could/should only have the following:<br />
 
The name of your layer will be the name of your visual, so pick something logical. Inside this layer you could/should only have the following:<br />
 
<br />
 
<br />
* Your mesh(es), which is named '''<LayerName>''' or with multiple meshes '''<layername_(any addition that seems fit)>'''
+
* Your mesh(es)
* Your physics mesh, which is named '''<LayerName>_phys''' or if you are using multiple physic meshes '''<LayerName_phys_01, _02, _03>''' etc.
+
*: Named '''<LayerName>''' or with multiple meshes '''<layername_(any addition that seems fit)>'''
* A position dummy which is named '''Dummy_Pos''' or '''Dummy_Pos_001, 002, 003 etc.''' if you need multiple positions
+
* Your physics mesh
* A root dummy (if needed) which is named '''Dummy_<LayerName>'''<br />
+
*: Named '''<LayerName>_phys''' or if you are using multiple physic meshes '''<LayerName_phys_01, _02, _03>''' etc.
 +
* A position dummy
 +
*: Named '''Dummy_Pos''' or '''Dummy_Pos_001, 002, 003 etc.''' if you need multiple positions
 +
* A root dummy (if needed)  
 +
*: Named '''Dummy_<LayerName>'''
 
<br />
 
<br />
Even though it is not always needed, it would be best to follow the Larian naming conventions.
+
Try to always follow the Larian naming conventions.<br />
 +
 
 
<br />
 
<br />
<br />
+
== Physics ==
'''Physics'''
+
 
<br />
 
<br />
 
 
All interactable socket items should have a physics mesh, depending on what you can do with mesh depends on what type of physics you will need to use.<br />
 
All interactable socket items should have a physics mesh, depending on what you can do with mesh depends on what type of physics you will need to use.<br />
 
<br />
 
<br />
When you creating a m'''ove-able''' asset you must use '''kinematic''' physics, this type of physics needs to be convex preferably a box.<br />
+
* When you creating a m'''ove-able''' asset
 +
*: Use '''kinematic''' physics
 +
*: This type of physics needs to be convex preferably a box.
 +
* When you creating a '''static''' asset
 +
*: Use '''static''' physics
 +
*: This type of physics should to be convex but can be be concave.
 
<br />
 
<br />
When you creating a '''static''' asset you must use '''static''' physics, this type of physics should to be convex but can be be concave.<br />
+
All of these physics meshes can be either convex or concave:<br />
 +
*'''Convex'''
 +
*: Any mesh that has no inward angles.
 +
*: The list of possible shapes consists of but is not limited to: a box, a cylinder, a sphere or editable poly with no inward angles.<br />
 +
*'''Concave'''
 +
*: Any mesh that has inward angles.
 +
*: The list of possible shapes consists of but is not limited to: a torus, a tube or editable poly with inward angles.
 +
 
 
<br />
 
<br />
All of these physics meshes can be either convex or concave, what does this mean?<br />
+
= Exporting =
<br />
+
 
*'''Convex''', any mesh that has no inward angles. This could be but is not excluded to: a box, a cylinder, a sphere or editable poly with no inward angles.<br />
+
Exporting the visual is straight forward.  
*'''Concave''', any mesh that has inward angles. This could be but is not excluded to: a torus, a tube or editable poly with inward angles.
+
# Make sure your mesh and physics mesh are in the same layer.
<br />
+
# When using multiple meshes in a single visual make sure they are linked to a '''dummy'''.
<br />
 
<big>''' Exporting '''</big>
 
<br />
 
<br />
 
Exporting the visual is straight forward. Make sure your mesh and physics mesh are in the same layer. When using multiple meshes in a single visual make sure they are linked to a '''dummy'''.<br />
 
 
You do '''not''' have to export anything other then the visuals and physics. Unless you want to add animations and/or cloth.
 
You do '''not''' have to export anything other then the visuals and physics. Unless you want to add animations and/or cloth.
 +
 
<br />
 
<br />
 +
= Importing =
 +
== Importing your visuals ==
 +
 +
# Open the [[Content browser | Content Browser]].
 +
# Select the proper package you want to add your visual to.
 +
# Add the resource by pressing the '''Add Resource''' button.
 +
# Choose to add your model or physics.
 +
# You can now find it in the [[Content browser | Content Browser]] in the chosen package.
 +
 
<br />
 
<br />
 +
== Adding resources ==
 +
 +
After importing all you resources it is time to add all of them together:
 +
# Open the [[Content browser | Content Browser]].
 +
# Find your visual
 +
# Double click it and a new window will open.
 +
#: You will start on the '''Materials''' tab, here you will see each of your meshes inside the exported visual.
 +
# Select the mesh you want to add the texture to
 +
# ''Find'' and ''select'' your texture in the [[Content browser | Content Browser]].
 +
# Add your texture by clicking the '''<-''' button.
 +
 
<br />
 
<br />
<big>''' Importing '''</big>
+
== Creating a root template ==
<br />
+
 
<br />
+
With all your resources imported and setup properly we can now add it all to a root template.<br />
'''Importing your visuals'''
+
The template is what you will actually use to place all of your combined visuals.<br />
<br />
+
To make things easy whenever you want to create your template find something similar in the [[Root template panel | Root Template Panel]], right click it and select '''create new from selected'''.<br />
<br />
+
This will prevent any extra work in the form of scripting, naming or checking any of the important features.<br />
Start by opening your '''Content Browser''', now select the proper package you want to add your visual to.<br />
 
Once selected add the resource by pressing the '''Add Resource''' button. Now you can choose to add your model or physics.<br />
 
Once you added your files you can now find it in your content browser either by selecting the proper package and finding it or using the search bar at the top.
 
 
<br />
 
<br />
 +
#Press right-click > '''create new from selected''' a new window will open called [[Create object wizard]].
 +
#Add the new '''Physics Resource ID''' and '''Visual Resource ID'''.
 +
#:Select the resource in your '''Content Browser''', now select the resource slot in the [[Create object wizard]]. A '''...''' button should appear on the right.
 +
#:Press the '''arrow''' button for the appropriate field in the [[Create object wizard]] and you are done.
 +
You might have noticed the naming of the template changed automatically to the name of the visual resource. You are allowed to change this if you want.
 +
 
<br />
 
<br />
<br />
+
= See also =
'''Adding resources'''
+
 
<br />
+
{| class="wikitable"
<br />
+
|-
After importing all you resources it is time to add all of them together. To start, open your '''Content Browser'''.<br />
+
| [[My first: Item | General]]
Find your visual, double click it and a new window will open. You will start on the '''Materials''' tab, here you will see each of your meshes inside the exported visual.<br />
+
|-
Select the mesh you want to add the texture to, now ''find'' and ''select'' your texture in the '''Content Browser'''. Now you can add your texture by clicking the '''<-''' button.
+
| [[My first: Item - Scenery | Scenery]] (Rocks, plants, trees, shelves, etc.)
<br />
+
|-
<br />
+
| [[My first: Item - Lootable items | Lootable items]] (Shells, plates, food, gems, etc.)
<br />
+
|-
'''Creating a root template'''
+
| [[My first: Item - Interactable animated items | Interactable animated items]] (Levers, doors, etc.)
<br />
+
|-
<br />
+
| [[My first: Item - Interactable socket items | Interactable socket items]] (Chairs, beds, etc.)
With all your resources imported and setup properly we can now add it all to a root template. The template is what you will actually use to place all of your combined visuals.<br />
+
|-
To make things easy whenever you want to create your template find something similar in the '''Root Template''' browser, right click it and select '''create new from selected'''.<br />
+
| [[My first: Item - Weapons | Weapons]] (The sharp stuff)
This will prevent any extra work in the form of scripting, naming or checking any of the important features.<br />
+
|-
<br />
+
|}
Once you '''create new from selected''' a new window will open called '''createObjectWizard''' here you can add the new '''Physics Resource ID''' and '''Visual Resource ID'''.<br />
 
First select the resource in your '''Content Browser''', now select the resource slot in the '''createObjectWizard'''. A '''...''' button should appear on the right.<br />
 
Now simply press the '''green arrow''' button and you are done. You might have noticed the naming of the template changed automatically to the name of the visual resource. You are allowed to change this if you want.
 

Revision as of 12:01, 2 October 2017

Interactable socket items are usually used for chairs, beds and any other object that change the position of a character. These usually exist out of 3D mesh, physics mesh and a position locator.
This guide will explain how we export these assets from 3DS Max and import them in the editor.


This article is part of a collection of guides, with a page for every type of item.

General
Scenery (Rocks, plants, trees, shelves, etc.)
Lootable items (Shells, plates, food, gems, etc.)
Interactable animated items (Levers, doors, etc.)
Interactable socket items (Chairs, beds, etc.)
Weapons (The sharp stuff)


Setup

Layer

The name of your layer will be the name of your visual, so pick something logical. Inside this layer you could/should only have the following:

  • Your mesh(es)
    Named <LayerName> or with multiple meshes <layername_(any addition that seems fit)>
  • Your physics mesh
    Named <LayerName>_phys or if you are using multiple physic meshes <LayerName_phys_01, _02, _03> etc.
  • A position dummy
    Named Dummy_Pos or Dummy_Pos_001, 002, 003 etc. if you need multiple positions
  • A root dummy (if needed)
    Named Dummy_<LayerName>


Try to always follow the Larian naming conventions.


Physics

All interactable socket items should have a physics mesh, depending on what you can do with mesh depends on what type of physics you will need to use.

  • When you creating a move-able asset
    Use kinematic physics
    This type of physics needs to be convex preferably a box.
  • When you creating a static asset
    Use static physics
    This type of physics should to be convex but can be be concave.


All of these physics meshes can be either convex or concave:

  • Convex
    Any mesh that has no inward angles.
    The list of possible shapes consists of but is not limited to: a box, a cylinder, a sphere or editable poly with no inward angles.
  • Concave
    Any mesh that has inward angles.
    The list of possible shapes consists of but is not limited to: a torus, a tube or editable poly with inward angles.


Exporting

Exporting the visual is straight forward.

  1. Make sure your mesh and physics mesh are in the same layer.
  2. When using multiple meshes in a single visual make sure they are linked to a dummy.

You do not have to export anything other then the visuals and physics. Unless you want to add animations and/or cloth.


Importing

Importing your visuals

  1. Open the Content Browser.
  2. Select the proper package you want to add your visual to.
  3. Add the resource by pressing the Add Resource button.
  4. Choose to add your model or physics.
  5. You can now find it in the Content Browser in the chosen package.


Adding resources

After importing all you resources it is time to add all of them together:

  1. Open the Content Browser.
  2. Find your visual
  3. Double click it and a new window will open.
    You will start on the Materials tab, here you will see each of your meshes inside the exported visual.
  4. Select the mesh you want to add the texture to
  5. Find and select your texture in the Content Browser.
  6. Add your texture by clicking the <- button.


Creating a root template

With all your resources imported and setup properly we can now add it all to a root template.
The template is what you will actually use to place all of your combined visuals.
To make things easy whenever you want to create your template find something similar in the Root Template Panel, right click it and select create new from selected.
This will prevent any extra work in the form of scripting, naming or checking any of the important features.

  1. Press right-click > create new from selected a new window will open called Create object wizard.
  2. Add the new Physics Resource ID and Visual Resource ID.
    Select the resource in your Content Browser, now select the resource slot in the Create object wizard. A ... button should appear on the right.
    Press the arrow button for the appropriate field in the Create object wizard and you are done.

You might have noticed the naming of the template changed automatically to the name of the visual resource. You are allowed to change this if you want.


See also

General
Scenery (Rocks, plants, trees, shelves, etc.)
Lootable items (Shells, plates, food, gems, etc.)
Interactable animated items (Levers, doors, etc.)
Interactable socket items (Chairs, beds, etc.)
Weapons (The sharp stuff)