Jump to content

Basic part making workflow


Recommended Posts

As I am gearing up to do my first proper model with all the bells and whistles, I am doing a lot of learning. Gradually I am finding out all the things that are part of the process, not in a small part thanks to all the great resources here and on-line. What is still a bit of a mystery to me though, is how that all comes together. I thought it might be useful to make a step-by-step list in case you want to go the whole nine yards. This is what I have got so far. Also, is there anything I forgot? Any help or input would be appreciated.

- Come up with concept

- Optional: do research on the subject

- Sketch out desired features and basic lay-out

Modelling program:

- Make a high poly model/mesh

- Make a low poly mesh

- Make collider mesh

- UV unwrap

- Bake ambient occlusion

Graphics editor:

- Import ambient occlusion

- Texture model

- Export combined

Bump/normal map application:

- Bake bump/normal map

Modelling program (again):

- Apply textures

- Check and save

Unity:

- Set-up project file

- Set-up KSP PartTools

- Create scene with part

- Apply bump/normal map

- Apply specular

- Write part

DDS Loader:

- Convert textures to fast loading DDS files

Kerbal Space Program:

- Edit appropriate configuration file

- Load up and check

Edited by Camacha
Link to comment
Share on other sites

Mmmm, I'm already in the process of writing a tutorial like this.

I am not intending to make this a tutorial, I have just written up a reference list for myself and was wondering whether I omitted anything if I wanted to do a fully done part with all the bells and whistles.

My main remaining questions were when and where to apply bump/normal maps and ambient occlusion. I believe I have the answers - bump/normal is done in Unity at the end of the process as a separate bitmap, ambient occlusion is done by mixing it together with the textures in a graphics editor. Maybe that blender can do this too. These different approaches confused me. I think Unity can do ambient occlusion from a bitmap too, but not through PartTools, so that only applies when making assets for other games.

Link to comment
Share on other sites

  • 2 months later...
As I am gearing up to do my first proper model with all the bells and whistles, I am doing a lot of learning. Gradually I am finding out all the things that are part of the process, not in a small part thanks to all the great resources here and on-line. What is still a bit of a mystery to me though, is how that all comes together. I thought it might be useful to make a step-by-step list in case you want to go the whole nine yards. This is what I have got so far. Also, is there anything I forgot? Any help or input would be appreciated.

- Come up with concept

- Optional: do research on the subject

- Sketch out desired features and basic lay-out

Modelling program:

- Make a high poly model/mesh

- Make a low poly mesh

- Make collider mesh

- UV unwrap

- Bake ambient occlusion

Graphics editor:

- Import ambient occlusion

- Texture model

- Export combined

Bump/normal map application:

- Bake bump/normal map

Modelling program (again):

- Apply textures

- Check and save

Unity:

- Set-up project file

- Set-up KSP PartTools

- Create scene with part

- Apply bump/normal map

- Apply specular

- Write part

DDS Loader:

- Convert textures to fast loading DDS files

Kerbal Space Program:

- Edit appropriate configuration file

- Load up and check

Replying to the old post, it is interesting how different two different processes can be.

While the learning curve is still fresh in my mind .. . . . .

This will get someone into the game, doing well at the game, . . . . . .

Design 1

  1. Have concept or need
  2. Build prototype out of existing parts (including my own stock part mods - heavily modded) in KSP
  3. Evaluate feasibility

Design 2

  1. Formulate the best starting geometry in Blender (cylinder, square, sphere, icosphere)
  2. Draw out what will need to be modified and how.
  3. Desired inter-part interactions (e.g. snap points)
    where will parts snap or attach (i.e size and shape of snap points, orientation, position X,Y,Z)
    will it need strut connectors, engines, decouplers, to attach other parts (e.g. nose cone of a rocket might need a flat spot for an antenna or a maneuvering thruster, sides of fuel tank may need vertical flat places for side mounts)

