Game Development Community

Lighting issues with Grass Models

by Matthew Genge · in General Discussion · 06/30/2013 (1:22 pm) · 25 replies

I've just released a new version (1.19) of Forester Pro, a 3D tree creator for Torque3D, which can now create grass and small plants. Forester Pro creates grass and small plants as clusters of meshes giving them volume compared with billboard grass, however, there is an issue with these meshes. The reversed shadowed face of meshes are too dark. Below is an image of the grass illustrating the issue (this is the same models in Unreal Engine 3).

www.hptware.co.uk/images/desertgrass.jpg
This image also shows acacia, thorn bush and knob thorn models from our Africa tree template pack (each template can be used to generate a wide range of different trees.


The issue in UDK isn't too bad, however, you can see the slightly too dark back faces. In UDK I can use a material shader to change this, but is there a way in Torque3D? In the material editor I can't see any options to change the appearance.

Anyway, if you want to check out Forester Pro there is a free version available for download, and the registered version is only $20. The models produced by Forester Pro include collision meshes and vertex colours for wind effects and import seamlessly into the world editor.

www.hptware.co.uk/forester.htm
Page«First 1 2 Next»
#21
07/10/2013 (11:42 am)
I'm just crying because I can't afford to update from 3DS Max 7 to the latest and I still have no clue how to get what I want from Blender.... lol
#22
07/10/2013 (11:48 am)
So turn on a lot of special effects...
#23
07/11/2013 (10:06 am)
Quote:I don't know of a single game engine out today that does not require the artist to design in a 'specific' way

Keep us pretty busy alright ;)
#24
07/11/2013 (11:48 am)
As long as no wind effect (and shadows) on 3d objects as ground cover is supported, benefits for using this technique in groundCover is still as limited as before. However, I know some objects will benefit from this... after a very long time.

I don't believe I can remove the 'Sub Surface' effect in all the materials just yet.

Of course this is great new for some forest objects :)

Thanks for sharing!
#25
07/20/2013 (6:14 pm)
I've been running some benchmark tests on the most optimal way to generate double-sided planes in T3D.

The double-sided option in the material editor under advanced properties generates the appearance of a double-sided plane using a shader which disables backface culling so it displays front facing and back facing faces (i.e. where front and back are defined by winding order of vertices in faces). However, it is also possible to generate a double-sided plane by having duplicate faces and reversing face normals within the original imported model. The difference is illustrated below:

www.hptware.co.uk/images/doublefaces.jpg

I was interested in this to optimize Forester Pro models. Forester Pro is a tree, plant, shrub and grass model creator for T3D and models use planes to generate leaves. In Forester Pro the planes can optionally be generated as double-sided or single-sided planes (the latter-requiring the double-sided option under advanced properties in the material editor. I wanted to quantitatively test which of these options is best in particular since we are about to release more tree and plant template packs for Forester (there are already over 70 different templates).

There is a good reason to want to use double-sided meshes instead of the double-sided shader since the latter generates faces with only one normal direction (i.e. both sides of the face will have the same lighting and thus a backface pointing towards the light source will be incorrectly lit). Shaders are often also more computationally expensive than manipulation of meshes (hence turning off shader effects to speed up an application), however, obviously double-sided meshes give more polys for the engine to render. It isn't obvious which is faster. The appearance of planes is illustrated below using the Nettles model in our forthcoming Temperate Small Plant template pack (the light direction is away from the camera). Notice model using the shader has many dark backfaces pointing towards the light source.

www.hptware.co.uk/images/doublesided.jpg


The benchmarked test is shown below for the Forester Pro Nettles model and the ForesterLite Maple model (one of the model templates that comes with the free version of Forester Pro). The benchmarking was performed by defining the models as groundcover objects with shadows over an area of 50 units and shows the number of models against the FPS.

www.hptware.co.uk/images/fpsnettles.jpg


The results indicate that for the Nettles model the double-sided mesh model and the single-sided model (with the double-sided shader) perfom equally as well. Not surprisingly defining groundcover as a billboard (using the texture from the Nettles object) is considerably better, however, billboards have no volume and are visually inferior to meshes. It should be noted, however, that this particular Nettles model consists of 20 faces, 20 times more than billboards (the number of leaves in the model can be changed in Forester Pro).

What is interesting is the performance of the tree model. This particular tree model has 122 leaf planes. The double-sided mesh varient of the model shows a 10% better performance than the single-sided model with the double-sided shader applied.

What these tests suggest is that complex models with many planes that need to be double-sided are more efficient as double-sided meshes rather than single-sided meshes. The actual FPS will, of course, be dependent on the system specs (and conditions...notice the drop in total fps for the maple since I was downloading in the background) but it is expected this will be generally true.

Forester Pro can be downloaded from our website and there is a free version that comes with 7 free tree templates each of which can produce a wide range of models.
www.hptware.co.uk/forester.htm
Page«First 1 2 Next»