S&box Wiki

Revision Difference

Guide_to_Models#549698

<cat>Model.Intro</cat> <title>Guide to Models</title> # A beginners guide to models This guide assumes you've already [created a model](Importing_and_creating_assets#creatingassets) or [imported a model](Importing_and_creating_assets#models). ## Materials 1. If you want ModelDoc to use your material names, simply add a new type by right clicking on the left side of the interface and adding a DefaultMaterialGroup. 2. Click on it and then simply clicking on the magnifying glass icon and looking for the material that we created earlier. It should look something like the picture below. <upload src="aa125/8dad93aad7520fb.png" size="3940" name="image.png" /> You can now compile your model and at this point you should be able to see it in the viewport with it's proper textures. You can fine-tune the materials through material editor and check the differences in real time. ⤶ ## Material Groups⤶ ⤶ Adding multiple selectable materials to a model is a good way to keep resource cost & the number of files to manage to a minimum.⤶ ⤶ This is done by adding 'MaterialGroup' nodes in ModelDoc. A dialogue box will appear for you to enter the name the material will appear as later on. They can then be previewed by double-clicking them in the Preview Outliner.⤶ ⤶ Choosing which material is used for each individual prop when editing in Hammer is done through the drop-down menu in the Rendering section of the Object properties window.⤶ ⤶ <upload src="b4009/8db41725ad73566.png" size="1206561" name="MaterialGroups01.png" />⤶ ⤶ Having the ability to change this selection within the game itself is also possible, e.g. clothing colours etc but that is beyond my feeble knowledge.⤶ ## Physics and Collisions Adding physics to your model is covered [on this page](PhysicsHullFromRender). ## LODs You can learn more about LODs [on this page](LODs). ## Prop Data Prop data allows you to add different properties to your model, which can be used when your model gets spawned as a prop. This is covered [on this page](Breakpieces). ## Attachments Attachments allow you to specify positions on a model for use within code, which means that you can do things like spawn particle effects from them - which is great for making bullet casings fly out of a gun, for example. You can read about attachmens [on this page](AnimEvents,_AnimGraph_Tags,_and_Attachments).