Home Unreal Engine

Issues with foliage.

LosRe
polycounter lvl 4
Offline / Send Message
LosRe polycounter lvl 4

Greetings! I'm currently trying to import my trees and foliage in unreal and i have an issue and a question. Here it goes:

  1. Even though i'm using a 2k texture for my branches, they look very pixelated. I even tried a 4k texture but nothing changed. The result is that, as you can see in second screenshot, the trees from some distance look very "fuzzy" if that makes sense.

  2. I'm using the single grass wind node in my shader and i want the base of my foliage to stand still. Is there a way to use the alpha of my vertices instead of their color to achieve that? Did a search, but i only found the vertex paint way.

Thanks in advance for the help.


Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    For the movement: multiply the wind node with the vertex alpha before plugging it into the world position offset.
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    You mean something like this? Tried it but it doesn't work.


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    No. Your mesh needs to have a gradient painted into the vertex color. It should be black at the bottom of the plant and white on the top. This would be used as a weight for the movement. Then you could hook up the vertex color channel into that multiply. If your plants would be all laid out next to each other, you could simply use the V channel of the UV map.
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    Oh so i can't use the alpha instead of the color? Screen for clarification:

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    Could you elaborate a bit on that please? I clearly miss something and my experience is limited.
    I was under the impression that vertex color and alpha is something different. In unity i had all my bottom vertices alpha set to 0 and top to 100. I didn't do any vertex color change.
    Thanks again for the help!
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    place a node that is called "vertex color". Take the alpha channel of it and multiply it by the wind node. The same thing as what you did, but instead of hooking up that texture alpha, hook up the alpha channel of the vertex color node.
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    Oh, i misunderstood before, my apologies. I tried that and worked wonderfully. Thank you for your help! Final look:


    Now time to find out how to change the saturation...
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    There is a hue shift node. It has two inputs. One for the incoming color, and one for the shift amount. You can control the variation through a noise texture for example. Or there is per instance random node. But you will need to scale the result of the per instance random or a noise map into a very small range. like between 0 and 0.001 before hooking it up to the hue shift node.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Ok. For the pixelated texture issue, you could show one of the textures so it would be easier to understand whats causing the lowres look. One thing I can already tell is that your color and other textures does not have dilation, so there is some darker color around the leaves blending in, and causing an outline. Fixing this would make the low res look less apparent, but we can probably do better, after a look on the textures.
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    Thank your for the node, i will try it. As for the textures, i took a screen of the properties, tell me if you need anything more specific.
    What troubles me is that i have a similar problem with the grass and it makes it look very bulky and "wrong" from some distance. You can see it on the edges of the clump i placed for testing. By the way, my monitor resolution is 4k, i don't know if that could create problems.


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    You should somehow disable mip mapping on the opacity texture or to force it to stay sharper. There are several ways for doing this. First you can try setting the mip gen setting to be set some of the "sharpen" settings. Or to separate it into an alpha channel of one of the textures that you may not want to mip. Any of this should make the opacity act much better at distance, but unfortunately no mips would give the best result on the opacity. Also make sure you are not examining microscopic details. Seeing artifacts on such distance is something to investigate and to solve, but stay reasonable, don't complain about pixelation when viewing from 5 cm away from the camera :) In the case of the images from the first post, the dilation would greatly increase quality, but like I said it won't fully solve it by itself.
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    I tried with no mip maps and looks a bit better. Whats the downside on that, if any?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    It means that it will use and have the full resolution texture loaded regardless of how far the object is. In some cases, this can cause moire patterns. If you use this only on the opacity map, it shouldn't cause trouble.
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    Oh i see, gave a read about mip maps was very interesting. I think i found a sharpen that gives me results close enough to no mip maps. However i ,still, haven't been able to work with my grass. While they look decent enough, everything changes when i move. Feel's like portion of the grass disappears and clumps look much more thin. Even worse if i move quickly, there is some flickering beacause of that. 
    Another issue that i have is with reflection of my light, which looks like little sparkles. After some digging i found out that BOTH of the problems go away if i choose  TemporalAA instead of FXAA or MSAA. Tried to google it, but most of the people usually have the opposite problem of that. (temporalAA gives bad results, while FXAA is better.)

    Here a quick video and screen to show the problem.

    https://youtu.be/6ONStHWClvg

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Yay. Thats rough. Never seen this issue before. Whats your video card? do you have the latest driver installed? There are numerous games using taa and they don't have this issue. I also only use taa because fxaa gives really poor anti aliasing and msaa only works in forward shading.
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    Did you check video as well? I could just use temporalAA but i want to understand what the actual problem is. My pc has a Ryzen 2700X, a 1080gtx and my monitors play in 4k resolution. I mention my resolution again cause, back in unity i had some issues with that.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I did of course. I see that it gets even worse when you rotate the camera, but its quite bad even when moving. I have a standard 1080 and I'm not experiencing the issue, not even on my previous card which was a 970. I work with a lot of megascans plants regularly, so If this would be something generic, I should have noticed it by now. The sparkles (fireflies) usually appears in rendering in general when you have undersampled (badly, or not anti aliased) reflections. I think you have some of the taa setting set wrong, which is weird because Unreal ships with correct settings by default. However, I have seen some cases where people experienced ghosts and other kind of rendering artifacts when using taa and adjusting the settings fixed it. Is it maybe possible that your nvidia control center settings are overriding the default ue taa setting maybe? 
  • LosRe
    Options
    Offline / Send Message
    LosRe polycounter lvl 4
    This is my final scene. It's been a bumpy road but i'm getting there slowly. Thanks again for all of your help. I really appreciate it.
    https://www.artstation.com/artwork/YarK0Y


Sign In or Register to comment.