Jump to content

Blender to unity problem.


Recommended Posts

I keep on trying to get my .dae to be in the y axis like in 1 and every time when I set unity xrot. = 0, yrot = 0, zrot = 0 it makes it look like 2 I am not sure what I am doing wrong.

1: https://dl.dropbox.com/u/77575413/1.jpg

2: https://dl.dropbox.com/u/77575413/2.jpg

Also what is the best way of determining the number on the x and y axis?

Link to comment
Share on other sites

Well importing from Blender always causes the Z and Y axis to be swapped, once you move the parts into Unity go in and remove and transform rotations and it should be lined up like it was in Blender.

In your 1st screen, you have your cockpit rotated over to the side 90 degrees, so that X is UP; that is going to make it import oddly into KSP too, you want the nose to be pointing to the Z+ axis with the top of the cockpit facing Y+ in blender

Once in Unity, if you're getting unexpected rotation, you can create an empty gameobject and parent your mesh object to it, then rotate it using the transform settings instead of your mesh. This is important for crew cabins especially since you want ladders and airlocks to be facing Z+ so the kerbins are facing the right way.

Link to comment
Share on other sites

I was having the same rotation problems going from Blender to Unity, and after some trial and error with all the default export types, I found that the Wavefront (.obj) worked properly with "Z Forward" and "Y Up" and check "Apply Modifiers", both "Objects as OBJ", and "Materials Groups" (maybe not all necessary).

In theory the Autodesk format should work, too (it's what C7 uses in his tutorial), but it gave me the same rotation problems.

Link to comment
Share on other sites

I managed to get a part to export from Unity but it wasnt perfect , i know i missed something minor .

I followed the 0.15 setup KSP parttools guide , in the example he uses a mesh_collider but in blender i have been using node_collider , as far as i can tell the mesh collider is for radial mounts or attach to , how do you go about setting up a node_collider in Unity and can i import a blender model with the node_collider allready setup ? When tried that , the exported model came out with the node_collider as part of the main visual model.

Here is a better idea of my current problems , import to unity puts my model at an odd angle even after i set rot to 0,also i dont think it will make a mesh collider from the main mesh due to too many poly's (255 max ? ) ? As you can see in the blender pic i set up a node_collider which works fine but when i try to export that model from Unity , the node_collider is part of the visual mesh . My question for now is how to use the node_collider i setup in blender for the unity export ?

huge pics

http://imageshack.us/a/img526/1543/unityprob.jpg

http://imageshack.us/a/img818/9016/blendernode.jpg

(p.s i moved the node mesh up for the pic , its normally centred on the visual mesh)

Edited by orson
Link to comment
Share on other sites

Made some progress , its the little things that are important ... so i found out what the weird import angle was about , i had not applied some changes i made in Blender, by pressing Ctrl+A and selecting rotation / location and scale / visual transformation

Its mentioned in Tiberion's post, in my node helper thread

http://imageshack.us/a/img23/5538/gettingthere.jpg

So while inside Unity i tried some stuff with some success , I imported the model with main mesh and node_collider , dragged it across to the hierarchy , selected the main mesh .. selected Component/Physics/Mesh Collider ... over on the right in the Inspector pane , within the new mesh collider section i just created, in the box to select mesh .. clicked on the little circle far right ..it brings up the mesh assets , i chose the node_collider and it seems to have worked :)

Well it worked to a degree , anybody got ideas about why my nodes are now misplaced ?

http://imageshack.us/a/img571/655/misplaced.jpg

The origin is centred in blender

Scratch that , fixed also ..by listening properly again :P ,

fix to above - so when you export , as mentioned in the parttools video .. you have to clear any and all transformations you dont require , my problem above was due to the part exporter / empty game object having its own co-ords in the Inspector/Transform pane .. after setting those to zero my nodes appear in sync with my mesh .

Getting there slowly

sorry if this is thread hijacking , it all seem relevant .

Edited by orson
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...