Home Unreal Engine

Problem with lighting and foliage mode.

polycounter lvl 6
Offline / Send Message
lucashug polycounter lvl 6
Hello everybody!!!
I pass the last month trying to find a way to make the grass in my scene
shadowed well, but I can't :(

I would like to ask you if you have any ideas or if you have this problem right now.

Please find some of the setting that I put on my scene in the picture.
My idea is to have a precomputed shadow for the floor (staticmesh) and dynamic light on the grass (instance from foliage mode).
But when I bake the light, my grass didn't take any of the shadows information.

problem.jpg

Thank you very much for taking time reading this post :D
If you have any questions let me know :)

Cheers
Lucas

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I think the solution is that the ground would use dynamic and static too, and the grass is just dynamic.also in the foliage editor, check in "cast shadows" and"cast dynamic shadows" for you grasses.
  • lucashug
    Options
    Offline / Send Message
    lucashug polycounter lvl 6
    Hello Obscura,
    Thanks for your answer :)
    The thing is that I don't want the grass casting any shadow, just receiving it :)

    And my terrain already have the Static and dynamic light option on :
    problem002.jpg

    And the only way to put the dynamic light on the foliage is to put it trough the foliage mode.

    Then its all like you tell, and it should work, but it didnt :(:(:(

    Thanks a lot for you answer :D
    Cheers
    Lucas
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    hmmm now i think i see what you want...check "use precomputed shadows" in the foliage editor tool.
  • lucashug
    Options
    Offline / Send Message
    lucashug polycounter lvl 6
    Helloo Obscura!
    thanks for your help man, really appreciate that :D
    I test what you said, but It put a lightmap on my grass,
    and I need my grass receiving dynamic light and the rest of my scene
    using a lightmap.

    And I check all the static meshes ingame and they cast dynamic shadow :S

    thanks againnnn :D
    cheers
    lucas
  • lucashug
    Options
    Offline / Send Message
    lucashug polycounter lvl 6
    hello there!
    Im still looking for an answer! I will probably soon switch to ce3 LOL
    If anyone have an idea, I would really appreciate it :)
    Thanks a lot!
    Lucas
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Can you tell my once again, what is your problem?You want dynamic, or pre computed shadows on your grass?or on the groud.or what where?
  • Hourences
    Options
    Offline / Send Message
    Hourences polycounter lvl 18
    What UDK version? All but the latest 2 or so have foliage lighting problems exactly like you experience. Make sure the grass has lightmaps also as otherwise it won't work anyway anyhow.

    Having Cascaded Shadow Maps enabled would fix this problem upclose (though at FPS cost). This would be your quick fix, and also improve the looks overall of your level if you can take the FPS cost it carries.

    You need a Dom Dir Light, and in Cascaded Shadow Map section you type Radius 1536 or such. You could increase the detail also from 1 to 2 (forgot name of property, whatever is 1.0 in that section now, make it 2.0).

    To get rid of foliage shadows untick the boxes in the foliage window like you did, or untick CastShadow on the actual polys in the mesh viewer in content browser to hard remove any shadow casting ever from the mesh. It is where you added the material to the mesh.

    Your meshes are not suppose to have Dynamic light channel enabled, this is technically wrong, take it off again.
  • lucashug
    Options
    Offline / Send Message
    lucashug polycounter lvl 6
    Hello Guys,
    Thank you very much for your answers guys, and sorry for the late answer :S

    Obscura - My goal was for the grass : having them receive dynamique shadow and for the rest receive Precomputed shadow :) Thanks for taking time on that!

    Hourence - Thanks a lot for the explainations. I try it on the 2 lasts versions, and I couldn't make it work :S I will try the cascade shadow right now :)
    And will remove the dynamic lighting channel! And because my grass appear at 2048 units from the character, I can put the cascade to 2048 and it should work fine.

    Thanks a lot for taking the time, I really appreciate that :D
    Cheers
    Lucas
  • lucashug
    Options
    Offline / Send Message
    lucashug polycounter lvl 6
    Hello!

    After all those changes I bake lighting it still all black, but when I put cascade shadow (making the place around the player dynamic light), it work just fine.

    And I had to change the material... I forgot to add an emissive :S Because I used MLM_Custom type material. It's for that the shadow show black.

    Thank you very much for your help :):):)
    I really appreciate that!
    Cheers!

    Lucas
Sign In or Register to comment.