Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What does really mean the "forward" direction?

Discussion in 'General Discussion' started by anthonov, May 28, 2021.

  1. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    This kind of thing looks absurdly easy, BUT

    In Blender when you pop the monkey model, the direction it is looking makes you think that this is the Forward direction.
    This is reinforced when you select the front view, showing its face.
    So up axis (+Z) = the direction from bottom to the top of the object,
    and forward axis (-Y) = the direction from the back to the front of the object.
    BUT
    This is only the monkey's point of view. In reality the Blender's documentation mention that the coordinates system is +Y forward.
    https://docs.blender.org/manual/en/2.80/addons/io_scene_fbx.html
    So that means the Forward is the direction YOU are looking. This make sense when you select the Left view, it shows the side of the monkey from where your left is when you look the +Y direction, not the left side from the monkey's point of view.
    OK, so that mean when you work on a model, its front is backward your forward direction. That could make sense.
    BUUUUT IN UNITY
    The forward direction is +Z.
    https://docs.unity3d.com/ScriptReference/Transform-forward.html
    Let's pop a Text UI object.
    In which direction do you have to look to read the text ? In other term to see its front, like if it was the front of the monkey ? What happen if you select the front view in Unity ?
    Then it shows you the UI's back. The characters are inversed and that makes no sense to me.

    Of course it's not a big problem. Just rotate the things as you want. But this subject lacks of consensus and it makes me go into loop thoughts about coordinates systems.

    Google gives you any kind of very differents opinions from confidents people. Some says Blender is -Y forward with left hand system, other that it is +Y forward with right hand system, same story for Unity.
    What a big confusion time when it come to export a FBX model from Blender to Unity. No consensus either for choosing the right settings. Most tutorial/"docs" I found tries to make the monkey looks toward the +Z direction in Unity, which is the first intuition I mentioned at the begening. (by making forward = -Z and up = +Y in the fbx export setting, and apply transform).
    But following the fact that the forward is YOUR forward, keeping the monkey facing the same direction would means make it looks toward -Z direction in Unity (by making forward = +Z and up = +Y in the fbx export setting, and apply transform).

    To my understanding, Blender is +Y forward, and forward mean this is the direction you look when you work, and your work is facing you. (in the case that we have to give a face to something, like a head).
    Unity is +Z forward, but the front view awkwardly shows you the back of the UI.

    I have searched for the meaning of the "left or right handed" thing : It is not clear at all what these thing are and what are their final utility here. I never felt the need to use them. Wikipedia talk about rotation around the Z axis for the thumbs up. But in Unity the Z would be the index if you point forward with your hand. So I have absolutly zero idea of the meaning of this thing that everyone like to talk about for obscure reasons. I have read somewhere it's useful to guess cross product results. (which I just like to test random and see if ok)

    Let me know your thoughts
     
    Last edited: May 28, 2021
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    In unity engine, click any object, and switch "coordinate system" to local.
    For that object, blue axis is forward, green is up, red is right. Blue is local Z, green is local Y, red is local X.

    When you export things from blender, the exporter takes care of coordinate system conversion.

    When you design models for unity in blender, the model must be looking at you when you switch to front view (numpad 1).

    Meaning it should look in direction opposite of global Y using blender coordinate system.
     
    Ryunya and kaancetinkayasf like this.
  3. I don't know enough about Blender, so I will pass on that. I have a setting which was set by a plugin or something, it mostly works.

    Unity has a "left handed Y up" coordinate system. If you want to learn/memorize the direction, here is what you need to do:

    - raise your left hand in the front of you
    - point your index finger up
    - point your thumb to your right
    - point your middle finger away from you

    If you followed this, then your left hand magically became the orientation gizmo. Your thumb pointing to the positive X axis (left: negative, right: positive), your middle finger pointing towards the positive Z axis (away from you: positive, towards you: negative) and your index finger pointing towards the positive Y axis (up: positive, down: negative).

    In rotation:
    If you take your left hand and point your thumb up (like in the "good job" way), and you close your other fingers, then:
    - your thumb will be pointing towards the positive Y axis, your thumb will be the Y axis, your other fingers will be pointing towards the positive rotational values when you rotate around the Y axis.

    Here is a short lecture on the matter (and notice her left hand in the thumbnail)
     
  4. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    Is this just a complicated way to say that the 3 axes turn anti-clockwise in their directions ?
    Or is there something more ?
     
  5. Clockwise is the positive rotational value. See? :) And it's a visual aid for people who can't remember these things.
     
  6. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    There is a couple different coordinate spaces.

    World space, local space.

    World is absolute, local is relative.

    Different programs define directions different ways. Maya says that Y is up, so does Unity, but some others say Z is up. Really doesn't matter because if things aren't acting right you just swap the axis and try again - there is only three to choose from so this isn't something where you will sink time even if you dont get it right the first time.

    The relationship between world space and local space is all you really have to track. If one object is parented to another it inherits the transform, so that can be confusing if you arent aware of how inheritance works.

    Right hand and left hand is just a way to say which axis they say is "up."

    Nothing you really have to memorize because all the apps show the manipulator on the object so you can see how its oriented. Just be aware of if the manipulator is showing world space or local space. That is usually something you can toggle between.

    If you don't know how numbers on a number graph work, just go look at one real quick. One side is positive, the other negative. Same for up and down. Don't worry, it's easy stuff. If it sounds complicated, that is because you are trying to understand tools outside of the context of the problems they solve. Better to just develop, run into a problem, and then it will be easy to understand how the tools work.

    Dont read forums to find out the coordinate system for a program. Just look at the documentation. People on forums have no idea what they are talking about. :)
     
    Last edited: May 28, 2021
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Nope. Thinking about three axes turning counter clockwise is overcomplicated, because which way is clockwise is matter of convention.

    There are two coordinate systems - left handed and right handed. Left/right handed allows you to determine where the last axis will go given the other two. The idea is to assume that X is your thumb, Y is your index finger, and Z is your middle finger.




    An engine or modeling ssoftware can use either way, and still pick arbitrary axis as "forward", "right", "up", etc.
     
  8. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    I think I get it now, just represent the three positif axes with your 3 main fingers (the idea is you can do it only with one of the two hand), and the others 2 folded fingers will tell you the direction of the rotation when you raise the thumb axis value. right ?
    What about the monkey looking toward -Y in Blender and everyone trying to make it look toward +Z in Unity ? Am I right saying it should looks toward -Z in Unity ?
    And the front view in Unity showing the back of the UI ? strange or normal ?
    [EDIT]
    you can represent the positives axes with the two hands, but only one will rotate the same direction of your folded fingers and your object when you raise the thumb axis value, I think this is that.... how to cross out my words at edit ?
     
    Last edited: May 28, 2021
  9. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    open a new project in unity. Find the widget in the viewport. It shows you the world coordinates.

    Import the monkey from blender into that scene. Select it and turn the manipulator tool to be in local space.
    That will answer the question.
     
  10. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    I don't know, if the monkey looks the negative forward in Blender, It should also looks the negative foward in Unity to me. So settings at export needs to be "forward = +Z and up = +Y in the fbx export setting, and apply transform"
    then in Unity make rotation all zero and it should looks -Z. My idea here is to keep it looking the same direction relative to the forward in both soft, because why not ?
     
  11. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    in that case you use the automatic import settings - they work. You are triyng to solve a problem already been automated.

    if you are trying to understand something you need to reduce the number of variables.

    When you export your model from blender make sure its transforms are frozen/zeroed out. Orient it the way you want. When you import into unity it should be the same. THe only thing that changes is what they call the axis, but the absolute number values are the same.
     
  12. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,614
  13. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I just tested a model from blender. I just exported with default settings and drag/dropped into unity. It is working exactly as expected. The color of the axis changes but that doesn't matter. its like saying tomato versus tomahto. The orientation is the same.

    upload_2021-5-28_12-59-0.png

    If it isn't working like this for OP they probably changed some settings. SHould be able to revert to default.

    I don't know how to freeze transforms in blender but you will probably need to do that as well if the thing shows up not in the same world space location as it was in blender.
     
  14. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    No, the default preset in Blender for exporting is forward = -Z and not applying transform. In Unity if you set rotation value to all zero, the monkey looks down.
    If you re-export with apply transform, the monkey will look toward Z direction, which is the forward direction in Unity, and it was the negative forward direction in Blender, so not the same forward before-after.
     
    Last edited: May 28, 2021
  15. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    well apparently it is a lot more complicated than i can understand but somehow i make it work. who knows.
     
  16. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    Does the blender exporter "change axis" actually work now? Years ago all it would do was rotate the model. Instead of (0,0,0) in the Inspector it wold put some 90's and -90's to fix it. But for real the model still faced the wrong way, which was a problem if you used model.Lookat(). The feet or side would be looking-at where you wanted.

    Also, fun facts: Unity uses the wrong coordinate system. Blender's is correct. In school we see x/y on a blackboard -- x is sideways and y is up/down; so clearly z is forwards/backwards. But for real x/y should be drawn on the ground, like a map. x is sideways, y is ahead/backwards and z is the 3rd dimension of up/down. That makes more sense, really x/y as a spot on the ground is far more useful.

    Other fun fact: the funny -Y's and counter-clockwise rotations are to make the math work out. It turns out you can't just put everything the way you like it: +y is up and not down, all rotations go the "right" way, and so on. To make the math doesn't work out something has to go the "wrong" way. It turns out there are only two ways we can make it work as close as we'd like, which we now call left and right-handed systems.
     
  17. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    What are the rotation numbers in the Inspector?
     
  18. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    its all zeroed
     
  19. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    I'm convinced that this is the right direction for the Blender export. I've adopted this in my code. Sometimes, child objects can be difficult to deal with though. I haven't fully tracked it down. But also, you run into issues with Mirrored objects and Linked Objects, so you have to make sure that the Blender file is pre-processed before doing this.
     
  20. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Hmm, that's good to know. Maybe they finally fixed something. I've fixed this problem in my pipeline no less than 4 times in the last 5 years, so I may revisit it again in the next few months.

    EDIT: Also, is that mesh rigged? I know I have differing results between rigged and non-rigged objects, and I cringe if I have to update my rigged objects yet again.
     
  21. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Usually import/export tool tales note of what is used for left/right/up in input and maps it whatever the target expects.

    However, it can perform conversion imperfectly, by inserting a "fixer" transform into the hierarchy rather than doing the full conversion.

    There's no correct coordinate system.

    Here are possible arguments for each system:

    * "X should point right, Y should point up and Z should point forward because X/Y direction match school coordinate system, and we're looking through image plane!"
    * "No, Z should point backward, because we're writing an opengl application"
    * "Y should point down! it is traditional coordinate system used in computer. Upper scanlines have smalle address, so with the increase of Y value, address goes up, hence Y should point down!"
    * "Y should point forward and Z should point up, because that would allow you to look at the map of the scene from above and map the area map onto scene naturally"
    * "Z should point up, and Y down, to match the traditional coordinate system"
    * "X should point backward, Y should go right, and Z should be up, as this is a traditional depiction of cartesian 3d..."
    * "X should point forward, Y should go right, Z up, because we're Unreal engine and want to use traditional depiction of cartesian space, but left handed matrix..."
     
  22. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Its only a mesh, no rigging.

    I never use blender, i just downloaded the latest version about a month ago so i could export some models I downloaded that only had the blender format into fbx.

    I just dropped the model into blender, then exported it again as an fbx. Dropped it into unity and the orientation is the same.
    I also tested making changes to the rotation. I had to look up how to freeze the transforms. I did what is described here: Blender | Freeze Transformations(Transition from Maya) — EVAN COATES 3D

    I exported that and it worked as expected, meaning it showed up in unity facing same way and with zero rotation values.

    Some of the terminology is different, but the common practice for exporting a model is that you delete the construction history and zero/freeze the transforms. Usually you would put the model at 0,0,0 as well. If you have models showing up to unity with values in the transform that is going to cause problems and make work confusing.

    I saw some instruction for blender artist about how to freeze transforms and they are telling you to center the pivot first. This is problem with freeware stuff - you get more cases of the blind leading the blind. Centering the pivot has nothing to do with freezing the transforms. (not knocking on blender, but you got to be aware that jsut cause somebody says something doesnt mean its right. And if it sounds complicated, the person probably doesnt know what they are talking about. 3d is simple, its not complicated.)

    I am guessing OP has read a lot of overcomplication of simple things, they messed up a lot of settings they didn't understand, andd now they are knee deep in the weeds. Thats why I am saying, just reset everything to default, follow these simple steps, and it will work. Forget the monkey for a minute and just test with a cube. Reduce the amount of variables you are having to track so that your eyes can see what is happening.

    This is what you have to do to debug a problem. Dont guess at things. Reduce and simplify so that you can identify the breaking point. Then you change one variable at a time so you can see what is affecting what.
     
    Last edited: May 28, 2021
  23. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Well, you still need something directional.

    It's very important as @neginfinity mentioned, that the model faces forward in the -Y direction in Blender. Most of the auxiliary tools rely on this, which include rigging and Unity physics (i.e. wheel colliders).
     
  24. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    you can apply a different material to one face. Then its directional.

    I dont know about rigging in blender, but most rigs will have a global transform on top of everything else. So if I make a looping walk animation, even if it exports and it is faccing teh wrong way in unity, all i have to do is add or subtract 90 degrees to the global transform.

    I mean you shouldnt have to do that but again, this is a case of overcomplicating things for somebody who doesnt yet know which way is up.

    By the time they are figuring out rigging and physics they will be able to figure out the rest, but right now they cant get a handle on basic static mesh exporting, so i dont see the sense considering all the possible caveats. This is very important thing a lot of people don't understand when making tutorials. If you try to tell a person everything they will learn nothing. So sometimes it might seem like important details are skipped over, but usually it is necessary to begin without added complexity so a person can actually learn and not just try to memorize.

    The fast way to come to an understanding of what is happening is to export a simple model with default settings, then go through the settings and change ONE variable at a time. When you see and understand what happened, then you'll be able to figure out the more complicated stuff. But you dont start with the complicated stuff.

    It is true that the monkey head and a cube are essentially the same. But I make an assumption by now that the OP has probably made a million changes to the monkey so its not trustworthy for testing. A cube primitive provides simpler feedback and is guaranteed not to have any changes on it.

    I'd take the cube, apply a material to once face, export it default settings, then make 90 degree rotations and export with and without transforms applied. watch what happens. Have the two programs open side by side so you can compare directly. You'll understand in 5 minutes and not have to read a single big braniac word.

    I wouldnt go after a third party exporter without understanding how the default one works first. That will invite more problems down the road. I have just tested the latest version of blender and it is working as expected with default settings. So that is everything needed to know - it does work, at least in the case of simple static meshes - so then any anomalies are most likely user error.

    People never want to slow down and learn this way because of too much pride. They want to take on all the complicated stuff and just ram knowledge into their mind like big tough guys. And then you see them flailing to understand things that are so easy, and they take it personal if you suggest slowing down and taking things one step at a time. Or they blame the software. Question why things are so complicated. They aren't! Just the user trying to go too fast.
     
    Last edited: May 28, 2021
  25. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    Oh yeah even in this thread there are contradictions.
    You are wrong here, I have several game with some advanced physics behind me. (Im not a big math guy, I just love procedural animations)
    I usually don't care of what happen to the axes at exporting/importing because I simply do not rig and I manually animate all my objects by code, nothing pre-animated, my tastes are procedural and real time animations.
    I just tried to properly understand how Unity convert Blender's import, and how Blender prepare exports for whatever you need. And it is clustefucking because as I said in my first comment, some confident people come and claim the truth. Then someone even more confident says the opposite.
    My simpliest thought for axes conversion is : that if you model in blender is facing forward with zero rotation, then it should also face forward in Unity with zero rotation. Kind of simple rule.
    But with the Blender's default settings for export it is not possible. Unity will try to rotate or parenting your model to make the trick.
    And everyone everywhere on the internet want the monkey face the forward direction in Unity when it was facing the opposite direction in blender, why ? Is this has any sense ? Are everyone fooled by the "forward is where your model should looks ?" and do not understand the Blender's "forward is where you should look to see the face of your model" ?

    Again the only way to make your model/monkey keep aligned with the same forward direction in Blender and in Unity, is to export with the setting : forward = +Z and up = +Y and apply transform. and this is not a default setting. (and to me this make sense with a long reflexion)

    All of these question do not stop me from work. Im just curious to know which direction I should look to get closer to the truth.
     
  26. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    well i just make things work like you and dont care whats happening so long as it does. If you want to understand how exactly it works I think you should go to the documentation, not ask on forums.

    sounds like you know enough you could read the unity documentation and probably make use of the 3rd party tool there which probably also has documentation explaining why it exist and how it works. As far as I can tell things just work as I would expect so I dont see the problem though.
     
  27. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,614
    What makes you say that? Maybe the blender Monkey is just backwards. ;)
     
  28. anthonov

    anthonov

    Joined:
    Sep 24, 2015
    Posts:
    160
    That's the part of the story that makes me sad.
    In my first comment, I linked the official Blender's documentation part about the fbx export and coodinates system that I could found. It's just all "to do, to do, to do..." In fact there are no real doc.
    Same for Unity.
    I linked the only thing I could find in the Unity doc about direction in its coordinates system. And it not even very evident, you have to deduct about it. Then its doc about the fbx import is just "make the right settings for export if you want it good in Unity" and good luck.
    If you can find more than me in both official docs, then I would be happy you show me.

    The best I could do to have a better understanding could be to works heavily with exporter and importer for many different task, which I don't. I could also go to private computer school and get a heavy background. But, no time infortunatly.
    So Unity forum.
     
  29. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I mean I just tested it and it seems to work like expected. I do my work from Maya and have exported and worked with hundreds of different rigged characters and thousands of static models. As far as I can tell there is no difference between blender and maya - I follow the same protocol and it is working how I would expect.

    If you have to figure it out on your own because of scant documentation, the easy way is to do like I said and just test one thing at a time with the cube. We are talking about 90 degree rotations and simple -1 or +1 math here so I think what is happening should be easy to identify. I'd just reset settings to default and see if I cant find a way to get consistent exports with predictable behavior.

    Also, just a note, is you refer to an objects forward vector usually that is in a local context. Like if I said MY left, that is local to me. If I say East, that is world space - it is the same for you and me.

    In 3d its just called local or world. You probably know this but reading all this is so confusing, its good to start back from the beginning to make sure everything is accounted for.
     
    Last edited: May 28, 2021
  30. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    This is getting silly.

    Blender orientation:
    upload_2021-5-28_22-23-52.png
    Unity orientation:
    upload_2021-5-28_22-24-11.png

    I did tick "Apply Transform", though.
    upload_2021-5-28_22-24-57.png
    There aren't any rotation in the hierarchy, it is all identity transforms.

    The thing is, in blender when you're modeling it doesn't really matter which way is forward. You don't ever think about it. You focus on modeling.

    However, the convention is that when you start modeling a character, you have to see their face when they're in front orthographic view.

    upload_2021-5-28_22-27-53.png

    Apparently, it means that in blender they're looking back.

    However, who the heck cares? If you make the model in this way, it'll eb looking into the right direction in untiy. That's all that I need to know.
    -------
    So, like @kdgalla said, when you look at the model in "Fron Orthographic" view it is technically looking back, however because nobody gives a hoot about which way is "forward", it will look in the right direction in unity.

    It is also a good idea to keep in mind that there's more than one way to transfer model from blender into unity.
     
  31. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Do you do much modeling?

    Making sure your model is scaled and oriented so that you can send it to your final render engine is the first thing you should do before any modeling happens. There is differences in cameras and rendering throughout all programs so setting up a pipeline to the final render engine is key to avoiding surprises.

    If your model isn't facing the front ortho camera in blender, you should rotate it so it does, then apply the transforms. That way when you export you wont have surprises.

    Again, I have tested here:
    upload_2021-5-28_15-37-26.png

    This is the front camera in blender.

    This model was exported from maya with the same orientation. In unity, it also has the correct orientation. It was originally a model made in Max, and guess what? I exported from there to. This one model has been through basically all of the major 3d apps and made it safely into Unity without any surprises the whole way. Always no changes in the export options. Front is the same in all programs. Just freeze the transforms and export and it magically works.


    You guys need to rotate the monkey to have the corerct orientation in the program you are using and apply the transforms. Having it oriented correctly in the modeling program you are using does matter, as soon as you start trying to rotate aroudn and work you will notice that immediately.

    If it is not showing up correct in unity, you need to reset the export and import settings and try again. This is a case of user error.

    All of these programs are mature. Many professional products have been created using them. By now, they know how to communicate with eachother so that one programs "front" will be so with the other program. If that isn't the case, it means you borked a setting in the import or export somewhere, or you forget to apply/freeze transforms. That's basically all that can effect it. It's not hard to debug.
     
    Last edited: May 28, 2021
  32. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    Ah. That's way off. All game designers know you always have to adjust coordinate systems. Unity doesn't tell you that since it got popular by attracting game designers, from other engines. Those people imported lots of Blender models into their old game engines with tweaked systems. All they needed to know from Unity is what you saw: "+z is forwards, +y is up".

    Why doesn't Unity have a "basic game design for novices" section explaining that stuff? Well, teaching is hard and Unity Co. isn't a teaching business. Also game designers somehow learned this on their own before Unity existed. It's tough to see how the time to make a good intro would really help Unity. It's kind of like how hammers don't come with instructions -- most people buying them know how to use them. Adding instructions would cost more and wouldn't sell more hammers.
     
  33. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I've demonstrated here that Maya, Max, Blender, and Unity all interface with each other without issue using default export/import settings.

    Ragging on the nebulous corporation "unity" is great but what is on display here is several people who don't know a lot about modeling are saying things that aren't true and complicating something that could have been solved in 2 minutes. Interestingly these are the same people who have a lot to say about others who make educational content on the internet, and how bad information "waste time."

    In the future, OP, if you have a problem with 3d models, go to a place where professional 3d modelers hang out. Like polycount. You go to the most relevant experts and youll get the best answers.
     
  34. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    You start with a nitpick and then end up writing a wall of text that agrees with everything I said. You know, there are screenshots, and the axis widget is visible on them. For a reason.

    As I said, to have correct orientation in unity in blender you need to see model's face in front ortho view. That's the only thing you need to know.

    Apparently that means that actually the model in blender is looking backward, while in unity it looks forward, but nobody cares, because if you want the correct orientation in unity, that's how you need to orient it in blender.

    So it doesn't matter where the "forward" TRULY is in blender, because if you want correct orientation in unity, that's what you normally do.

    That's not true. People dealing with renering have very different needs and that shows. You may end up in a situation "why the hell would you want a weapon bone. Ah, you should've said it is a game engine thing."

    However, unity forums has "Formats and External Tools", and that's where OP should probably go.
     
    Last edited: May 28, 2021
  35. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I dont understand what you are saying. Everybody needs to be able to have predictable results moving 3d content around. This is an issue of axis conversion with an fbx model. People who import and export models all day everyday would be the most relevant experts, wouldn't they?

    The nitpick is because your quoted sentence is bad advice for anybody doing modeling. If that's how you have been working you have been making things harder on yourself than it needs to be.

    When I am reading a thread im usually not looking at who wrote what. What I see here is a big overcomplication to start with from the OP. THen I see more dramatically complicated responses. Many of them are full of contradictions, some are full of things that are just wrong, some suggest bad practices or suggest the writer does not know common best practices.

    This is why most the time somebody comes here and ask a 3d modeling 101 question i usually point them to polycount. There is always a lot of chaff here from people who have done a little modeling but don't really know common best practices or have the experience to quickly troubleshoot common issues.
     
    Last edited: May 28, 2021
  36. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    Additional note, polycount is good because it's not too saturated with noobs like many discord servers are. Most the regulars there have been professional 3d artist for a long time, so overall its higher quality place for advice in regards to 3d modeling, rigging - anything to do with 3d art in general.

    Plus it has a great wiki:
    Coordinate - polycount
     
    Last edited: May 28, 2021
  37. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    I finally had a chance to test this out myself, and I've confirmed for myself that sticking with the default Blender settings of -Z forward and Y AND Apply Transform seems to yield Unity model of +Z and Y up, as @neginfinity evidenced in his screenshots. And yeah, despite @neginfinity may have said some controversial things, what he said is in agreement with what @BIGTIMEMASTER is saying.

    I'll probably spend some time revising my pipeline at some point, but again, with child objects that are intentionally mirrored and linked*, it could still become an issue, but that will be my problem.

    * Mirrored and linked objects must be dealt with a preprocessing step prior to export in Blender. For example, if you link an instance of a wheel, and decide to mirror it (rather than rotate 180), you can't apply the transforms because of the link. It becomes a confusing mess, but it's beyond the scope of this thread.

    EDIT:
    I'm also going to add that I'm on Blender 2.91 and 2019.4.x LTS. I believe somewhere along the line, the behavior has been changed, because I remember my pipeline resulting in -90 degree rotations, and the rest of the Unity community will remember this as well. It's been thoroughly documented.
     
    Last edited: May 28, 2021
  38. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I'd ask a blender modeler about that. It shouldn't be a big thing.

    Sounds like the "link" is sort of like construction history in maya. Once you get to a point you don't need it, you delete the history, then the mirrored mesh it just a regular mesh, and if deleting that link added some transform values you just apply those.

    Again, I dont know how it works in blender but certainly mirroring an object shouldnt cause pipeline issues.
     
  39. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    No. Linked objects is Blender's way of supporting referenced objects, like Maya's duplicate instances, and max's clone reference, so that when you modify one all other linked objects are modified. This gets hairy, because in order to apply transforms before export, you need to unlink each instance, apply transform (in the case that there is a negative scale for mirroring), and then you can relink to keep the reference.

    I've spent plenty of time with this as well.

    EDIT: Here's what I'm talking about:


    I would encourage you to please not assume that you're the only one that does his homework on the forums, @BIGTIMEMASTER.
     
    Last edited: May 28, 2021
  40. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Things get more interesting during export process when skeletal meshes are involved.

    For example, if you're exporting a skeletal mesh, you're most likely going to end up with this:
    upload_2021-5-29_0-23-9.png

    Because "Apply Transform" cannot exterminate this transformation when skeletal mesh is involved.

    In thee worst case scenario you might also end up with a "0.001" scale at the mesh which for some reason surfaces from time to time when you export things. This extra scale will put a wrench in your pipeline if you decide that you want physically based clothes. Because clothing system uses original mesh, and it will end up at 1000 scale if the mesh was scaled down.

    The other amusing thing is that skeleton bones are going to use blender convention for direction. Blender bones are Y-axis forward, and they won't be converted when you reimport them in unity, meaning they'll continue pointing with local Y towards children. You'll have to keep this in mind if you're doing root motion, because basically you'll need to make root bone point Up, and then replace it with a widget.

    Root bonee gets the same treatment, by the way:
    upload_2021-5-29_0-29-26.png
    -90 degree rotation.
     
    aer0ace likes this.
  41. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Yup. I've run across all this mess too. I have a special Export menu for my project that I use to export rigged or non-rigged meshes, that auto-configures Blender's FBXExporter, so I don't have to worry about it much. Of course, it's a lot of up-front work, but it keeps these things out-of-sight-out-of-mind, until threads like these come up ;).
     
  42. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Speaking of which, linked objects are properly handled by FBX importer in unity, except that it isn't documented anywhere.

    upload_2021-5-29_0-34-11.png
    upload_2021-5-29_0-34-27.png
    upload_2021-5-29_0-34-59.png

    You'll end up with multiple mesh filters referencing the same mesh, which will be stored only once in the file. This can be useful when you're trying to make modular architecture, for example.

    Of course, the importer is going to only import the mesh and object hierarchy, so if you have a convoluted setup, or just want collision, you'll need an asset preprocessor or something like that that would turn those references into something akin to prefab.
     
  43. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    Yeah, they definitely are. I guess I should have been more clear, which probably added to the confusion. Say you're making a plane, and you model this fancy aileron control surface, and want to just mirror it to the other side. If you mirror it as a linked object, it's fine with editing, but when you export, of course the normals will be pointed incorrectly. So, you obviously want to "apply transform" before export. But, since the mirrored aileron is linked, you have to unlink it first, apply the negative scale, then relink. I have a script that does this, but if you had to do it manually every time, it gets tedious.

    EDIT:
    Actually, I think the apply negative scale is a destructive step at this point, so I don't think I relink.
     
    Last edited: May 28, 2021
  44. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,614
    YES! This is why I use that special Blender export script that I linked in my last post. It fixes that problem! :D Man, I got so tired of that nonsense...
     
    aer0ace likes this.
  45. Owen-Reynolds

    Owen-Reynolds

    Joined:
    Feb 15, 2012
    Posts:
    1,992
    Way back we got lots of beginner Q's from beginners using all of these Blender adds-on, wondering why they fell off after exporting into Unity. My favorite was an add-on turning 1 bone (often a spine) into a dozen. The basic problem was no one ever told them about Low vs. High Poly models. How half of modelling is for movies and would never work in a real-time game. That stuff was meant to be used inside of Blender to render out a 30-second movie clip overnight. Sure, it was possible to bake the add-on into your export but you shouldn't. You didn't want each NPC orc to have 94 bones and 50K verts.

    The OP seems to be coming from an odd place, learning modelling for Unity w/o knowing Unity super well. Most people interested in models have probably already grabbed wrong-pivot, wrong-facing, crazy-scale models for their Unity projects and had to learn to parent-trick to fix them. When they get into modelling they're like "ah, this is why some models always face up". They've fixed this problem a dozen times for other people's models.