Home Unreal Engine

Shadow Casting Grass / Transmission

Uly
polycounter lvl 15
Offline / Send Message
Uly polycounter lvl 15
So I've got grass and ivy in this thing I'm working on. The grass casts a stark, dark shadow at the moment, and I only want it to block *some* light. Preferably leaving behind a nice, blurry green shadow. Here's an old screen to illustrate my problem:
homeindustry_grass01.png
Looking around on UDN, I saw something written up on 'Transmission' value, and how you control it through Transmission Colour & Transmission Mask inside the material editor. When I plug stuff into these two areas, it does change the lighting on my mesh itself (they seem to get a little brighter), but not on the shadows it casts. The UDN article (http://udn.epicgames.com/Three/Lightmass.html ctrl+F: transmission) points out particularly additive and modulate blendmodes and how they're compatible. I'm using Blend_masked, cause it's all I really need for this foliage. Here's an example of Transmission from UDN.
translucent_T.JPG
Anybody got any sweet tips on how get my grass casting a nice, only slightly visible, coloured shadow on the ground?

Replies

  • Matroskin
    Options
    Offline / Send Message
    Matroskin polycounter lvl 11
    well, first off I`d say that the shape of the shadow itself will depend on light map res which u have on the ground.
    Right now it seems like u won`t get that subtlety in shadow shape which u have mentioned. For now it looks like each grass patch casts few pixel shadow.

    Now, I haven`t played with transmission yet, but I guess u r not getting the colored "shadow" because maybe transmission does not provide any shadow casting or projection features. That stainglass effect shown above could have been done with combination of transmission for the material along with decal projection.

    Of course in your case u can't do decal projectors for every single grass mesh.

    What u could do for example is create a separate "shadow caster" asset which will have special shape that will cast the shadow of the shape u want. At the same time your "real" grass won't cast shadow. After u bake u can hide the "shadow caster" ;)

    Finally, I know its won't be ralted to actual question, but in the case of your grass its not worth it to bother so much about the grass shadow. Even the real-world grass won't have strong green shadow tint, and in your case the grass shadow color does not bother at all imo.
    Afetr all I think that such a detailed realism "issue" should not bother considering other much more visible "issues" which the grass has (such as glowing in the shadow).
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    -Wrong reading, wrong answer-
    Sorry.
  • Matroskin
    Options
    Offline / Send Message
    Matroskin polycounter lvl 11
    Froyok wrote: »
    -Wrong reading, wrong answer-
    Sorry.

    well, then correct whats wrong, tho I dont see what may be wrong in my answer :P

    Or give a right answer if u r so much a "right" reader...
  • Uly
    Options
    Offline / Send Message
    Uly polycounter lvl 15
    @'Matro v. Froyok' haha now now, i dont think he meant it that way. (i think he replied to the wrong thread)

    Youre right that i wont be able to achieve shadows with more definition unless i upped the rez significantly. (its at a 1024 right now for the ground, no need to go any higher) Dynamic shadows could work too, and i might play with that later.

    The shadow casting object isnt a bad idea, I juggled that idea around a bit earlier. Might just make a duplicate of the grass, turn it into a translucent material instead, and multiply a .5 constant over top of its opacity so I can just at least get the same ickle blob shadows but with less strength. Wish I didn't have to do it that way, :] i spend way too much time avoiding jimmy jam solutions whenever i can.

    The glowing in the dark bits are because of some errant vertex catching a very small bounce of light, and glowing in the dark on the fringes of a casted shadow. The grass is all vertex lit, so its enough to make it look wildly out of place. Think I know how I'll fix that though. There's only a few bits like that in the scene, so I'll either break their lightmaps, or just edge them until they're in the correct spot to catch the right lighting, while using dynamic lighting as a guide.

    Thanks much. Good bit of insight on something I've spent too much time on at this point.
  • Matroskin
    Options
    Offline / Send Message
    Matroskin polycounter lvl 11
    ah, lol, maybe wrong thread :P

    Yep, shadows in unreal for me was always something that posed some issues here and there... Maybe lightmaps on the grass instead of vertex color could help indeed.
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    Yeah, sorry, I wanted to mean that I have wrong readed the topic, so my answer was false. :)
  • Visceral
    Options
    Offline / Send Message
    One thing that strikes me when reading topict like this is. UDK is a higly optimized game engine and not a beauty render. Will anyone ever even notice theese shadows in a portfolio render?

    To put my point in a moore constructive way, is there even a possibility of getting high detail shadows from something like a blade of grass in a game engine?
  • A. Rabbit
    Options
    Offline / Send Message
    A. Rabbit polycounter lvl 10
    Visceral wrote: »
    One thing that strikes me when reading topict like this is. UDK is a higly optimized game engine and not a beauty render. Will anyone ever even notice theese shadows in a portfolio render?

    To put my point in a moore constructive way, is there even a possibility of getting high detail shadows from something like a blade of grass in a game engine?

    It sure can, dynamic shadows can be setup to give excelent result.

    Transmission colour and masked values don't effect the actual transmission, it's only fakes it. Instead depending on the blend mode it will derive it from either the diffuse, emissive or the opcaity.

    In your case you would need a translucent material to have transmission, which would be based off a combination of the diffuse and opacity channels.

    Vlad has the right idea ;)
Sign In or Register to comment.