Hi All, This is to give a heads up on some changes that I'm planning for Random Buildings for the V3.0 release, and to allow for comments/suggestions/ideas.
In 2.12.0 the algorithm for the placement of random buildings is a rather "scattergun" approach. materials.xml sets a building density (amongst other building attributes) which is used to generate a number of random points on each triangle that makes up the scenery. These random points are checked against a mask to ensure they aren't being placed in the middle of roads, and then rotated to the correct orientation to match the texture (using the red channel of the mask). This broadly works, but the placement is fairly unrealistic: - The mask is quite broad, and some buildings quite large, so they can still stick out into the roads, and generally don't line right up against the street. - The spacing of buildings has to be quite conservative. So, in V3.0 I plan to change this. Instead of using a scatter-gun approach to placement and a mask, random building location will be read directly from the mask, defined by a single pixel. The color (actually blue value from 0-255) will define the size of building (small medium, large), and the red channel the rotation. So instead of a material designer blocking out a large area for random buildings to be placed within, they will define the specific location for each random building. Creating masks is going to require quite a bit more work in the "new world", but the end result should be better. There is an open question of how to handle random object placement, which also use the blue channel of the object mask: - For areas that don't use random buildings, I'm tempted just to leave it as-is for the moment, as it reduces the number of object masks that need to be re-created. - For areas with both random buildings and random objects I'm planning to make groups of objects to specific blue values. So, a blue value of 234 might equate to placing a silo or a farmhouse, while a blue value of 233 might place a church, or tower block. The mapping will be defined in the materials.xml file. Command, questions and offers of help to update some object masks are all welcome :) -Stuart ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel