-
Posts
390 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
Latest X-Plane & Community News
Events
Downloads
Store
Everything posted by tonywob
-
This is one of the many reasons why I won't host or post anything about my scenery tool on that site.
-
The application itself is written in Java, so that it will run on all three platforms. I kept it as such, so that users could run the tool theirselves without installing anything fancy (apart from a JRE). It's been a pain sometimes, but the simplicity it gives with debugging and distribution will hopefully make it worthwhile. In regards to libraries, one of the most useful for me has been JTS (http://www.vividsolutions.com/jts/JTSHome.htm), which gives a decent toolset to perform geometric calculations. I also make use of the native java 2D toolset for drawing facades. I also use the Apache FastMath 3 library, as surprisingly, the native Java math library is incredibly slow. The largest dataset I've used so far is the OSM file for Poland, which is around 600MB. Obviously the more rules you have, the longer it takes to process, but Poland took me about 40 minutes to generate. I can generate Brandenburg in about 7 minutes. The issue is the actual file size, and since the data isn't by default indexable, the entire file has to be initially parsed so I can get information on relations and nodes, etc. If the system finds it is running out of memory, it will switch to a disk-based cache, which is slower, but stops it running out of memory. An SSD and lots of memory hugely help here :-) In regards to efficiently detecting collisions, a while ago I wrote an Objective-C application for Mac OS and iOS which read an OSM file and created a custom-quadtree file with the data you needed. The quadtree was extremely quick, so I could very easily do collision checks or draw just specific areas of a very large data file.. I then rendered the map using vector graphics, and it was suprisingly quick. I may just port the quadtree idea and put it into the tile processor, so that collisions can be detected. Of course, the ideal solution would be to take the entire OSM file, and preprocess it into a quadtree before actually using it, but it requires quite a lot of disk space.
-
Andras, I added something I call a "line rule" into the generator, and it will place repeating random objects along a way (or perimeter of an object). It can be used, e.g. To surround fields and farmland with trees, or as in treelines along rivers, a rule could be created to run lines of trees alongside a way tagged as drain/stream, etc. It needs some work though, as it will actually place the object on the line, which means the trees will be in the water. So it needs to offset it somehow. I think such rules can be quite powerful, but the problem is the potential for a collision with another object. e.g. I also have a rule which fills out an area with random objects, so for example, it puts cars in a car park. However, I tried it with putting trees into residential areas, and in some areas it looks really good, in others not so much, as the tree ends up inside the house
-
Having looked at the 3D information inside OSM, it's actually much more advanced than can be handled with facades alone, e.g. The Fernsehturm in Berlin, consists of several cylinder buildings, which start at different levels (i.e. min-height tag). Since facades can be offset from the ground, the 3D effect falls over with buildings like this. The effect isn't bad, but it could be much much better. Additionally, other buildings have domed roofs, sharp roofs, etc, none of these can be rendered as a facade. After stabilising what's currently in the application, I might put it on the list for the program to actually generate a proper 3D model based on this information. The .obj file would just use a simple repeating texture, but it would still look much better than the default facades
-
Hi Andras Thanks for the idea, since the scenery generation is already starting to slow down due to all the geometry checks and "fixing" I need to do on the OSM data to make it compatible (e.g. Self-intersecting polygons, splitting multipolygons, relations with missing members), I'm reluctant at the moment of adding the landuse checks using OSM data, since it will require me to process and preprocess more data, making the generation even slower. It's something that is needed, because the object-footprint placer (whatever it is called) is placing buildings into places that aren't correct, e.g. It's placing a family house in the middle of an industrial estate because the building footprints match. If I set it to only insert the building with residential tags, it leaves villages full of facades because they are using generic tags, so it's a no-win situation. I guess it's a question of whether the program should be runnable by average simmers or not. If I decide to include extra data, it would have to be as an option in the config file and can be skipped, but it's something I know is going to be needed to make the scenery more convincing.
-
Many thanks for getting the ball rolling with some models. I presently use the following from OSM and the generated geometry for buildings Area (width/height) m2Residential/Industrial/Commercial/UnknownHeight (in metres, or in levels)Roof type and colour, e.g. Sloped, Dome, Red Tiled, Flat, etc..Wall color and material, e.g. red brick, glassWhether the buildings is round or squareIts position (i.e. Longitude/Latitude)Number of sidesWhat maybe a better idea is that we just keep a master list, e.g. a CSV file with columns that list all the information and which model to use. If more information is discovered inside OSM later on, or new tags are added (as they frequently are), or features are added to the generator, then we can just add a new column to the CSV instead of renaming every file. I can come up with this CSV file, and write an importer to read it in automatically. One of the problems with data in OSM is that outside of cities, it's more or less guess work with most of the tags, since you'll find most buildings are just tagged as "building=yes". So I use the area of the building to determine it's type, i.e. small buildlings are more than likely residential, larger industrial. What I may do at a later date is record the underlying landuse tags (i.e. Residential/Commercial/Woodland). This will slow down generation a little bit, but will give generically tagged areas a better appearance.
-
Thank you Leporello. If you decide to make some objects, try and follow the guidelines, i.e. The origin (0,0,0) should be on the ground center of the building, so it can be rotated correctlyAdd an underground area on the z axis, so that objects placed on the side of slopes don't float (Thanks to Andras for this suggestion)As for a list of required buildings, I guess it's simply a case of the more the better. As long as we stick to a common naming convention, I would suggest: - XXX_YYY_HEIGHT__REGION_INDEX, e.g. 10_14_3_IT_1.obj, 10_14_3_IT_2.obj for two random houses which are Italy themed, have an area of 10x14, and 3 floors. The region codes can be further divided if needed, as long as we stick to some rule, so the engine will know. The problem is we need someone to host it and coordinate updates. At the moment I so busy with the application, that I don't have the time to set anything up. If anyone wants to volunteer, then that would be great
-
That's up to you :-), you will be able to configure it to make sloped roofs if it finds that tag. At the moment in the default config, it picks up the roof:material and roof:color tags and makes a texture for it. Sloped roofs are a bit funny, as it requires the building to be simple and all sides orthogonal. The program can be told to simplify the shapes if it needs to.
-
Colin, that's correct, building:levels indicates how many stories the building has, e.g. buildling:levels=2 for a two storey house. Also, you can height=, e.g. height=10, to indicate a building's height in metres.
-
Awesome John, your addons never cease to amaze me :-)
-
The problem is with the OSM data and facades. Many people choose to map buildings by placing multiple buildings inside each other, each with different heights. When edges touch you will get the noticable flickering. The problem is the min-height tag, which says that the particular building part is 3 places of the ground. X-Plane facades can't be suspended in mid air, hence this isn't possible with facades alone. You could either create a filter to ignore all these buildings parts, or I could add do an intersection test on all buildings in a tile, and join intersecting buildings (This would slow generation considerably). The situation is even more difficult when you mix objects and facades together. In my tests, some buildings which have separate parts have a real object placed inside the footprint. So, I need some way of detecting this (I can't always rely on tags). Generally though, if you see a flickering building, you can go and fix it in OSM. Some of the data in OSM is quite messy, especially forests and buildings. When I generated Switzerland, there were lots of forests with self-interesecting polygons, which is not a valid polygon and causes all manner of problems. Generally, if I find such an item, I have to skip it for now (I may come up with some way of fixing them, i.e. Removing the interesecting node). There are also lots and lots buildings that have been added twice, one on top of the other. JOSM normally detects these, so you could download the offending area into JOSM and run the "remove duplicate ways" validation and reupload to OSM :-)
-
Yes absolutely. It's a chore at the moment having to open each model up, measure it, calculate where the centre is, and then add a new rule. If the program could just scan a folder of objects and create rules based on correctly named objects, it would make life easier, and also would make it easier to add new models in. So who's up for starting a scenery pack? ;-)
-
This indeed would quite easily be achievable, but someone would have to calculate all the origins. The big problem I have at the moment is getting the origin and size of objects. Sometimes models are listed as 10x15, and this position I can give the program, I can also tell it that I know the origin is in the bottom-right, and it will estimate the centre point of rotaton. If the origin, or XxY size is unknown, this information can be seen by opening the model up inside WED. Otherwise the program just places the object at the models (0,0) point. Indeed, I went through the R2 library and added as much as possible to my config file, after generation, the program managed to remove around 10,000 facades and replace them with will real buildings in a 1x1 square north of Berlin. The results are impressive and are shown in the below screenshots: It really does make a huge difference to rural areas. In cities and larger towns, it's generally a mixed bag of objects and facades, however generated coloured/textured facades from OSM, and custom models does improve the situation. It certainly seems the way to go, but we need a community effort to fill out the OpenSceneryX library with custom buildings. Preferrably each model should have the (0,0) coordinate at it's center, and it should be modelled without any internal rotation, and include specification for a width/height. Edit: Since I'm blocked on x-plane.org, I haven't been able to reach out to users on there for help. But if anyone fancies organising a community effort, then it would be very helpful
-
Let me know which city you've been doing, and I'll give it a try. I might not have the base scenery installed, so it might be floating on water, but you'll get an idea of what the buildings look like
-
I generated Chicago, but the screenshot looks bad because I forgot I didn't have any scenery installed , so the entire city is floating on water. Althought height information is good in Chicago, there is no colour or material information so most buildings just look generic. A good way to see 3D buildings is this http://map.f4-group.com/#. It will show you height, colour information, etc, and I've used it so far for scouting cities :-)
-
Some more screenshots. I've tweaked the building generation a little bit, so there are less red roofs, and also I've inserted a few real object houses into the scenery replacing any buildings which have a 10x10, 14x19 and 19x19 footprint. Doing this also slightly improves framerates and improves night lighting.
-
Hi Benny, it's great to see you here, and I really love the work you've done on OSM2XP. It's a pity life got in the way and development has stalled. . This tool also supports object placement based on areas: In these examples, it has placed some buildings into the polygon footprints and rotated them to fit. Any buildings that don't fit, pass through the filter and use the standard facade filters. I added three filters and used three houses from the R2 library which had a 10, 15, and 19m2 area respectively. However, the problem I found, which you've indicated is that some of the objects' origins aren't centred, and some objects have a rotation already applied to them. What we badly need is a large collection of buildings which have various footprints. They don't have to fit the shape exactly, but should have parameters like 10mx15m, 12m15m, 10x10m etc.. We really need to try and organise this, but I know the developers of the R2 library for example, want it kept as a separate library. There have been no updates of the opensceneryx library for months as well. The lights are a good idea also, but would either require the system to create an OBJ file for each light, or have a library of them it could use. AFAIK, the height is part of the OBJ file and can't be set. Also I like how you generate street lights. I tried a little hack a while ago, and basically filtered out all roads except motorway junctions and residential roads using osmfilter, and then generated the street lights using OSM2XP. It looked really good, as only residential areas where lit up :-)
-
I thought of doing something similar for smaller objects, and also for the likes of churches which presently have a random rotation (if building=church is used). Again, the lack of artwork prevented me from doing this. There is the fflibrary, and the R2 library which do contain some European style buildings with different footprints. I will put this on the todo list to add it into the config file after I have facades working correctly, something along the lines of <rule> <filter>building=house</filter> <min-area>50</min-area> <max-area>100</max-area> <objects> <object rotate="determine">some-nice-building.obj</object> <object rotate="determine">some-nice-building.obj</object> <object rotate="determine">some-nice-building.obj</object> </objects></rule> Of course, that's simplistic, and would produce many generic buildings which fit loosely to the polygon footprint underneath it. But, since you can actually evaluate groovyscript http://groovy.codehaus.org/ code inside a filter rule, you could easily write your own rules and filters if you needed to do so. Also, to make this work, the facades would have to look like the objects, so that when the program mixes them, they at least look convincing :-)
-
Thanks for the feedback Colin. I agree with you, and in this instance, for buildings without colour information, I simply imported the same facade set that OSM2XP uses. The facade set needs lots of work, and more variety. Once I have an initial release out, I'm hoping people will work on creating more facades, to add more variety. I'm no artist, so making such facade sets is not only time consuming, I wouldn't do a very good job of it :-), so I'm reaching out for help with this. Anyway, this is the beauty of having the generation highly configurable, it's very easy to add new sets and building types. In terms of OpenStreetMap layers, there isn't a particular layer as such, but to see 3D buildings have a look at this http://map.f4-group.com/. At the moment, the building generatiion will look for the following tags: building:colour = #rrggbb or red,green,blue, orange, etc...roof:colour = #rrggbb or red,green,blue, orange, etc...building:material = stone,brick,concrete,glass,wood, etc..roof:material = stone,brick,concrete,glass,wood, etc.. building:levels = <number of stories>height = 20m, i.e. Height in metresIt will combine these tags to create a facade texture (which still needs lots of work). With the lack of this information, it simply uses the default OSM2XP facade set, but also allows filters in the facade set to render different areas and shape types with different textures, e.g. If a residential buildings is less that 50m2, then it could use a cottage texture, if it was bigger, we could use a terrace texture, etc.. It could also switch facade sets based on gps coordinates, so continental sceneries could have regional buildings. Thanks PilotBalu, it's great to see you here and I love the work you've done so far with the OSM packs, and I'm sure you and Daikan have had many headaches trying to get it to work. As I said above to Colin, the generation is highly configurable, so regional facades, colors, kind will already work (I just don't have any facade sets to work with). Roof images from satelite shots sounds really cool, and I think when it's out, I could reach out to the developer of g2xpl and see if he can assist me in getting this working (Even if it could just open the X-Plane scenery tile, and grab a colour). I'm not sure how the smart exclusion algorithm would work, but I'm presuming it would scan small areas of the tile to see what's there, and if there's nothing (in a preset area), it would remove the exclusion (or more correctly, not create one in the first place). Also, on my todo list is boundary exclusions, so that if you generate Germany, and then Austria as seperate sceneries, the exclusion zone from Germany won't exclude objects in Austria (so, the boundary tiles would have a boundary zone, wrapping the last points on the tile).
-
I know the multipart buildings you mean, they're a right pain. I found a few of them in Berlin and firstly I try and join the shapes together which often works, but in cases where it doesn't, I use a concave hull polygon boundary, which produces something which is similar in shape, and is good enough. If you're using such a tool at simheaven, then I'm hoping this program will come in useful for you and Pilotbalu, and anyone else who wants to create city sceneries. It should do most of the hard work for you, and it can already import and use osm2xp facade sets.
-
Thanks John! Notice all screens are enhanced by Skymaxx Pro ;-) I believe that there is so much potential in OSM data, that it's crazy not to try and best use it as much as possible.
-
Yes, it's cross platform. I'm developing on a Mac, but don't see any reason why it won't run on both Windows and Linux. Couple more screenshots of Berlin and Warsaw. I've added support for the OSM building:material and roof:material tags, so if a building is specified as blue stone walls, and a grey concrete roof, the program will generate a custom facade and texture for it. The program also now picks up some of the monstrous park and woodland multi polygons that are used in Berlin and across Germany, so it also adds trees (also respecting the type of tree given) and even park benches if you so chose :-) If anyone can offer a hand with the facade file format, please let me know. I'm having some problems getting it to align textures properly to the buildings.
-
I'm in the process or creating a tool which will add buildings, obstacles and forests from OpenStreetMaps. I know there is already a tool called OSM2XP existing, but it has a couple of problems and development seems to have stalled on it for the time being. The tool presently supports the following: Multipolygon buildings (buildings with holes) are supported. This makes a big difference in cities.Multipolygon forests and relations are supported. Lots of forests (especially in Europe) are grouped together in OSM into relations, and OSM2XP couldn't find these, which made large areas in Europe where there are forests empty.Complex Rules supported. Example, you can specify that a building with a particular set of tags, and area or height should use a particular facade. This means you can also place obstacles not only based on their tag, but also on their height and other information.If a building has colour information, the tool will generate a facade for it with the exact colour of the wall and roof specified. This all depends on the information in OSM of course, but in some major cities, it's really well done, and people have started to add this information.Resume support, so if you are generating a large scenery area. You can stop the program, try it out, and continue the generation later for other tiles.The program is still in alpha and is currently command-line only, however it's already generating some good scenery. These shots below show a run I did in Berlin: I'm not intending for the program to compete with OSM2XP, as I'm designing it for scenery developers who understand the options and aren't scared of config files and the command-line. Of course, if anyone is willing to create a GUI for it, I'd be happy for the help :-)
-
It comes out when it comes out. Sit and wait, or move on. No need to feel offended/insulted. Things happen, products are delayed, it's not the end of the world.
-
No problem. I look forward to trying this :-).