Brighten up shadows of groundcover shapes in T3D
by Nils Eikelenboom · 07/16/2014 (12:16 am) · 14 comments
Note developers: This post is written in a way for artists to understand
GroundCover is an ideal way to replicate shapes on vast terrains without the cost of fps comparing to Forest Objects. The default groundcover billboards are default rendered with the same side, regardless rotation. This is depending on the parameter windDirection. If you'd change the windDirection you'd notice that normals are rendered on the billboards. If you're satisfied with the current setting, avoiding dark shadows that look unnatural on tall thin vegetation, you'd certain having problems with 3d shapes as groundcover.
While T3D has most things to look like a modern engine, you see that most kept avoiding the 3d shapes as GroundCover, partly because of the overly dark shadows. So most groundcover objects you see are the default billboards instead. For some time I'm trying to solve this issue in the code, but kept on getting unsatisfying results. Now I found a really simple way of getting rid of the issue, or even getting control on the amount of shadows (normals). This might also do it for you until we find a better solution; somewhere in the code.
I added a normal map to the material that simulates light always coming from above. To get the right direction of simulated light, I blended (multiply) the colours 128-255-255 (Top Left) and 255-255-128 (Top Right), the result is 128-255-128.
The shadows on the 3d shapes as groundcover are default almost black like this:
. Now the solid colour (100%) applied as normal map in the material will remove all shadows:
.By adding the colour 128-128-255 you'll reduce the effect and therefore bring back the original shadows.
This way you gain control on how strong the shadows appear.
_100%
_75%
_50%
_25% Click on each image to download the matching compressed DDS file.
Download the Photoshop file with the colours here
Adding a solid colour will work when you're not already using normal maps in that material. To brighten up the shadows with existing normal maps you can create a blending layer in your imagining application (like Ps). Setting the solid colour as Detail Normal Map in the Material Editor, will not work.
The good thing is, that this trick can also be applied on other stuff where needed :)
Finally do I hope we find a way to apply the wind effect on 3d shapes as well, and not only being reserved for the groundcover billboards.
Cheers, Nils
If you happy with the result then post a shot here for us to see,but please don't exceed the 720 pixel width, thanks!
#2
07/16/2014 (4:56 am)
Nice!
#3
07/16/2014 (6:17 am)
Cool stuff, Mr Eikelenboom! :)
#4
07/16/2014 (6:33 am)
Very handy, thanks!
#5
07/16/2014 (11:34 am)
Cool! Thank you!
#6
07/21/2014 (7:19 am)
Another way of getting around the ugly shading on shapes is customizing the normals of the mesh itself. Here's with all normals set to straight up (just like ground cover billboards):
#7
Yes I agree, it's even better imo, since you're avoiding the extra drawcall (and looking better in your example) But it might not be always sufficient, especially with dark shadows (scattersky or sun) or on auto billboards.
07/21/2014 (8:05 am)
Quote:@Felix: Another way of getting around the ugly shading on shapes is customizing the normals of the mesh itself.
Yes I agree, it's even better imo, since you're avoiding the extra drawcall (and looking better in your example) But it might not be always sufficient, especially with dark shadows (scattersky or sun) or on auto billboards.
#8
I'll have to take that back, it's not correct! Was talking before testing [blush]
Felix's option works great, with the same results as with this resource. You're gaining even more control of the normal since it's per face (or vertex), instead of modifying the whole mesh with a single material. The only downside is that tweaking can take some time due to the fact you'll need to export the shape file with each change (all normals fully up might not be what you need in every situation).
For those who are looking where to edit the normals in 3ds max:
Modifiers menu > Mesh Editing > Edit Normals
07/21/2014 (9:15 pm)
Quote:Me: But it might not be always sufficient, especially with dark shadows (scattersky or sun)
I'll have to take that back, it's not correct! Was talking before testing [blush]
Felix's option works great, with the same results as with this resource. You're gaining even more control of the normal since it's per face (or vertex), instead of modifying the whole mesh with a single material. The only downside is that tweaking can take some time due to the fact you'll need to export the shape file with each change (all normals fully up might not be what you need in every situation).
For those who are looking where to edit the normals in 3ds max:
Modifiers menu > Mesh Editing > Edit Normals
#9
Basically what it does is it "steals" the normals of a reference mesh based on distance to nearest vert. This works great for objects that benefit from spherical normals like bushes or tree crowns.
For a small plant like that, try creating a sphere as reference object and placing it right beneath your target mesh. Should give it normals that receive some very slight directional lighting!
07/22/2014 (8:22 pm)
Another great trick is using a Maxscript called SlideNormalThief (can be found on this page).Basically what it does is it "steals" the normals of a reference mesh based on distance to nearest vert. This works great for objects that benefit from spherical normals like bushes or tree crowns.
For a small plant like that, try creating a sphere as reference object and placing it right beneath your target mesh. Should give it normals that receive some very slight directional lighting!
#10
Yeah, I saw that page on Polycount not long ago. I didn't had the time to look into that but now I see is really worth giving it a bit more attention! Great @Felix, thanks for the tip!
Question, I see in your last example you have shadows enabled; is this a groundcover or a forest object we're seeing? Reason is some unresolved issues with shadows of the 3d shapes as groundcover.
07/23/2014 (6:49 am)
Quote:@Felix; Another great trick is using a Maxscript called SlideNormalThief (can be found on this page).
Yeah, I saw that page on Polycount not long ago. I didn't had the time to look into that but now I see is really worth giving it a bit more attention! Great @Felix, thanks for the tip!
Question, I see in your last example you have shadows enabled; is this a groundcover or a forest object we're seeing? Reason is some unresolved issues with shadows of the 3d shapes as groundcover.
#11
07/23/2014 (6:51 am)
Oh right, that is a forest object.
#12
09/27/2014 (11:16 am)
Is there a way of doing thins without 3dsmax?
#13
Yes, see original thread post
10/01/2014 (6:24 am)
Quote:Is there a way of doing thins without 3dsmax?
Yes, see original thread post
#14
11/12/2014 (9:42 am)
Thanks for posting, those are great tips! 
Torque Owner Stephen
GearedMind Studio