Grass/Trees from Blender to Unity Incorrect Rotation (Googled Fixes, still not working)

I am trying to paint grass in unity with a grass model I’ve made in blender. The grass is keep wanting to lay on it’s side. I’ve tried rotating it in blender like most people are saying to do the R X 90 and then in Object Mode R X -90. This does not work.

I’ve Also trying rotating it correctly in unity, then making it a prefab, then using the prefab to paint the grass and trees, but this still does not fix it.

Any help would be greatly appreciated, thank you.

Blender

Unity

Typically when you import a model from Blender, the axis are screwed up by a factor of (90, 0, 0). There’s a script around in the Internet ether that rotates Blender imported models by (-90, 0, 0) to get them reoriented. Usually this means your model has to be rotated by that amount in order to appear correctly. That’s easy enough when you’re just dragging into the scene, as you can set the prefab defaults and drag and drop.

What’s probably happening using the Terrain paining tool is that the objects get instantiated at a default (0, 0, 0) rotation. The Unity terrain system probably makes the assumption that models are imported using the correct orientation.

I’ve never used the Terrain system due to its horrible reputation, so I can’t give you any advice on what to do here if you want to use that. To be clear, though, are you assigning the model to the grass object, or the prefab with the corrected rotation?

1 Like

I have done both the grass object and corrected prefab.

In blender’s export settings make sure you have y up and z forward set when you export (you may also want to try -z forward). This will make sure the models export with the proper rotation.

Alternatively you could try putting the model in an empty GameObject, rotating it properly, and using that as your tree prefab.

1 Like

Option number 3 (after Schneider and Taorcb):

  1. In blender, rotate your upright object along the X-axis by 90degs, so that it’s lying down with the top pointing away from the ‘front’ camera.
  2. Apply rotation (as well as scale for that matter)
  3. Rotate BACK along the X-Axis by 90Degs again (So that it’s standing up again).
  4. Save, but DO NOT apply the new rotation!!!
  5. Drag/import .blend file into the Unity project.

Of course if you export as .FBX I’d recommend using Taorcb’s method - always worked for me. Just use this is a backup alternative.

This is exactly what I do - Set “Forward” to Z Forward, and “Up” to Y Up (you set this in the FBX settings on the dialog)

That’s actually a easy fix, you just have to Set “Forward” to Z Forward, and “Up” to Y Up but how did you get the grass mesh to not slide on the terrain with wind?? It doesn’t work for me and I tried everything.