-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stuart Buchanan wrote:
| --- Curtis Olson wrote:
|> Hi Guys,
|>
|> Again, I love and very much appreciate your efforts on the trees.  They are
|> really awsome.
|
| Low level flying through the hills has become much more fun...
|
|> On the subject of diffuse shading ... I am tempted to argue that we don't
|> need it.  In real life, trees are composed of a myriad of surfaces in all
|> directions.  Picking one single normal is most likely going to be wrong
|> especially in relationship to the aribitrary surface we paste the tree
|> texture on top of.  I think going without a surface normal and without
|> diffuse lighting will be just fine ... as long as we can have the ambient
|> lighting be representative of the scene.
|
| I've been wondering the same thing. Currently we're using the full ambient
| lighting, which is accurate for the scene. So, as the sun goes down, the trees
| get darker.
|
Yeah, but the trees will be just as dark on the side away from the sun. Since 
you have
to specify a normal-per-vertex anyway, you can arrange it to simulate the 
shading of a
cylinder, or point the normals in random directions.

| I've no idea what the performance implications of adding diffuse lighting, but
| I'd personally prefer more trees to better lighting.
It will be very cheap; one dot product in the vertex shader. Or you could use a 
3D
noise texture to choose the normal and do lighting in the fragment shader.

This project could become an endless, if fun, time-sink; there are a lot of 
papers out
there on generating CG tree and forests.

|
|> Currently, is the problem that we can only have one single tree type for all
|> surfaces in the scene, or is it only one tree type per surface?
|
| We currently have a single tree type (and shader) per type of forest per 
tile, I
| think. As Tim has pointed out, the current architecture is very inefficient.
|
| It should be possible to remove that limitation so that each forest has a 
variety
| of trees - I've already added support for this in the material library. I just
| need to work out how to pass the shader an array of textures, and how to use 
the
| noise function for the texture to be selected. Sounds simple, but writing 
shader
| code has been much harder work than I expected.
As Curt suggests in another mail, you can put all the tree textures in one 
texture and
choose the texture based on another attribute value. There's still that 4th 
value passed
to glColor4fv that isn't used...

Also, you could have more than one "forest" object per tile, each with a 
completely
different set of models and /or textures.
|
|> At any rate, I think they are great, and will generate a lot of excitement
|> in the FlightGear community.  (Until this new feature becomes the baseline
|> and everyone will say, ho-hum, yeah, trees, and completely forget their
|> previous life without them ...) :-)
|
| Well, look how quickly we've become used to random objects again :)
|
| -Stuart

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHl3dQeDhWHdXrDRURAjtBAJwMtc3aJoqVj7yWEGZbXAVayp97qwCgskvm
td9d5JhnPbUvfA2s4OVTWYA=
=poks
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to