Jump to content

[Blender] Modelling and Physics Tips and Tricks


Recommended Posts

Recently I've stumbled upon a bunch of problems when learning to model for KSP. I think it's the time to collect all the solutions in one place. Feel free to correct and update!


0. I strongly recommend opening game's settings.cfg file and setting SHOW_CONSOLE_ON_ERROR = True. If something goes wrong with the part you're working on then at least you'll be aware of it.

1. Blender fails to import DAE. Open .DAE with Notepad and remove everything from <diffuse> to </diffuse>. (Thanks Epsilon).

1.1. Imported O.K., but I still cannot see some parts. Blender just hates whitespaces in object IDs. Open .DAE with Notepad and check all the 'id=...' fields. If some of IDs contain whitespaces then replace them with '-' symbols.

2. Face is shown in Blender but is invisible in the game. That's because game does not show 'inside' faces. Go to Edit mode and turn on Normals->Faces in the Mesh display section of Transform panel (<N> key if you don't see that panel), select a face under question and make sure the normal's pointing outside. Use Mesh->Normals->Flip if it is not.

BTW ticking Display->Textured Solid switch in Transform panel helps to catch glitches like this.

2.1. Normals are O.K. but some parts are still invisible or not textured. Assign the same material to all the faces in your model (yes, material can be assigned to a face!). The fastest way to ensure that is to switch Properties window to Materials tab, then to select each object (not mesh!) and to remove all the lines that appear in Materials list. Then save the file and reopen it (Blender will remove unused materials), create a new material and assign it to each object (not mesh again!)

2.2. Btw how to make those 'inside' faces visible? For example, engine nozzle walls, or a parachute's canopy? Make a double-sided model. If you need a part with the walls (engine nozzle) then in Edit mode select all the faces forming a nozzle, then Mesh->Faces->Solidify, and set walls thickness in the Tool Shelf panel (<T> key). For the zero-thickness part (like 'chute canopy) I'd prefer just Mesh->Add Duplicate and Mesh->Normals->Flip.

