Search code examples
user-interfaceunity-game-engineaugmented-reality

Why models are so big when imported into Unity ?Similarly canvas is too big?


after I import models into unity when tested in real world is huge.The canvas when compared to the huge model is many times huge in unity editor.Since the screen-space of the canvas is given as Overlay no problem arises.When I want to place a text inside a canvas in world-space the problem arises.For that when I try to create canvas it must be really small values like width =1 and height =2.It is so small that I cannot add a text into it.The text becomes so small and blur.I cannot increase the size of the models as they become huge in real world.


Solution

  • This is a quirk of Unity which you have to get used to. Unity doesn't specify unity of distance, and 1 unit can represent different sizes.

    Canonical interpretation is 1m for 3d objects, and 1pixel for UI. As the default UI defaults to screenspace, you'll get a canvas that is almost two kilometeres long (for HD), if you assume a box is 1x1x1m.

    The easiest way to place world UI in a useful way is to scale it down, I typically use 0.001 scale for worldspace canvases, which gives a real world pixel size of 1mm.

    As far as imported models go, the root cause is generally the same - other 3D packages might not be the metric scale, which results a difference in scale that needs to be corrected. If you have acces to the 3D package used to produce the content its best to just set it to use meteres before exporting the mesh