S&box Wiki

Revision Difference

Models/GettingStarted#551030

<title>Models/GettingStarted</title>⤶ ⤶ # A Project⤶ ⤶ To import a model you first need a [Project](Project). This can either be a Game or a Content project, but you need somewhere to create your model.⤶ ⤶ # Model Files⤶ ⤶ You should put your source files in that folder somewhere. The path is up to you. A `models` folder is usually lovely.⤶ ⤶ <upload src="1/8db77414eb10939.png" size="29681" name="image.png" />⤶ ⤶ Once the files are where you want them, find your main model file (usually a fbx) and right click in the [Asset Browser](AssetBrowser). Choose `Create Model`.⤶ ⤶ <upload src="1/8db773dd59bc278.png" size="16812" name="image.png" />⤶ ⤶ ⤶ # Model Doc⤶ ⤶ You'll now have ModelDoc open with nothing in it. Click `Compile` on the right.⤶ ⤶ Now you'll likely have a model that is wireframe flashing red. This is because it doesn't have a material.⤶ ⤶ <upload src="1/8db773f275de541.png" size="792870" name="image.png" />⤶ ⤶ # Assigning a Material⤶ ⤶ To create a material, right-click on the texture you want to use and choose Create Material.⤶ ⤶ <upload src="1/8db773fdfd0eb00.png" size="13660" name="image.png" />⤶ ⤶ From there, back in [ModelDoc](ModelDoc), you can choose the DefaultMaterialGroup node on from the tree on the left, and choose the missing material using the magnifying class icon. You can also drag and drop the material from Asset Browser to here.⤶ ⤶ Click Compile again - and you should be set.⤶ ⤶ <upload src="1/8db7740475e57f1.png" size="780451" name="image.png" />⤶ ⤶ # Nodes⤶ ⤶ The node tree on the left allows you to modify and add to your model. There are a **LOT** of nodes here and a lot to explore. That's something you should have fun exploring.⤶ ⤶ One thing you might want to look at immediately is choosing your model in the `RenderMeshList` tree and checking the import scale. You should choose the units that the model was created in.⤶ ⤶ ⤶ # Testing⤶ ⤶ You can view your model in ModelDoc, or you can drag it to the game view to test it.⤶ ⤶ <upload src="1/8db77412a5df208.mp4" size="5943901" name="3c04feee-613c-433c-b0ce-89f0487fca72.mp4" />⤶ ⤶ ⤶ # More Reading⤶ ⤶ * [Adding Physics To Models](Models/AddingPhysics)⤶ * [Adding AO Proxies To Models](Models/AOProxies)⤶ * [Bodygroups](Models/Bodygroups)