Drafting (Blender 3D-View editor Object and Edit Modes)

  1. New blender file opens with 3D View editor window open in Object mode
  2. Delete default object and camera ([right click] and [del]), add extra light sources if desired.
  3. 3D View pull out right panel (tiny "+" in editor's upper leftmost corner; menu display and shading settings) this shows object or vertex coordinates when needed
  4. 3D View left panel tab Create select. Visual can be found here https://www.youtube.com/watch?v=71CIu-Pkn3k
  5. Set coordinates (usually {X,Y,Z} = 0, 0, 0 setable in 3D cursor - left panel top
  6. In top right panel Add Primative chose Mesh type
  7. Bottom right panel Add [Selected geometry] adjust core parameters governing complexity (e.g. vertices and N-gon versus triangluation) and size.
  8. Object mode radius = 0.625, 1.25, 1.875 meters?
  9. Make core Edit Mode modifications (culling, extruding)
    Various steps
  10. RefineEdit Mode modifications (adding new points, trimming and fashioning, merging)
    Infinite possibilities
  11. Pulling hair out and screaming may help (taking breaks and working-out is better)
  12. Count triangles (convex points only) - Plan ahead the triangle limit is 255. Each Ngons use (N-2)/N-gons triangles. Cylinder side triangles = Cylinder faces * 2.
    If count too high _or_ the following
    make collider mesh
    decide if a box or capsule mesh will suffice
    otherwise use Unity mesh collider and move directly on.

Basic texturing in Blender for detailing

  1. In the Properties editor (Usually the right most Panel below the Outliner editor)....
  2. Assign material (new material, name material) This is the sphere shaped icon
  3. Assign texture (new texture) (image or ....., UV) This is the red white checkerboard icon.

Preparing the Paint area(s) in Blender

  1. Duplicate the 3D-View editor (that little stripey triangle at the corner of the editor window drags right) and switch the nascent editor type to "UV Image Editor" (left bottom corner menu of new editor)
  2. In 3D-View, Edit Mode left menu tab, Shading/UV use the "edge select" tool to select or use [Ctrl] left mouse drag to surround edges to "Mark Seams"
  3. In 3D-View, Edit Mode, display method select "Wireframe" and select all (keyboard toggle a selects and deselects)
  4. left panel, Shading, Recalculate "Normals"
  5. Parse mesh into sections. left panel, Uvs click Unwrap then select "Unwrap" (Use manual unwrap - marked seams)
  6. Keep all selected
  7. UV Image Editor move sections (Right click on section and G,R and S) so that they are most easy to paint
  8. UV Image Editor menu bar UVs ....."Export UV Layout"

Painting the UV layout in bit image drawing program.

  1. Design paint map.
  2. MSPaint (or equivilent) - Paint and save (UV layout will appear if not covered so make sure its covered also)

Applying the Detailing

  1. In Blender - 3D-View mode, Edit Mode, display Wireframe then select all (vertices, edges and faces)
  2. In 3D-View, Edit Mode select left tab Shadings/UV section Shading subsection "Normals" recalculate if any vertices have been moved.
  3. Optional. In the same section chose the smoothings (3) at top of section
  4. In UV Image Editor, menu Image select Load Image and then select painted detail file- Image should appear under highlighted UV map
  5. In 3D-View, Edit Mode while still all selected display Solid
  6. In 3D-View, Edit Mode right panel select Shading (collapsed), expand and then select "Textured Solid" option box
  7. 3D-View Bottom menu Mesh select Face and subselect "Smooth Faces" if desired
  8. Deselect all and use edge select tool.
  9. Examine texture carefully, correct by renormalization if necessary.
  10. Check for orientations (unwraps are sometimes antiparallel orientations) check for unpainted or faded paints
  11. Go back to first step if problems exist (if things look the way they are supposed to pat oneself on back and take a 20 minute break - breath)

All directives are in place (drafts, texturing, detailing, normals) Finalize the Model

  1. (Optional) 3D-View Object Mode - transform or rotate object as needed (snap positioning)
    Select object (periphery should be highlighted)
    Move desired origin to {X,Y,Z} = 0,0,0
    Move 3D cursor (right panel, nearer to bottom) to {X,Y,Z} = 0,0,0
    In panel under Object Mode Tools tab, Set Origin chose "Origin to 3D cursor"
    Note: the small white square should have moved from the objects center of geometry to desired origin.
  2. Save, place and name file for Unity (If this is your first time save file once before painting also)

Preparing Unity for part Creation. Unlike Blender Unity does not start out wanting to build parts for its target (KSP), strange as that may seem since KSP runs on Unity. KSP however uses other textures and has limitations on collisions, etc. This means there is a bit of voodoo that needs to go into crafting.

  1. Voodoo step 1. https://www.youtube.com/watch?v=71CIu-Pkn3k Find online the ksp Part Tools 0.20 and install these. This creates Part tools option in new projects, these need to be installed into the [unity Path]\Editor\Standard Packages folder
  2. Open Unity
  3. First time openers will be asked to create a new project, others should File select New Project
  4. (Optional) If you don't want Unity cluttering up documents with Gbs of junk, create and select new directory
  5. Select Part Tools from the options (A good rest point)
  6. Project will appear. In the Project/Console, Assets/PartTools [right mouse] select from menu "Show in Explorer"
  7. Voodoo step 2. Leaving Unity for Explorer Find the Part Tools 0.23 and extract these to a convenient folder.
  8. Voodoo 3: explore the "Project" subfolder
  9. Delete the three folders Unity just added.
  10. Voodoo 4: locate, copy and paste the Part Tools 0.23 folders (3) into the [Project]/Assets/PartTools folder, close ..0.23
  11. Voodoo 5. Find the Blender Model and its paint job ([fileName].blend and [flieName].png) copy and paste into the [Project]/Assets/PartTools. You can also import these from the Project window
  12. In Explorer Go to KSP game data and create a new folder for Unity to "Write" to. Remember this locations path.
  13. Close Explorer - any opened folders Unity should be active, if not select Unity
  14. Voodoo 6: all done wit da voodoo. Unity momentarily zombie up, take a break, it will wake up. If you got this far your are moving at c
  15. Unity top menu GameObject drop down and "Create Empty". It should ask you for empty GameData directory. Use directory created in step 12.
  16. Heirarchy child window (left) GameObject select, then (right screen) examine Inspector panel. (recommended) Name the model, its used in the game.
  17. Inspector panel (right) , define the detail texture format (MBM - popular)

Preparing Imports. Whether added to game object or not, the imports need to be prepared

  1. Project window, Assets/PartTools [new Blender Model] left click
  2. Inspector panel shows tasks for Model check option:
    Generate colliders - if you want a Unity Mesh Collider if not prepare to add your own or another type.
    LightMap UV
  3. click Apply button
  4. Scroll down to Texture/Shading subpanel (bottom, Spherical textured icon).
  5. Select Shader, from the drop down list chose KSP and choose a shader (e.g. KSP/diffuse)
  6. Select texture inset [select] button and then double click the detail file.
  7. Break time, let Unity update.
  8. Project window, Assets/PartTools [new Blender Model] Left click _or_ 'if it works' the click the image in Preview and drag the file to the Heirarchy child window "GameObject" and drop it. A child process should be created. It has now been imported into the Part that is to be written. A part can now be made.

----All of this above is just getting the resources needed to craft a part, below is actually crafting, writing and configuring ------

Preparing the Part (yes, finally we are here) Basic simple part. Not for a 150 model composite part.

  1. Heirarchy GameObject/ child=[model] select
  2. Inspector panel review.
  3. The part now has a collider, but if your part had concave surfaces it may have problems, check convex
  4. Project/Console window click tab Console inspect for errors. If too many triangles (>255) then
    Stop - you may want to make a collieder mesh in Blender
    proceed with a Box or Capsule collider
  5. If the choice was to use a different collider then
    Heirarchy GameObject/[model] select then examine Inspector uncheck and delete Mesh Collider, in the top right there is a gear icon left click and select "remove component"
    At the bottom of inspector there is a button called [Add component] push and scroll down to Physics select and then mouse across and select a collider (sphere, box or capsule)
    Once selected the collider will need to be manipulated to get it position appropriate to the object.
  6. You can examine your collider (green emmissives) by turning off the surface mesh (inspector), and rotate object, turn the surface mesh on when you are done (or give yourself a dope slap).
  7. If everything looks good then make sure your coordinates are correct position, rotation and scale are correct
    Position should be X= 0, Y=0, Z = 0 (unless otherwise desired)
    Rotation should be X = -90, Y = 0, Z = 0 . . .This swaps the Y and Z axis from blender orientation to KSP orientation
    Scale vectors should all be 1 (unless otherwise desired)

Finalizing the Part

  1. Heirarchy GameObject select then inspect Inspector window, are all the specific corrects (target directory, model name, texture file type) hate to screw up now.
  2. Write (god that was easy, but wait till we get to testing)

Preparing to Test the part

  1. locate the specified [new parts gamedata] directory. There should be a nascent .mu and .mbm file in the directory
  2. Find a KSP part that behaves most similarly to the new part, preferable with node priorities that are similar
  3. Copy that cfg from that parts gamedata directory to the specified directory
  4. Open the cfg with a text-file editor
  5. Change the "mesh =" entry to new Unity model file (*.mu) in the same directory
  6. Change the "name =" entry to make it unique in KSP
  7. Change the "title =" entry so that the title is unique in the game (and so you can find it when game launches)
  8. Eliminate submodules containing "MODEL{"..."}" with "scale = " , "texture = " , "model = " transforms.
  9. "rescaleFactor = 1"
  10. Remove any modules that the part shouldn't or can't use
  11. At this point I would use a simple "node-attach = " at the bottom of the node list
  12. Make sure your attach rules are set properly

Initial Test

  1. Open KSP, if the game hangs up it means there is something really wrong with the part (then sorry Alt-F4).
  2. Open a sandbox
  3. Remembering the title see if the part appears by name in the targeted part category
  4. Add a capsule and a tank (unless it is a capsule)
  5. See if the part will attach to these.
  6. Brevity needs for you to test and blow up the part at least once, take pictures so we all can laugh at them.

Refined Tests

  1. Even if the part is not exactly desired, refine the config file for the next version
  2. Node Attach and node_stack
    The bottom of this list is the priority attachment position and vector, those that ride up the list are positions that other parts attach to.
    At most I have gotten one node_attach and the bottom two node_stack to work, but this might not always be true, so if the desire is to stack, place the prefered stack position and vector on the bottom, and second most favored stack point after. For testing just double slash the rest
  3. Modules added and tested, Fuel volumes correct to appropriate volumes
  4. Costs - if you have gotten here set the cost to 0 you deserve a break
  5. Tech Tree (I would use the conserved lower branches, I have alot of errors in my mods because of tech tree issues)
  6. Author, change name and of course reference other authors if the ideal is borrowed from that person.
  7. Description - change
  8. Mass volume is a cubic function of geometric mean of magnitudes of all dimension therefore if the part is roughly the same size as another stock part and of equivilent density then borrow stock part mass, if the part is double the linear dimensions then the mass is 8 fold higher and volume is also eight-fold higher.
  9. Breaking force and torque may need to be adjusted.
  10. Until 1.0, if you make an Aerodynamic part the only means is to adjust the drags. Parts with low drag can create problems when decoupling, so sepratrons may be needed. Drag is the square function of airspeed below Mach speed. It is caused by work done on air as it moves around the object (air is accelerated forward and outward then decelerates). The amount of acceleration depends on the shape, a sleek shape accelerates air more slowly and more outward then upward, but the effect is not linear and below the speed of light a bow shock in front of objects moves air a considerable distance in front. At Mach air cannot move and progressively piles up at high density on the leading surface, unless the outward velocity is slower than the speed of sound, creating intense drag. A sleek surface allows the gas to move laterally at less than speed of sound velocities but fluctuations of profile can create 'piles' behind the leading edge (visible as a shock cloud when breaking speed of sound), large enough that they can (and have) tear a craft in half. Even at below the Mach a need to move air rapidly (such as a propeller or around the Jet engine) can cause craft to increase drag considerably. A sub-mach jet sped to the ground is most likely to lose parts on the lagging control surfaces, first.
    KSP does not factor any of these into the game, so its best to conservatively lower drag.

Using Parts

  1. Parts can be scaled to various sizes and occupations
    Using rescale Factor and create scale mods, the new part is modern, does not need "scale ="
    Borrowing the model and create a Model subsection and use the texture file. For example retexturing can repaint a LfOx tank to a Lf tank, or Mono tank.
    Dimensional scaling can be used to turn cylinders into ovoid cylinders or Tall parts into flat tanks
  2. Move the parts to appropriate GameData areas, back up the parts folder in preparation for game upgrades
  3. Look for design defects, and start over again.

I don't even think this is complete, prolly left some critical simple step out, lol, but this is alot more than what I have seen, most of which is either not useful or only useful with a low complexity Model. As a matter of fact it needs a recommended section on creating a node_collider in blender an exporting it in a different format. Really detailed section on exporting from Blender and importing both the mesh and the node_collider into Unity.

Edited by PB666
Link to comment
Share on other sites

I build a low poly concept first just to make sure the shape is coming out right, and give it some basic textures. If it came out *really* well then either it can do for the final - maybe with some extra detail cut in - or I'll throw a mesh smoothing mod on it and see if that is enough. Otherwise I like working with splines, so I'll use it as a template to make a spline cage and at that point the end result can be whatever mesh resolution I give it.

You can do normals by hand too, or just add extra mesh detail instead. If it's just a few grooves & rivets it might be cheaper rendering-wise to model them instead of using an extra map. I last did any real amount of modelling over a decade ago, I'm still getting used to modern engines...

Link to comment
Share on other sites

  • 4 months later...

Yes have mastered the art of this workflow. However, I'm curious, has anyone worked out a workflow for UPDATING a model that doesn't require you to re-import and re-create your gameobject in the unity scene? It would seem I am having an issue with this.

If I take the originally imported FBX file from Unity and apply more changes to it in maya, or blender, then try to replace it in unity it does NOT update the gameobjects in the unity scene, as most of my KSP parts have been modified in the scene for changing the shaders, etc.

So has anyone figured out how to get a workflow back from the unity scene gameobject back to maya or blender to make changes and then back to unity (and update the original game object)?? It seems a laborious task each time and having to re-build the scene object as well.

Link to comment
Share on other sites

Yes have mastered the art of this workflow. However, I'm curious, has anyone worked out a workflow for UPDATING a model that doesn't require you to re-import and re-create your gameobject in the unity scene? It would seem I am having an issue with this.

If I take the originally imported FBX file from Unity and apply more changes to it in maya, or blender, then try to replace it in unity it does NOT update the gameobjects in the unity scene, as most of my KSP parts have been modified in the scene for changing the shaders, etc.

So has anyone figured out how to get a workflow back from the unity scene gameobject back to maya or blender to make changes and then back to unity (and update the original game object)?? It seems a laborious task each time and having to re-build the scene object as well.

My workflow is the laborious method, but there are a few things I do to ease the pain.

Firstly, I try to set up as much as I can in the Blender model, and rely as little as possible on edits in the Unity side. I create mesh colliders and animations in Blender, and try to get the mesh object hierarchy the way I need it, etc.

This means that re-importing into Unity mostly just means setting the right labels on things (such as Icon_Hidden on engine shrouds and flag decals, etc), and correcting the colliders (removing the mesh renderer module and adding the mesh collider module).

If you didn't change the textures, then the materials in Unity will still have the correct settings and texture assignments.

The part that causes me the most pain is multi-nozzle engines, since each engine bell/skirt needs to be a child of its own thrustTransform, and those tranforms all need to be named the same, which Blender doesn't permit (that I've seen). So I have to move the hierarchy around in Unity each time I re-import.

Even the heat-animations for engines can be preserved, since you probably have the animation at the top level GameObject. As long as all the transform names are the same and in the same places in the heirarchy, you won't need to edit the animation.

Useful Tip: You can muilti-select things in Unity and edit them all at once. For instance, select 3 colliders at once, and remove the renderer and add the mesh collider to all 3 at once. Same with setting labels, etc.

Edited by NecroBones
Link to comment
Share on other sites

Like NecroBones, I go out of my way to prevent breaking the prefab connection, so if I export over-writing the model, the changes are automatically brought into Unity. For the engines, I'd export the body and nozzles as separate files - that way you can preserve the prefab even having the same-named thrustTtransforms between them and the body.

My workflow is something like:

Build model.

UV map.

Parent objects as appropriate.

Export to .dae inside assets folder.

Create new scene. Add empty GO, apply and config part tools

Drag model in as child of root GO I just created.

Set up and apply materials.

Add colliders.

Configure layers and tags

Set up animation clips as appropriate.

Write .mu

Save Untiy scene.

Config.

Test.

Say I want to update some UV placement:

Update model in 3D studio

Export over-writing appropriate .dae (or fbx, blend or whatever)

See changes in Unity isntantly.

Click write

Test.

And the trick selecting multiple objects at once to remove a component, select a material comes highly recommended!! FFR, you can see some bits in action

. It's more for the particulars of making tracks, but the Unity bits start around the 48 minute mark.
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...