Jump to content

questions about modling for ksp with blender


Recommended Posts

hello!

So i'm kinda new to this who modding thing so I have a few questions (the wiki's outdated so i came here)

1) what are the scales for blender like: does 2.5 in blender mean 2.5 in ksp??

2) are there standard heights /leighths? ex: 1m 3m 5m

3)any other i may have later!

-thanks

Edited by crasher925
Link to comment
Share on other sites

In blender you can change the scene units to 'Metric'. Although I've succeeded making plenty of models without changing the units value as blenders default unit setting (none) is essentially the same.

2.5M is the circumference of an orange fuel tank (and most parts).

1.25M is that of the smaller fuel tanks.

I don't know about lengths, but I usually stick to numbers that are multiples of 0.5 on the up/down scale (i.e. 0.5, 1, 1.5, 2, 2.5, 3 etc).

Mentioning the up/down scale. Blender's Z/Y are switched when importing the model to unity, remember that. :)

There are a ton of tutorials I've found on this forum alone to do with modelling in blender you should take a read of them all to help you on your way.

Link to comment
Share on other sites

Mentioning the up/down scale. Blender's Z/Y are switched when importing the model to unity, remember that. :)

Well, I found that when I imported my blender mesh into Unity, the importer automatically fixed the z/y for me. I did not have to do anything.

Link to comment
Share on other sites

  • 2 weeks later...

When working in Blender only does the collision mesh need to be 'attached' to the model?

Trying to put my first part into KSP (using .dae format) and based on all the (mostly outdated) tutorials I have done everything right, but cant get the thing to show up in game.

Link to comment
Share on other sites

I have a texturing question.

I have a few models I am mostly happy with and have been playing with textures. No matter what shape I am dealing with the only unwrap option that gets me an eveb somewhat usable UV map is 'smart UV project'. And even using that alot of the time it still busts it up kinda crazy.

Also is there a 'better' select mode to use when making uv maps? It seems I do most my editing in 'face select' mode, so i been spliting the uv maps the same way.

I should mention Im not really an artistic person.... I make up for it in Blender by being really good with size and messurements. Cant so much do that when it comes to textures. This is why im trying to get most managable uv maps possible.

Link to comment
Share on other sites

the collision mesh should be another object in blender. You can copy the main part of the model and simplify it, it depends on what you are making. Select the collision object in blender and add a mesh collider component to it. You can remove the mesh renderer. Try to keep mesh colliders simple convex objects.

For texturing, you can select a group of faces visible from one side, change the viewport to that side and orthographic mode (View>View persp/ortho) and it will give you a view straight at that side of the object. Then Unwrap > Project from view. It's good for mapping multiple sides of an object as long as the faces you select aren't at much of an angle (not good for patterns that go over multiple faces). Using seams can also help break up weird shapes into something more manageable.

Edited by Nazari1382
Link to comment
Share on other sites

  • 2 weeks later...
the collision mesh should be another object in blender. You can copy the main part of the model and simplify it, it depends on what you are making. Select the collision object in blender and add a mesh collider component to it. You can remove the mesh renderer. Try to keep mesh colliders simple convex objects.

For texturing, you can select a group of faces visible from one side, change the viewport to that side and orthographic mode (View>View persp/ortho) and it will give you a view straight at that side of the object. Then Unwrap > Project from view. It's good for mapping multiple sides of an object as long as the faces you select aren't at much of an angle (not good for patterns that go over multiple faces). Using seams can also help break up weird shapes into something more manageable.

You don't even need that, you can simply add a box collider to a game object in unity and create all your colliders in there. You shouldnt be trying to use large poly models for convex colliders, you want to keep them all under 255 verts.

Link to comment
Share on other sites

Many cylinders, and cones, need mesh colliders, but letting Unity generate them will result in a lot more faces than what is needed. It is good to try and use primitives when possible, but you shouldn't feel like using a mesh collider is a bad idea under the right circumstances. There are times when the different types of colliders all serve a purpose.

Khaos; I use smart projection just to make sure all the faces get mapped. Too low of a setting scatters the faces all over the UV map, but retains their shape and aspect ratio. Higher settings will keep the faces together, but may deform them. It just takes practice to learn when things look okay. Also use an island margin of 0.03. Then it will leave 2-3 pixels between the faces it breaks apart so colors don't bleed from one face to the next. For areas of detail I select just those faces and then use plain "Unwrap", scale, and place the UVs manually.

Never tried making wings for KSP, so I am not sure if shape matters for flight? But try doing the cross section of the wing as a rectangle before shaping it otherwise. That will make it a lot easier to maintain and even looking leading and trailing edge. You could also try applying an actual picture of a wing as a texture to a plane in Blender, then placing that plane behind your model and using Orthographic views to match it polygon wise.

Anyone have any idea why for me it takes 80cm in Blender to equal 1m in KSP? All the scales I know how to find are set at 1.0, but even my attach nodes have this 1.25 error.

Link to comment
Share on other sites

Anyone have any idea why for me it takes 80cm in Blender to equal 1m in KSP? All the scales I know how to find are set at 1.0, but even my attach nodes have this 1.25 error.

