Hi All,

I've just committed to simgear/next and fgdata/master code to allow
the placement and rotation of random objects and vegetation to be
masked based on a bitmap.

So we can now control the placement and rotation of random objects
precisely to match the underlying terrain texture. So, for farmland,
the farm buildings etc. will
appear at the ends of roads rather than in the middle of fields*, and
in urban areas random buildings will align with the streets** (which
works well with the urban shader
IMO).

As an extra bonus, I've also added a property
(/sim/rendering/vegetation-density) that controls the density of the
random vegetation. So you can control how uninviting
the forests are based on the abilities of your graphics card :)

I've committed changes to materials.xml and materials-dds.xml to make
use of this, but there's plenty of room for someone to spend time
improving the masking if they
wish. The masks are very easy to create:
- the Red channel controls Rotation
- the Blue channel controls Buildings
- the Green channel controls vegetation.

(You can also use values < 255 on the B and G channel for probability
placements)

Comments welcome as always.

-Stuart

* This isn't compatible with the crop shader.  I don't know if that is
solvable or not.
** There's still a bit of work to be done on the urban masks, as some
buildings are intruding onto the highways :)

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to