You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This task is probably a bit harder than roads connecting cities. It is recommended to first solve that issue. I worked out a possible approach but there are probably a lot of ways to solve this task.
Every building will start with a node on its front door. Then district nodes will be calculated by building density to ensure that bigger buildings will have a higher chance of being near a district road.
A weighted middle node will be calculated between the center of the district and the center of density (calculation could be done in analogy to the calculation of the center of mass in physics).
Then Finding the corner points of buildings and spawn special raster nodes there will make it possible to apply optimization algorithms to find the shortest way between nodes of interest and ensure that all nodes will be between houses. The weighted middle node will be assigned to the nearest raster node.
The districts will now be connected with the weighted middle node as crossroads. For each house-node, the shortest intersection with the district lines will be calculated and connected accordingly.
With all preparations done, the roads have to be placed in a manner in which they won't intersect with the house spaces. This can easily be accomplished by just following the raster-nodes, while suppressing too diagonal movement. Later a distortion function can be used to give the roads a more natural feel.
The text was updated successfully, but these errors were encountered:
This task is probably a bit harder than roads connecting cities. It is recommended to first solve that issue. I worked out a possible approach but there are probably a lot of ways to solve this task.
I orientated myself a bit on the method from Lechner et al., the paper “A Survey of Procedural Methods for Terrain Modelling” describes, using an agent based approach:
Every building will start with a node on its front door. Then district nodes will be calculated by building density to ensure that bigger buildings will have a higher chance of being near a district road.
A weighted middle node will be calculated between the center of the district and the center of density (calculation could be done in analogy to the calculation of the center of mass in physics).
Then Finding the corner points of buildings and spawn special raster nodes there will make it possible to apply optimization algorithms to find the shortest way between nodes of interest and ensure that all nodes will be between houses. The weighted middle node will be assigned to the nearest raster node.
The districts will now be connected with the weighted middle node as crossroads. For each house-node, the shortest intersection with the district lines will be calculated and connected accordingly.
With all preparations done, the roads have to be placed in a manner in which they won't intersect with the house spaces. This can easily be accomplished by just following the raster-nodes, while suppressing too diagonal movement. Later a distortion function can be used to give the roads a more natural feel.
The text was updated successfully, but these errors were encountered: