Unity FBX import issue

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
portablecow
Posts: 5
Joined: Tue Dec 02, 2014 5:22 pm

Unity FBX import issue

Post by portablecow »

I'm trying to import a 2d character into Unity3D and having problems. When I import the FBX file created by AS it treats it like a 3D model and splits the character into separate shaders that it calls "vector1, vector2..." These loosely correlate to the layers created in AS but some are merged together. The imported character itself is blank and only the animation has the actual character fully formed. Is anybody else having this problem? Is there a way that I need to re-label the textures to get the character put back together again? Are there certain import settings I need to change in Unity?

Thanks for any help,
PortableCow
User avatar
llamapixel
Posts: 45
Joined: Mon Feb 10, 2014 1:52 am

Re: Unity FBX import issue

Post by llamapixel »

Unity3d has two ways of dealing with 3d models.
The first way is it interacts with the installed software and behind the scenes does an import if it recognizes the application.
The 2nd way is it imports a file without conversion.
Which way are you using?
What version of Unity3d are you on?
If you make a blank Unity3d Project and just do the import, somethings might be more clearer to what is happening.
Do you intend to use the 2d sprites like a flipbook of cells?
I guess it is making textures and relying on you to put them back into a flipbook style animation for use.
portablecow
Posts: 5
Joined: Tue Dec 02, 2014 5:22 pm

Re: Unity FBX import issue

Post by portablecow »

Thanks for the reply! I'm using Unity 4.6 and importing the fbx into an existing project. I imported a character that didn't have bones and it worked after I changed the shader to "sprite" and added sorting layers and adjusted the layer order. When I import a rigged character with bones it imports all the layers jumbled and I have to re-align them manually. I'm mainly a coder and this is my first time working with art and animation so it's definitely out of my wheelhouse. I could very well be doing something wrong. I initially used unity's built in animation tools which aren't as robust as AS but I was able to take a character made up of several sprites with individual colliders on it. I can do my melee combat with the colliders and I'm not relying on raycasting when characters fight. My character also has a rigidbody attached so I can use the physics engine. I have all this working with Unity's animation tools. I'm just trying to use AS more developed tool suite to make my animations better.
User avatar
llamapixel
Posts: 45
Joined: Mon Feb 10, 2014 1:52 am

Re: Unity FBX import issue

Post by llamapixel »

No worries, If you want me to test a created example project, let me know.
I have 4.6 as well as AS
I haven't explored this yet but is the FBX export like 3d panels acting as 2d cells in a bone hierarchy.
Like Zombieville usa characters. http://learnunity3d.com/wp-content/uplo ... _unity.jpg
Or is it exporting a bunch of full framed cells which you are require to flip through.
portablecow
Posts: 5
Joined: Tue Dec 02, 2014 5:22 pm

Re: Unity FBX import issue

Post by portablecow »

I haven't done a great job explaining the problem so I appreciate your patience. The animations appear to be working properly (i.e. the game character looks how I rigged him and animations are fine). The actual prefab of my character is initially blank because it's using a mesh renderer, mesh filter, and shader for each layer (which corresponds to a body part of my character). I change the shader to use default sprite and then I can see the appropriate body part. However, the positioning of the layers (each layer corresponds to a body part) is jumbled (it doesn't look like my character in frame 0 of AS). The XY coordinates of the transform of each layer aren't accurately recreating my character even though the animations are accurately placed and looks like it does in frame 0 of AS. Basically, I want frame 0 of AS to be my prefab model and initial character appearance when he spawns then call the animations when he begins walking, kicking, etc.

Once again, thanks for your help!!
User avatar
llamapixel
Posts: 45
Joined: Mon Feb 10, 2014 1:52 am

Re: Unity FBX import issue

Post by llamapixel »

Give me a day or two to reply I will do some tests now I have both applications and get back to you.
User avatar
llamapixel
Posts: 45
Joined: Mon Feb 10, 2014 1:52 am

Re: Unity FBX import issue

Post by llamapixel »

Sorry about that delay, some guy in a red suit tried to break into our place....

So It appears there is a lot to answer in this and I made a test for you with notes.
The animation sequence did not seem to run in a 3d package that read FBX or in Unity 4.6.1 Free ( In case you didn't have Pro )
It is basically spitting out a 2d poly plane and then uv mapping that object in this firs initial test.
All of my work tests are in this zip for you to review.
In another couple of days after new years I can take another look but short on time in the holiday season at the moment mate.

https://dl.dropboxusercontent.com/u/305 ... nity3d.zip

Test Character
A very simple 12 fps character with 4 shapes and one small animation on the star.
Exported a few times to different formats.


Cheetah 3d Notes

• Extra Camera seen in Heirachy
• Centre of Model same as in Anime Studio
• Model appears to be uv mapped
• Character is collapsed to one 3d Panel of 2 polygons

• Animation Frames of 12 seem to be carried over.
• Star does not seem to animate.

Unity3d notes.
• Extra Camera seen in Heirachy
• Model appears to be uv mapped
• Star does not seem to animate.
• Material of Texture one sided, a shader can fix that and it was rotated 0 verse 180 to be visible to default camera.


No boned characters were tested yet but I will catch up with you after the new year with that test.
User avatar
llamapixel
Posts: 45
Joined: Mon Feb 10, 2014 1:52 am

Re: Unity FBX import issue

Post by llamapixel »

I had a tiny amount of time this morning to validate the bones were coming through.
I need to test the animations next time which will probably be in the new year.

https://dl.dropboxusercontent.com/u/305 ... st_002.zip
portablecow
Posts: 5
Joined: Tue Dec 02, 2014 5:22 pm

Re: Unity FBX import issue

Post by portablecow »

Must've been the same guy I chased off...

I really appreciate your help on this matter, I'm so new to this I can't tell if I'm doing something wrong or if it's a bug in the software. I typically assume it's me (it always was back when I was dating). I'm going to look at the files you uploaded to see if that's what I'm seeing, too. I hope you have a great new year!
chrisoshea
Posts: 5
Joined: Mon Sep 01, 2014 1:28 pm

Re: Unity FBX import issue

Post by chrisoshea »

It depends if your camera is facing into the positive or negative z direction.

When I import FBX from Anime Studio to Unity, by default I am looking at the back of them. I need to rotate on Y axis by 180 degrees. If you simply change to a double sided shader, then you will still be seeing the model from behind but everything will look like its in the wrong order (layers on the z depth). Try importing (using the standard shader) and rotate on Y by 180 degrees.
User avatar
llamapixel
Posts: 45
Joined: Mon Feb 10, 2014 1:52 am

Re: Unity FBX import issue

Post by llamapixel »

A better way to manage this at the moment is to use a empty container "game object"
Stick all your game assets into this Object for this specific character / NPC / Gamething and rotate the intended model / panel.
http://docs.unity3d.com/Manual/HOWTO-FixZAxisIsUp.html

I have been looking for a freeze transformation feature like Maya has and have not tested it yet but it is probably in effecting the mesh pivot and mesh data at a lower level.

Related Documentation
http://forum.unity3d.com/threads/freeze ... ons.68955/
http://answers.unity3d.com/questions/76 ... eshes.html
http://wiki.unity3d.com/index.php/PivotManager
User avatar
llamapixel
Posts: 45
Joined: Mon Feb 10, 2014 1:52 am

Re: Unity FBX import issue

Post by llamapixel »

I am not going to have time for the animation test until after I return from Japan in Feb. Hopefully you can play with what I have there until then.
User avatar
llamapixel
Posts: 45
Joined: Mon Feb 10, 2014 1:52 am

Re: Unity FBX import issue

Post by llamapixel »

I made it back from Japan, what a mission!

Did you sort this out or need some more input mate?
portablecow
Posts: 5
Joined: Tue Dec 02, 2014 5:22 pm

Re: Unity FBX import issue

Post by portablecow »

I'm glad to hear you had a good trip in Japan. I gave up on getting my character into Unity. I'm hoping it gets a little simpler eventually with updates. I'm a programmer and this was an attempt to create serviceable graphics for my game. I'm just not a talented artist/animator so I'll probably have to find somebody to do the art.

I do appreciate all your help on this matter. It says a lot about a person when they're willing to help a total stranger.

I do have some placeholder art for my game right now and I'm getting ready to post a pre-alpha build. I'd love to get your feedback on it if you're interested. It's a multiplayer arena battle game where you drill for resources so you can transform into a mech and fight the other players.

Thanks!
Post Reply