2.3. And how to make parts of that wall transparent? Just draw a transparent texture for them! Note that the game supports only full transparency; i.e. parts with alpha value = 0 are fully transparent, others are fully opaque (yeah, I know that it's already described in the Wiki, but these questions use to go together). By the way, ensure that alphaCutoff value in part.cfg file is greater than zero.

3. Parachute's opening sideways. Blender solution: align parachute's canopy along an Y axis (as the game uses Y-up conversion), then in Object mode use Object->Apply->Rotation so that all three angles in Transform panel are zeros. After that you may rotate canopy back to where it was before to align it with the rest of parachute parts... just don't 'apply rotation' again. Technical Ben had a more detailed description; try searching for it.

4. Parachute's too thin when semi-deployed. In Blender scale canopy 10 times up, Object->Apply->Scale, then scale 10 times down (all three scales in Transform panel are 0.1), and don't apply. 3DMax users thank Deusoverkill for his solution: scale the canopy down to 10%, go to tools->reset xform->reset xform, then scale the model back up to 1000% and export.

Also note that canopy oscillates around (0, 0, 0) point when deployed; it's a good idea to place parachute's base part around that point.

5. What means 'part gone on-rails'? In demo version, it means that the game stops calculating physics (including rotation, wobbling, engine thrust, atmospheric drag and so on) for that part. It happens with either x5 or higher time warp or when the jettisoned part moves at more than 5 000 meters from the command pod. Part goes 'off-rails' (i.e. game resumes physics calculations) with x1 wrap and a distance to the pod less than 5 000 m.

Note that if 'going on-rails' happens in atmosphere then jettisoned part is deleted immediately (that's why you never get a 'splashdown' report from a booster you've dropped while being in stratosphere). Deployed parachutes also disappear when going on-rails (while FXes like engine exhaust or smoke trail remain).

And as for v0.16, part gets removed at 2 500 meters (only vessel's label remains), and calculations for part-to-part interaction stop at just 200 meters away from the focused craft. The latter sometimes yields in ridiculous effects: when vessel's middle part goes destroyed by, say, a laser beam -- then all the remaining parts just hang in the air, and don't fall down until you approach that mess with a focused vessel :)

6. What's the maximum size for the part? 2x2x2 Km. If the part is bigger then the game scales it down. Thanks JellyCubes for determining that.

7. And how many polygons? 256 for node_collider, and no limits at all for a visible mesh. Though you should make a mesh as simple as possible 'cause complex meshes take really long to be loaded for the first time (when the game builds a binary mesh from the text file and calculates tangents). E.g. a mesh of 7 000 polygons takes several minutes to load -- and the game sometimes even fails to build the tangents file!

In the latter case you'll need to manually delete part's /mesh folder and restart the game. And avoid complex meshes in future :).

8. What to do with rocket wobbling? Just get used to it :(. No messing with gaps between adjacent parts, node_colliders or breakingForce/breakingTorque CFG parameters can stop a heavy rocket from wobbling.

It seems that the game engine treats a lightweight part as 'soft' and a heavy one as 'hard'; so when a light engine (or decoupler) is placed between two heavy fuel tanks a rocket goes crazy.

9. Part explodes when it touches the ground. Make sure point (0, 0, 0) is well inside node_collider mesh. HarvesteR explained it in detail.

Moreover make sure your collider mesh is convex, and it contains less than 256 polygons; otherwise the game will fail to handle this part properly! Thanks C7Studios for an explanation.

10. How to make a part undestroyable? First, set crashTolerance CFG parameter to the max (1e37). Then, do you remember that crazy point (0, 0, 0) from the previous question? If that part's origin ever hits something then the part explodes. And here's the catch: if the part's moving too fast then its origin may collide with something before part's node_collider is even taken into account! So node_collider must be really large for the part to survive an impact. Say, 1 meter in diameter for a 150 m free fall at Kerbin...


And finally a bonus not directly concerning with KSP but somehow related to modelling. Should be useful 'cause Blender has an outdated user's manual which describes this matter quite poorly.

Bonus. How to make a fancy render of the part I've just made with a texture applied? You've installed the lamp and the camera, loaded a texture into an Image editor and even see it on your model in the 3D view when Viewport Shading is set to Textured, eh? And when you press Render the model is all white? Well, you need to assign that texture to part's material.

  • In Object mode choose Material tab in Properties window and ensure your part's material is selected.
  • Go to Textures tab and make sure it displays textures for that material (there are already several ones in the list not having even a name; just don't think about them).
  • Press New, select Type = Image or Movie, scroll down and in Image section Open your texture file.
  • In Mapping section set Coordinates to UV, and Layer to UVTex (or whatever is in that list).
  • Press Render again!

Edited by Tosh
Link to comment
Share on other sites

I second this; might rename to include Blender in the title though, because it\'s all about that, and some people use other programs.

renamed) Though some problems mentioned here concern not only Blender, it\'s me not knowing solutions for other programs.

Updates please?

Link to comment
Share on other sites

I have found a few keyboard shortcuts in blender to be very handy.

A = Select or Deselect all (Faces, vertices, or edges depending on selection mode)

S = scale

E = Extrude

G = Grab (like you are going to move whatever it is you have selected)

When you are using E, S, or G, pressing Z, X, or Y will limit your movement/extruding/scaling to that axis which I have found to be quite helpful :-)

Also, if you are adding detail on your model and you want it to be mirrored on the other 3 sides, you can select the faces for everything you wish to mirror, go to your modifers tab (the one with the blue wrench icon on the right hand pane) and select the Mirror Modifier. Once you have that, you can check the options to mirror both the x and y, then switch to object mode and apply it, you will then be able to mod each of those areas differently if you wish :-)

Link to comment
Share on other sites

When you are using E, S, or G, pressing Z, X, or Y will limit your movement/extruding/scaling to that axis which I have found to be quite helpful :-)

...or <Shift + Z, X, Y> to move/resize along all the axes except for Z or X or Y :) Moreover it also concerns UV editing.

Another useful UV shortcut is <W> for \'Weld\' (stick all selected vertices together).

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...