Jump to content

Retractable Centrifuge


Recommended Posts

I havent used blender in a few years (im a max and modo kind of guy)

but ill start with the most obvious. You have inverted faces on your model. In blender inverted faces are displayed in a blueish hue, and if you attempt to import a model with invered faces into ksp/unity those parts will be invisible. To fix this first select all objects and apply scale/rotation (ctrl+a?). Then select the objects with inverted faces, tab into them. select all faces and unify the faces (ctrl+f? And unify normals etc.)

For the windows i would probably detach them to a seperate object if you want a different material on them (more shiny etc.) If you make an iva for it you can start by just duplicating the hollow parts of your centrifuge. Apply a solidify modifier (inward) then delete the outer part of the resulting model. That would be the beginning of your iva.

For the main extending/retracting animation i would probably just use standard parent/child rigging. Select the outer parts(on one side) and child them to the outer part of that piston(you can also do the oppocite. Just as long as all the objects that move are childed to one object). do the same thing for the other side. When you move the parent object the others will move with it. Use this to animate.

For those wires and that horizontal truss youll probably need to either rig them via skinning (bones and armatures) or directly via blendshapes (poses). If they are simple cylinders perhaps this is the best choice if you are unfamiliear with skinning.

For the spinning animation i would probably child the base pistons, as well as all parts that spin to the core. Then parent of the centrifuge objects to the piston base. You then keyframe it rotated at 0 degrees starting from the keyframe directly after your deploy/retract animation, and keyframe 359 degrees of rotation at your decired endframe (starting from that first frame after the deploy/retract animations last keyframe). Its been a while but i think this is how you do looping rotation.

In unity to get the two imported as seperate animations you make the first animation from 1-last frame of deploy/retract sequence. then the second animation from last frame of the deploy/retract +1 to the end of the clip. You can name these two animations whatever you want in unity so its easier to setup in the part config.

Edited by landeTLS
Link to comment
Share on other sites

Thanks for the advice, i'm new about unity and any information is usefull

For the windows i have chosen a more stockalike way

Y3UMjQ2.jpg

A good news is that i can use bones for animations, for colliders is better if i do them in blender or unity ?

Link to comment
Share on other sites

Glad i could help.(Btw those mounts for the wires are still inverted)

For colliders id do them in unity for this. Use unity primitives. Cylinders for the core. 8+ boxes for each of the centrifuge parts (rotated into place from the center) remember to child the colliders to the corresponding animated parts so they will move with the animation.

Link to comment
Share on other sites

What am i doing wrong ?

animations are recognized but do not work individually when exported together and rotation don't have loop

Edit:

Fixed the problem with rotation loop but animations don't works together

Thanks in advance

Luca

Edited by Badsector
Link to comment
Share on other sites

Glad to hear you solved it. As i am sure you figured out the two animation clips need to hold the appropritate start and endframes. For example 1-30 for the deploy/retract and 31-60 for the looping rotation animation(which also needs to be set to run as a loop). Writing it here for other people who may stumble upon this thread wondering what was the issue.

The only remaining issue i can see in the unity setup is that you seem to have a single big box collider around the entire centrifuge "wheel" but there are gaps between them in the visual model. So if you where to try evaing and floating through those gaps you will be stopped by the collider. I am afraid the only way to solve this is the way i outlined in my earlier post. Which is to build the shape outline out of several primitives(probably boxes).

This may seem unintuitive since why not just create a single mesh collider out of the meshes? The reason for this is because you cant have proper collisions in unity between concave colliders. They need to be convex. There are also issues with both multiple mesh colliders (may have been solved in newer versions) and animated mesh colliders. with ksp 1.1 and unity 5 this will be even more important.

Edited by landeTLS
Link to comment
Share on other sites

First Thanks for all the suggestions, without your initial suggestions I would have a hard time to import the object, for animation is only a problem with hierarchy and because i have had them all with only 1 armature, but with unity 5 .mu is deprecated and probably all this problems too.

Colliders are done  with convex mesh, this his an old screenshot.

The centrifuge is ready for a prerelease i'm only fixing some little mistakes

Link to comment
Share on other sites

Actually youll be happy to note that .mu will not be depricated(well. In the sense that it likely will still be used by most, if not all of the stock parts in 1.1) you will have the option of using the much better unity .assetbundle format but your .mu's will still work.

You can also use a single blender armature for all the animations including parented rig animations by just parenting the objects to the bones directly and not skinning them.

Good luck with your release

Edited by landeTLS
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...
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...