Z Values of 0.001 and 0.01 are rounded to 0 in Unity3d

Hello,

I am making a road above a flat landscap, the road is at a height of 0 and the landscap at a height of -0.001

After exporting the model to FBX and importing it in Unity3d, the height of the landscap is 0 and not -0.001 when I read the vertices from the mesh in unity3d, although the model seems allright in the scene in Unity, it seems that Unity3 is rendering the landscap at -0.001. But after using sort elements in Blender, then some textures of the road are not shown as if the landscap and road are both rendered at a heigth of 0 in Unity3d.

So my question is how can I get a height of -0.001 in Unity3d? It seems that Unity3 is rounding -0.001 to zero. A value of 0.01 is also rounded to 0, but a value of 0.1 in Blender stays 0.1 in Unity3d. I applied location transforms and the problem stays the same.

Anyone have an idea?

Welcome :tada:…
this community is eager to help any questions about blender and maybe the interwork process of any other software…

But this is a specific Unity3D question and you would be better of to ask it in any Unity3D forum…

Anyway: Didn’t you answered you own question? Unity3D seems to use only a decimal place of 1 ?? If there aren’t any settings in Unity3D to change this then nothing in blender will help you.

(One possibilty may be to upscale the object in blender and downscale it in Unity3D…)

1 Like

Thanks for your help!

I thought I can ask it in the game engine section, or is this only about the Blender game engine specific? A lot of people use Blender with Unity3d or a different game engine.

In the scene in Unity3d you can set cooridinates to 0.001 and also through c# script. But maybe you are right, I will ask it at an Unity3d forum.

And do you maybe know why after using sort elements in Blender the textures of the model getting smudged in Unity3d?

Of course you can try…but there are how much engines in the world…

I have no idea why this should be so… maybe even missundstand this and also have no possibilities to check…

So i was just trying to increase your changes to get any answer :wink:.

I’m not aware of any precission settings in the blender FBX-exporter… maybe (as said) it’s scaling problem… mkae it bigger in blender and smaller in Unity…

This section is technically for the Blender Game Engine, questions about Unreal and Unity usually go in Other Software. don’t worry about it, I already moved it over :slight_smile:

My first thought is: scale up, export, import and scale back down.
My second is: Does the exporter round that value, or does unity?

2 Likes

Thanks all for your advices and help!

EDIT: maybe I cheered a little too early, the model looks better now in Unity3d but there is still some texture smudging from the ground with the road in Unity3d after using sort elements in Blender. I didn’t notice it first, maybe I start a new topic about sort elements.

Scaling up and down might be a good solution.

I modelled the ground below the road again and this time applied the transform earlier. The model now seems allright in Unity3d :slightly_smiling_face:

Good question Doc_Holliday, I’m not sure, maybe Unity does? The model seems allright now, although there are no -0.001 values or 0.001 or other low values in the vertices.