What scale/rescale are you using in the config? When I make things in Blender the size they should be in KSP I have to use 'scale = 1' and 'rescaleFactor = 1'. I guess the rescale will default to 1.25 instead of 1 if its left out of config. I was having this issue when I first used Unity.

Link to comment
Share on other sites

Many cylinders, and cones, need mesh colliders, but letting Unity generate them will result in a lot more faces than what is needed. It is good to try and use primitives when possible, but you shouldn't feel like using a mesh collider is a bad idea under the right circumstances. There are times when the different types of colliders all serve a purpose.

Khaos; I use smart projection just to make sure all the faces get mapped. Too low of a setting scatters the faces all over the UV map, but retains their shape and aspect ratio. Higher settings will keep the faces together, but may deform them. It just takes practice to learn when things look okay. Also use an island margin of 0.03. Then it will leave 2-3 pixels between the faces it breaks apart so colors don't bleed from one face to the next. For areas of detail I select just those faces and then use plain "Unwrap", scale, and place the UVs manually.

Never tried making wings for KSP, so I am not sure if shape matters for flight? But try doing the cross section of the wing as a rectangle before shaping it otherwise. That will make it a lot easier to maintain and even looking leading and trailing edge. You could also try applying an actual picture of a wing as a texture to a plane in Blender, then placing that plane behind your model and using Orthographic views to match it polygon wise.

Anyone have any idea why for me it takes 80cm in Blender to equal 1m in KSP? All the scales I know how to find are set at 1.0, but even my attach nodes have this 1.25 error.

That's if you let unity generate them, that's not what I said. You can't get more basic than a box collider attached to a game object. That's also unit generated mesh collider. I think you are saying dont' let unity create them based off your mesh, which is correct and also wont allow part tools to export if there is a bogus collider.

Link to comment
Share on other sites

Maybe that's not what you meant, but that is what you said. "Use a box, or create them all in Unity"

What I was saying is just that sometimes the best mesh has to be made in modelling software. If you consider the example I gave of the cylinder. You might want 16-32 faces to get a nice rounded model into the game. Unity will happily generate a valid mesh collider for your cylinder with the same number of faces, and a box collider is a rather bad choice for round things. Capsules also have more faces than the 8 sided, 32 face, collider you can make in Blender and have Unity turn into a collider for you. Another example would be an octagonal or hex probe body with a beveled edge. Primitives are out again, and the bevel will cause Unity to create faces you don't need for an effective collision mesh, so again, making just a single octagonal object in Blender is the better option.

Then again, I am also working on some rather high poly parts which do just fine with simple box colliders.

What I am not trying to say is that either method is superior to the other, only that both are useful, and it takes a little practice to know what you should actually use.

Link to comment
Share on other sites

Maybe that's not what you meant, but that is what you said. "Use a box, or create them all in Unity"

What I was saying is just that sometimes the best mesh has to be made in modelling software. If you consider the example I gave of the cylinder. You might want 16-32 faces to get a nice rounded model into the game. Unity will happily generate a valid mesh collider for your cylinder with the same number of faces, and a box collider is a rather bad choice for round things. Capsules also have more faces than the 8 sided, 32 face, collider you can make in Blender and have Unity turn into a collider for you. Another example would be an octagonal or hex probe body with a beveled edge. Primitives are out again, and the bevel will cause Unity to create faces you don't need for an effective collision mesh, so again, making just a single octagonal object in Blender is the better option.

Then again, I am also working on some rather high poly parts which do just fine with simple box colliders.

What I am not trying to say is that either method is superior to the other, only that both are useful, and it takes a little practice to know what you should actually use.

Yes, I should have been more thorough, and I can't disagree with you. There is no right or wrong method, there are just more effective ones that others. Quite often my models will be comprised of several types of colliders, some stock unity ones and some low poly colliders created in blender, it all depends what I need collided. Things like cargo bays, can't use average colliders, because as you said it creates unwanted faces when it goes to join the convex shape, so unless I am coming across limits with FPS etc, I generally don't care how I apply them.

I only really became aware of how bad multiple colliders can affect a part when I did a retracting 6 output engines. With the thrust transforms and colliders all animating, it was cutting the FPS down by half. So I halved my colliders and took it back to 3 engines and that suffered no FPS loss at all when animating.

Link to comment
Share on other sites

Yes, I should have been more thorough, and I can't disagree with you. There is no right or wrong method, there are just more effective ones that others. Quite often my models will be comprised of several types of colliders, some stock unity ones and some low poly colliders created in blender, it all depends what I need collided. Things like cargo bays, can't use average colliders, because as you said it creates unwanted faces when it goes to join the convex shape, so unless I am coming across limits with FPS etc, I generally don't care how I apply them.

I only really became aware of how bad multiple colliders can affect a part when I did a retracting 6 output engines. With the thrust transforms and colliders all animating, it was cutting the FPS down by half. So I halved my colliders and took it back to 3 engines and that suffered no FPS loss at all when animating.

