Enhancing 3D Rendering with OpenStreetMap data : Feature Suggestions
After a few days of use, I was wondering if it would be possible to introduce some improvements to better reflect the "OpenStreetMap reality":
- Enable the display of 3D elements in .obj format based on specific tags such as street_lamp, sculpture, fountain, etc.
- Apply textures and colors defined in the Simple 3D Buildings model for buildings, using attributes like building:colour, building:material, building:levels.
- Randomly generate trees only in areas identified as landuse=forest.
These are just suggestions - feel free to consider what seems useful to implement.
The game is really cool, thank you !
- Enable the display of 3D elements in .obj format based on specific tags such as street_lamp, sculpture, fountain, etc.
This is currently possible by assigning the attribute model:name and optionally the yangle:degrees attributes.
Instead of the yangle:degrees attribute, neighboring nodes can be used to define the rotation.
- Apply textures and colors defined in the Simple 3D Buildings model for buildings, using attributes like building:colour, building:material, building:levels.
The building:color (not building:colour) attribute should work. Also, one kind of roof with angles is supported:
- Randomly generate trees only in areas identified as landuse=forest.
The attributes terrain_region:trees and terrain_region:flowers are currently supported:
The terrain-style inside the regions can then be set using the terrain_flowers_textures and terrain_trees_textures attributes in the JSON-file.
The trees and flowers to be shown are specified using the far_flowers_resource_names and far_trees_resource_names attributes.
The much_far_flowers_distance and much_far_trees_distance attributes define the vegetation density.
Thank you for the support. I made some tests this weekend.
Models
This is currently possible by assigning the attribute model:name and optionally the yangle:degrees attributes.
I understand which tags to apply, and everything is working correctly.
Buildings I haven't tried yet :blush:
Trees
The terrain-style inside the regions can then be set using the terrain_flowers_textures and terrain_trees_textures attributes in the JSON-file.
I made the following adjustments, in an area defined as "terrain_region=trees" :
"terrain_trees_textures": [
"#Gravel010_Base",
"#Ground037_island_1",
"#Ground037_island_8_1",
"#Ground037_island_64",
"#Ground037_island_256"
],
"far_trees_resource_names": [
"vegetation6.12(hitbox:box_02_1_02_hitbox)",
"vegetation6.13(hitbox:box_02_1_02_hitbox)",
"vegetation6.14(hitbox:box_02_1_02_hitbox)",
"vegetation6.15(hitbox:box_02_1_02_hitbox)",
"vegetation6.16(hitbox:box_02_1_02_hitbox)"],
However, the terrain texture is modified, but no trees are visible on it. Did I forget a parameter?
I've try the buildings. There are good and bad news !
The good : the 3dr:type=9.2 works perfectly !
The bad : the colors don't seem to be taken into account. I created three houses with different configurations, but I don't see any changes in the rendering. Here is what it looks like:
And the building configuration :
Left, whithout color tag :
Middle, with RGB values :
Right, with color names :
I'va also check on the wiki, the real name for color properties is building:colour, roof:colour and not ~~building:color, roof:color~~
Maybe did you know how to display the real color of building ?
However, the terrain texture is modified, but no trees are visible on it. Did I forget a parameter?
I made a mistake there, the attributes are near_flowers_resource_names and near_trees_resource_names.
I've try the buildings. There are good and bad news ! The good : the 3dr:type=9.2 works perfectly ! The bad : the colors don't seem to be taken into account. I created three houses with different configurations, but I don't see any changes in the rendering. Here is what it looks like:
I was wrong there as well, the currently supported attribute name is just color (not colour, building:colo[u]r, roof:colo[u]r). Roof colors are not yet supported at all. Also, the colors must be rgb-values with format r g b. Each component has a range from 0 to 1.
I'va also check on the wiki, the real name for color properties is building:colour, roof:colour and not building:color, roof:color
Yes, the game should use the recommended tags...
Building
The 'color' tag works perfectly. The color of the buildings is changed correctly.
But it's important to note that the syntax is not #rgb (p. exe #bc5f7a). It's the value of the 3 colors in float, separated by spaces.
Trees With the new parameters, everything work fine, too.
Despite the information provided, I can't remove the trees generated at the side of the road. To have a more realistic representation of the decor, I would like to create myself the forest areas. Can you tell me about the changes to make to the scene configuration so that there are no more trees on the side of the road?
The trees on the side of the road are defined by the lines "vegetation11.0" - "vegetation11.5" in the "near_wayside1_grass_resource_names" attribute. It should be possible to simply delete the 6 lines from the JSON-file.
Regarding the building:colour/roof:colour attributes: Applying these attributes only results in the desired final color if the texture that is applied to a building is gray or white. Otherwise, the texture color and the building:colour/roof:colour attributes would multiply and result in a wrong final color.
This might have been the reason why the color attribute was chosen as a non-standard attribute back in the day.
There have been improvements to roofs and windows.
- Windows are now reflecting, if the
"window_reflection_map"attribute is set. - Roofs have a rain pipe now, if the attributes
"roof_rail_texture"and"roof_model"are set. - The 9.2 model is automatically applied to all buildings, if the
"default_roof_9_2"attribute is set.