Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Detail mesh not painted on Terrain

Discussion in 'World Building' started by santiagolopezpereyra, Nov 4, 2018.

  1. santiagolopezpereyra

    santiagolopezpereyra

    Joined:
    Feb 21, 2018
    Posts:
    91
    Hi, folks. Yesterday I finished a bush on blender and exported it (with two materials) as an .fbx file. Everything seemed fine; when I manually placed my bush on my world, it appeared there, all nice and shiny. But unfortunately, when today I tried to add my bush mesh as a detail mesh on the terrain, in order to be able to paint bushes with the detail brush, something went wrong. Nothing is being painted. On the Details box, where I can see and choose my details, a preview of my other details is shown, but the Bush has no preview; it's empty and it doesn't appear there either.

    I already checked if this was a scale problem, and it's not; my mesh is not painted at all. I even tried to paint all my scene with the bush, with 100% opacity, to see if there was an fps drop (and thus double-check that the mesh actually wasn't there), and as expected my FPS remained with no hit, so nothing is being painted.

    The question is: does anybody know why can't I paint my mesh as a detail using the terrain brush? Why can't I even preview it on the Details box of my Terrain component?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    9,658
    andrew_2992 likes this.
  3. santiagolopezpereyra

    santiagolopezpereyra

    Joined:
    Feb 21, 2018
    Posts:
    91
    Oh! My bushes have two materiales (brown and green) for branches and leaves.Well, I guess I'll have to sacrifice something. Thanks Kurt.
     
    Kurt-Dekker likes this.
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    9,658
    You're welcome! Look at it this way though: it will reduce your drawcalls! :)
     
  5. santiagolopezpereyra

    santiagolopezpereyra

    Joined:
    Feb 21, 2018
    Posts:
    91
    Unfortunately, I made a grass mesh today with a single material and have the same problem. I checked many forums and threads; some suggested it was due to lack of UV unwrapping, but unwrapping my model changed anything. Of course I checked and it is not a scale issue. Nevertheless, only if I add another detail mesh after my grass mesh, my grass will be painted, but it's completely black and looks wrong. Why would my mesh be painted only if I add another mesh on the details after it? And why is it drawing so bad? Ultimately, why is it so hard to have detail meshes on Unity? :mad:

    EDIT: Well, I managed to have

    a) my detail mesh shown on the detail box, on the Terrain's inspector (before it was invisible, as declared on the beginning of this thred), and
    b) my detail mesh actually painted on the terrain, so it appears there and I can see it.

    For those curious on what was the problem, apparently when I unwrapped the model in Blender a texture was automatically applied to the mesh. Deleting the texture and leaving my material texture-less solved it.

    Anyhow... my mesh is black. It has no color. It also only shows if, on the Edit window of my detail mesh, I set the render mode to Vertex Lit. If the render mode is Grass, it disappears again. On my testing scene, it looks like this

    https://i.imgur.com/puRYnmX.png

    And I can't figure out why! Any ideas?
     
    Last edited: Nov 21, 2018
    idavida and prof_jerz like this.
  6. HypeDeveloper

    HypeDeveloper

    Joined:
    May 13, 2019
    Posts:
    13
    I had the same issue and i googled it and found this... But I figured it on my own.

    Cause:
    The problem I had was that details were not being painted because the model was in an empty.
    Solution:
    Make sure your main detail mesh is single and isn't placed in any empty....

    Hope it fixes your issue too as mine issue is fixed! ;)
     
    pokruchin, Ghosthowl and Lightning_A like this.
  7. bhanu68tyagi

    bhanu68tyagi

    Joined:
    Jun 3, 2020
    Posts:
    4
    Whenever I am going to spread grasses on terrain I am just able to put some grasses after that the old grasses just vanishes and some time not spreading....and I get this error....please help.....
     

    Attached Files:

unityunity