Difference between revisions of "Scenery"

From Divinity Engine Wiki
Jump to: navigation, search
(Blanked the page)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Scenery is the most simple visuals we use. These usually exist out of 3D mesh and one or more physics meshes. Sometimes animation and cloth is added depending on the typ of visual you want to create.<br />
+
 
This guide will explain how we export these assets from 3DS Max and import them in the editor.
 
<br />
 
<br />
 
<big>''' Setup '''</big>
 
<br />
 
<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 />
 
<br />
 
* Your mesh(es), which is named '''<LayerName>''' or with multiple meshes '''<layername_(any addition that seems fit)>'''
 
* Your physics mesh (if needed), which is named '''<LayerName>_phys''' or if you are using multiple physic meshes '''<LayerName_phys_01, _02, _03>''' etc.
 
* A root dummy (if needed) which is named '''Dummy_<LayerName>'''<br />
 
<br />
 
Even though it is not always needed, it would be best to follow the Larian naming conventions.
 
<br />
 
<br />
 
'''Physics'''
 
<br />
 
<br />
 
Whenever one of your visuals needs to be walked on, block sight, block movement or needs to interacted with you will need to create a physics mesh.<br />
 
Any mesh can be used to make physics by selecting your mesh, going to the '''Utilities''' tab, scroll down until you find '''LarianPhysics''' and press '''MakeRigidBody'''.<br />
 
<br />
 
You can pick from several types of physics:
 
<br />
 
<br />
 
*'''Kinematic''', When you are creating physics for any player moveable objects, you will have to create a kinematic physics mesh. This mesh must be convex and singular or performance loss could happen.<br />
 
*'''Dynamic''', Currently unused in our 3DS max pipeline.<br />
 
*'''Static''', Used for both animated and static physics. Even though concave meshes are allowed here, try to avoid these if you can. Instead you could use multiple physics meshes for one visual.<br />
 
<br />
 
All of these physics meshes can be either convex or concave, what does this mean?<br />
 
<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 />
 
*'''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.
 
<br />
 
<br />
 
<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.
 
<br />
 
<br />
 
<br />
 
<big>''' Importing '''</big>
 
<br />
 
<br />
 
'''Importing your visuals'''
 
<br />
 
<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 />
 
<br />
 
'''Adding resources'''
 
<br />
 
<br />
 
After importing all you resources it is time to add all of them together. To start, open your '''Content Browser'''.<br />
 
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.
 
<br />
 
<br />
 
<br />
 
'''Creating a root template'''
 
<br />
 
<br />
 
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 />
 
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.
 

Latest revision as of 12:34, 28 September 2017