Home Unity

max to unity. unit sutup

polycounter lvl 10
Offline / Send Message
ashraful mobin polycounter lvl 10
I am working on a project which will use unity and give the output for IOS 3. I have developed some assets using 3ds max 2012. I need to send the assets and animations to unity. I will rig the characters using biped. Now I need to know-
1. which unit setup I should use to export ? which will work in unity and IOS3.
2. should I use real world scale for the character and assets ? will it affect on game play. I mean will it make the game heavy ? after all its going to be a small device game.
thanks in advance for the repays !:)

Replies

  • gsokol
    Options
    Offline / Send Message
    Unity uses the metric system...so work in meters. And yea, You should work in real world scale. Lots of things depend on this....physics, light calculation, etc. Even if you may not be affected by those things, its a good habit to be in. Will it make the game heavy? Surely you don't think that the scale of the models is going to affect the size of the build?
  • Joseph Silverman
    Options
    Offline / Send Message
    Joseph Silverman polycounter lvl 17
    Use FBX. I think with max and unity default settings 100 units from a max fbx = 1 in unity.
  • ashraful mobin
    Options
    Offline / Send Message
    ashraful mobin polycounter lvl 10
    thanks guys ! :) I really appreciate your help. I wonder if you guys could share some more information ! I am going to rig the characters with biped. I found that if I add some extra bone with default biped then the animation will be good. because my characters are little complex. how many bones can I use to run the game smoothly in IOS 3 ? is there any limitations ?( all the demos I have seen using less bones then default biped has) how does the bones effect on game run ?
  • gsokol
    Options
    Offline / Send Message
    Yea, basically having more bones on a character will increase performance hit, which is why the demos use less bones.
  • khepa
    Options
    Offline / Send Message
    khepa polycounter lvl 5
    for the mobile platform game, its better to keep the bones under 30 per character.
  • e-freak
    Options
    Offline / Send Message
    hijacking the thread a little bit: did anyone ever get rid of the fbx import scale 0.01 issue (every fbx gets imported hundred times smaller than intendend) and the axis conversion problem? (All Max fbx files display correct until you try to access the individual meshes within one fbx and they flip 90 degrees on the x axis)?

    also: ha8j5.jpg

    is this the correct unit setup or would i set the system unit scale to centimeters as well?
  • khepa
    Options
    Offline / Send Message
    khepa polycounter lvl 5
    you need to change the Unit and axis conversion setup in the fbx exporter's Advance option. I think it will solve your problem.
  • e-freak
    Options
    Offline / Send Message
    Nope, that doesn't fix the Unity import issues. Unity entirely ignores the Up-Axis and the scale is always set to 0.01 when importing. The only "hack" would be to set the FBX exporter to scale up 100% and then have that reverted by the unity import, but it just feels wrong knowing that it has been up and down scaled before usage...
  • Target_Renegade
    Options
    Offline / Send Message
    Target_Renegade polycounter lvl 11
    One way I got round the axis' problem was to rotate the pivot point of the model in max so that it faced the right direction Up-Right, or something like that, it was a while back. Use the rotation tool on the pivot point and with some trial and error you should get there.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    e-freak, if you want Unity to default to 1.0 you can do something like this:

    Put a text file (javascript) in ...\Assets\Editor\ImportSettings.js (make the folder if needed.)

    Paste this code into it and save it:
    [COLOR="SeaGreen"]// This function will over write the default Unity import scale of 0.01.[/COLOR]
    [COLOR="DarkOrange"]class [/COLOR]DefaultMaxSceneScale [COLOR="DarkOrange"]extends [/COLOR]AssetPostprocessor [COLOR="DarkOrange"]{[/COLOR]
    	[COLOR="DarkOrange"]function [/COLOR]OnPreprocessModel [COLOR="DarkOrange"]() {
    		if ([/COLOR]assetPath.Contains[COLOR="DarkOrange"]([/COLOR][COLOR="Yellow"]".max"[/COLOR][COLOR="DarkOrange"])) {
    			var[/COLOR] modelImporter [COLOR="Red"]:[/COLOR] ModelImporter [COLOR="Red"]=[/COLOR] assetImporter[COLOR="DarkOrange"];[/COLOR]
    			modelImporter.globalScale [COLOR="Red"]= 1.0[/COLOR][COLOR="DarkOrange"];[/COLOR]
    		[COLOR="DarkOrange"]}
    	}
    }[/COLOR]
    

    I haven't tested this, but I think it will work. You can remove the .max check if you want it to scale all models on import.

    As for me, my unit setup in Max is 1 unit = 1 centimeter, and display is set to generic units. I've never had a scale problem. Nor have I experienced the axis problem you describe.
  • e-freak
    Options
    Offline / Send Message
    just found this, which seems to describe the problem pretty spot on. The scale fix looks like a good fix - thanks!

    4phcI.jpg
  • monster
    Options
    Offline / Send Message
    monster polycounter
    I guess we don't export as FBX we just let Unity import the max file. I know it does FBX conversion behind the scenes. But I've never selected something inside a prefab and had it flip on me.

    I'll double check again, maybe my import script is correcting rotations. I created it such a long time ago I don't remember off the top of my head. I know I do other thing like remove reference objects.
Sign In or Register to comment.