On Thu, Sep 19, 2013 at 3:07 PM, Renk Thorsten wrote: > Which would in fact not make them random buildings at all :-)
It'll make them less random, certainly :) However, while the placement and size class (small, medium, large) will now be determined by the texture, there will be still be randomness for each building in terms of width, depth, number of floors and texture. I need to prototype this to understand whether that's sufficient to fool the eye or not. The other avenue I'm looking at is whether the texture scale is correct. IIRC the city1 texture is 1024x1024 and covers a 1kmx1km area. I need to measure some street widths, as I suspect that might be a bit small. It may be that we can increase the texture coverage without increasing the texture size, which would reduce the repetition. Or just decide that cities are important enough to be worth a larger texture. > May I propose to think about something more ambitious? One thing which bugs > me is that we have now well-working de-tiling strategies for terrain, but not > really for city textures and agriculture. Forest is effectively de-tiled by > placing sufficiently many random trees on top - but we still get huge tiling > artefacts for large city areas or fields. > > Deterministic 'random' building on top of that will make the tiling problem > worse, because you get repeating patterns now in both texture and objects on > top, which wasn't the case with the scattergun. > > I think one could at least partially solve this by subdividing the terrain > into individual coordinate cells and give each city texture inside the cell a > random orientation of the texture. The template would be the sparse dot noise > function introduced in terrain-haze-ultra.frag , but instead of creating the > dot position and radius randomly, the routine would just create a rotation > angle randomly. I believe this would improve city and agriculture, but for > this to really work, the 'random' buildings and trees would have to be > shifted by the same function - probaby at placement time. > > Would it be technically hard to design the system in such a way that this > could be introduced? I don't have a function ready yet, but it's something I > wanted to give a try at some point with running a distinct shader for > 'random' and 'civilized' terrain which needs different types of overlay. At the moment, we use a shader instantiate the buildings and forests to the correct locations. That transformation could be made more complicated to allow for texture rotation. Where it would have more difficulty is in handling the "random objects", which are masked as well and would need to be moved. It would also be a bit tricky to make the edges of each coordinate cell look. At the moment, the textures edges tile nicely. I guess we could mirror the translation in the C-code, but it feels a bit wrong. On Thu, Sep 19, 2013 at 5:05 PM, Adrian Musceac wrote: > Stuart, this is totally unrelated, but what would be the price to pay to have > collision with generated buildings, and Rembrandt shadows? Actually, this isn't completely unrelated... The original random buildings implementation (2.8.0) use basic OSG primitives, and so had collision detection and Rembrandt shadows "for free". In 2.10.0 this was changed to a shader-based instance approach based on the tree scheme to reduce the memory footprint which was ridiculously high in places like LA or Tehran. With the shader-based approach, collision detection isn't possible as the building doesn't really exist in the scenegraph. Rembrandt should be possible at the cost of running another shader IIRC. I think I had Rembrandt working for trees, but the cost was absolutely huge. Now, the basic OSG primitive approach has some advantages: - doesn't rely on shader support - allows for more variety in the buildings as one isn't instantiating a small set of buildings multiple times. - the code is simpler - more flexibility in adding complicated buildings such as signage, extensions. If I implement a PagedLOD approach, it might reduce the memory footprint sufficiently that we could switch back to the OSG primitives. Now, all I need to do is find the time to code all of this up!. -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