I need help making grass translucent on both sides

So today I read a thread here that has an answer for making translucent grass (https://blenderartists.org/forum/showthread.php?404847-BGE-translucent-Material-help!),

and this simple project is what I ended up with:


This picture is me facing the opposite direction of the sun, but since BGE is annoying, the other side looks like this:


So now I’m stuck with the problem of trying to get the grass translucent on both sides. Blender’s game engine doesn’t have any translucency support, so the other side of an object won’t be lit up like grass.

Since Blender can’t make materials that emit light mixed with shadows on the other side, the other side of an object will always be dark, unless you bake the shading in, which is a pain to do for LOTS of grass.
***Edit: I’m going to release a .blend file with the working grass for anyone who wants beautiful grass in there games!

Edit: Instead, I’m going to make another thread on how to do this over at the Game Engine Resources topic.

Hmmmm… There should be an easy fix for this… but if not, then it is possible to write a small shader.

This is the best resource I’ve found to achieve similar things before https://en.wikibooks.org/wiki/GLSL_Programming/Blender

PS: Your flora looks great so far :slight_smile: I’m looking forward to when you get it working as intended : D
PSS: Protip - If you add a .blend people will be more eager to help ; )
PSSS: I looked into it myself. Doesn’t seem to be any good way of doing this in the BGE, you can set the texture to emit at a low level. But it really isn’t quite what you want.
PSSSS: Hmmm… Maybe you need to use a node material? That’s the only thing I can think of to solve this issue without writing a custom shader.

Assuming you have the grass planes always facing the camera (which appears to be for your case), the light may not properly hit those planes to illuminate them. That seems to be what is happening with your scene.

You can try having two suns - one casts a shadow only, and one does not cast a shadow at all, illuminates the grass, and is parented to and facing the camera at the angle you want.

So in GLSL mode: you can, under the Object Data properties for the sun lamp tick “shadow” - “only shadow” and for the parented sun, make sure “shadow” is not ticked.

Not sure if this is a kind of solution you are looking for.

I always set my grass to shadeless, it looks way more realistic. (to me) Assuming it’s a bright sunny day and not in a shadow.

Just use two material nodes refering to the same source material and toggle “Invert Normals” on one of them. Then add the output colors. That should give you the result you want.



Just use two material nodes refering to the same source material and toggle “Invert Normals” on one of them. Then add the output colors. That should give you the result you want.

[ATTACH=CONFIG]457820[/ATTACH][ATTACH=CONFIG]457821[/ATTACH]

There are 3 good looking easy ways of doing it. One is by fine tuning the toon shader to give realistic results. I used that one here:
http://www.josipk.com/2012/07/environment-for-project-monolith.html

The second way is to make duplicate faces and flip the normals then in the node editor make a material that uses both flipped and regular normals and add 50% of the light from the flipped ones to the normal ones.

The third way is to make python script that will point all normals of your grass object UP or +Z.

you could turn on environment lighting.

I didn’t do exactly what you told me, because the answer just hit! I was using normal particle grass, and they don’t always face you by the way.

Since I was using an inverted normal map that inverts the grass so, the sun could shine on it with backface culling on, and the shadows would appear on the opposite side, like real grass. However, it literally just flips the rendering of the grass, so the other side was dark.

All I had to do was just make duplicate, flipped normals so that the opposite side would get light, and it would still be casted out the other side!

Also, I’ll be fixing up my scene soon and releasing a .blend file for anyone who wants to check out the first proper grass made in BGE!

Oh wow I didn’t know that could happen. Thanks for sharing! And yes please release the file if you could.