heremaps/harp.gl

Any way to increase/decrease the render distance of 3D buildings?

Closed this issue · 2 comments

I am thinking, if its possible to increase / decrease the distance from where the building starts rendering, so that I don't have to scroll too far and get too zoomed in but I can see a skyline view of the buildings and of course it would be help if there is a way to increase how many buildings get rendered, basically the radius of rendering

Hi @sirakc,

I am not sure I get your issue, maybe this helps:

You can basically adjust the Style of the extruded buildings by extending the "Theme", e.g like following

 theme: {
                extends: "resources/berlin_tilezen_base.json",
                // end:harp_gl_hello_custom_theme_0.ts
                styles: {
                    tilezen: [
                        {
                            id: "extrudedBuildings",
                            description: "extruded buildings",
                            technique: "extruded-polygon",
                            when: ["ref", "extrudedBuildingsCondition"],
                            minZoomLevel: 16,
                            renderOrder: 2000,
                            height: ["get", "height"],
                            color: ["ref", "defaultBuildingColor"],
                            roughness: 1,
                            metalness: 0.8,
                            emissive: "#78858C",
                            emissiveIntensity: 0.85,
                            footprint: true,
                            maxSlope: 0.8799999999999999,
                            lineWidth: 1,
                            lineColor: "#172023",
                            lineColorMix: 0.6,
                            fadeNear: 0.4,
                            fadeFar: 0.5,
                            lineFadeNear: 0.4,
                            lineFadeFar: 0.5
                        }
                    ]
                }
            }

note the changed fadeNear, fadeFar parameters which will fade out the buildings earlier (in direction of the horizon) on the map.

Is this the case you want to achieve?

Otherwise if you refer to distance as in the height the camera has over the map, which is defined as zoomlevel, this can also be configured, same as above via the minZoomLevel parameter, but is internally limited to I think show earliest at zoomLevel 16 , due to performance issues if we would allow it before.

@FraukeF yea first I was talking about how can I see the buildings even from a far distance, then I asked if I can increase how many buildings get rendered once the buildings start appearing, and the solution answered both the questions :D