Do you have any idea if KSP registers collisions between children of the same parent object? Some games do and some do not. This is my first time messing with a Unity game, and I just started in the last ~10 days. I've actually been modelling/modding for the last ~15 years :sealed:

Link to comment
Share on other sites

I'm still a bit unclear on how to use mesh from Blender as a collider in Unity. For fuel tanks for instance, I think I understand the blender side of it. Make tank, then a slightly smaller mesh with much less faces, child that to the tank and name it 'node_collider' (not sure if the last bit is still right?).

But after that I am unsure how to do the unity setup, and all the info I seem to find on colliders in blender are for putting models strait from blender into KSP (via .dae).

Link to comment
Share on other sites

I mentioned it a little in my wall of text on Blender, lol.

But yeah, that's generally it. If you're making cylinders, just make another cylinder around the same size, and turn down the number of sides (bottom left of edit Window in Blender when you first add the cylinder, sometimes hidden under all the buttons). It's usually better to let things go slightly through the surface of your main mesh than to have them floating above it, so you do also usually want the collider a little smaller. Same size doesn't usually hurt and saves a couple seconds resizing.

Name does not matter, but I usually make it something easy to find in the Unity hierarchy later.

In Unity pick the collider out of the hierarchy, remove the MeshRenderer Component and apply a Mesh Collider. That's that.

Make sure the material is on the main model, and add the KSP Part Tools component to the parent Object, not one of the children.

Link to comment
Share on other sites

I'm still a bit unclear on how to use mesh from Blender as a collider in Unity. For fuel tanks for instance, I think I understand the blender side of it. Make tank, then a slightly smaller mesh with much less faces, child that to the tank and name it 'node_collider' (not sure if the last bit is still right?).

But after that I am unsure how to do the unity setup, and all the info I seem to find on colliders in blender are for putting models strait from blender into KSP (via .dae).

I'm not sure what you are doing young man, but that sounds wrong. :P

1. Create the original mesh in blender.

2. Create a simpler mesh in blender for a collider (name it something you'll remember)

3. Set the new simpler mesh as a child of the original mesh.

4. Save the file (.blend is fine) and import it into Unity3d.

5. Add the imported model to the hierarchy.

6. Expand the model in the hierarchy using the arrow next to it's name.

7. Select the simpler mesh (it will be named whatever you named it earlier).

8. Remove the Mesh Renderer component.

9. Add a Mesh Collider.

10. Export as normal (KSP Part Tools).

I think that covers it. :wink:

Edit: You beat me to it Cheebsta. :confused:

Link to comment
Share on other sites

Do you have any idea if KSP registers collisions between children of the same parent object? Some games do and some do not. This is my first time messing with a Unity game, and I just started in the last ~10 days. I've actually been modelling/modding for the last ~15 years :sealed:

No, unfortunately they are not shared, unless it is physically ticked as a collider, it will be clippable. I wish it wasn't so, it would make life so much easier.

I was the same, I had been using lightwave/maya/max for decades and picked up blender purely because I was sick of the disgusting software pricing between the U.S and Australia, I went for a free alternative and was so glad I did, I actually enjoy using it, it's like it was built to get the job done, not fluff about while getting the job done. Also not a fan of the newer interface, bring me back max 2.5 :/

I must admit, I still go back to max for rendering, video post is just too kick ass to look past :)

Link to comment
Share on other sites

Ah I see now. My confusion was not understanding how Unity makes a mesh collider, it being based off the blender mesh as far as faces go. Heh, I kinda thought it just filled the area as effectivly as possible...yea, silly me.

I am making a set of tanks (big ones) and maybe eventualy some engines to match, so trying to figure out absolute best ways to do stuff.....still have not learned the secrets of smooothness.

Thanks you, I have a better understanding about colliders now =)

Link to comment
Share on other sites

Ah I see now. My confusion was not understanding how Unity makes a mesh collider, it being based off the blender mesh as far as faces go. Heh, I kinda thought it just filled the area as effectivly as possible...yea, silly me.

I am making a set of tanks (big ones) and maybe eventualy some engines to match, so trying to figure out absolute best ways to do stuff.....still have not learned the secrets of smooothness.

Thanks you, I have a better understanding about colliders now =)

If your collider is not actually convex Unity will fill it in when you tick the convex box. If you see that happening it's a good idea to rework the collider a little, or break it up into pieces.

Also, select all faces. Mesh -> Faces -> Shade Smooth. Then down bottom add an Edge Split modifier. Play with the angle. When the model is *all* done, apply the Edge Split. What it will do is duplicate any edges that are currently rendered "sharp" in the viewport, which prevents smooth shading across that edge in the game. You can also do this manually if Edge Split won't cooperate in certain areas.

@Raz; You don't even have to set the colliders as children. When you drop a .blend into the Unity scene it should automatically generate a Game Object that is parent to all the meshes in the .blend.

Link to comment
Share on other sites

If a mesh is animated it can be handy to have it's children's transform follow the parents'. That is situational though. :)

Ahh, good point. Animation is something I never fooled with much, but this will be handy for future reference.

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