Difference between revisions of "My first: Item - Lootable items"
(→Importing) |
m (Protected "My first: Item - Lootable items" ([Edit=⧼protect-level-larianeditonly⧽] (indefinite) [Move=⧼protect-level-larianeditonly⧽] (indefinite))) |
||
(One intermediate revision by the same user not shown) | |||
Line 104: | Line 104: | ||
|- | |- | ||
|} | |} | ||
− | |||
− |
Latest revision as of 10:41, 2 October 2017
Creating a lootable asset is relatively easy compared to the other assets we have. The asset usually exist out of 3D mesh and a single physics mesh.
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) |
Contents
Setup
Layer
The name of your layer will be the name of your visual, so it is best to pick something logical.
Inside this layer you could/should only have the following:
- Your visual mesh
- Named <LayerName>
- Your physics mesh
- Named <LayerName>_phys
Always try to follow the Larian naming conventions.
Physics
Lootable items always need a physics mesh, this mesh needs to be convex and kinematic.
You can create this physics mesh from any convex mesh, however it should not be to complicated and thus a box is usually advised.
- Select your mesh.
- Go to the Utilities tab.
- Scroll down until you find LarianPhysics.
- Press MakeRigidBody.
- Pick Kinematic from the drop down menu.
Exporting
Exporting the visual is straight forward.
Just make sure your mesh and physics mesh are in the same layer.
You do not have to export anything other then the visuals and physics.
Importing
Importing your visuals
- Open the 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.
Once you added your files you can find them in your content browser either by selecting the proper package and finding it or using the search bar at the top.
Adding resources
After importing all you resources it is time to add all of them together:
- Open the 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, now find and select your texture in the Content browser.
- 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 the combination of all your resources and is what you will actually place in-game.
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.
This will prevent any extra work in the form of scripting, naming or checking any of the important features.
- 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.
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) |