-
Notifications
You must be signed in to change notification settings - Fork 38
3d extrusion (buildings etc) spec #456
Comments
Some values of
Would the use case would be for, say, a realistic texture for stone façades or a window pattern on office buildings?
I think this would be useful for terrain lighting, too. In addition to the lighting source’s azimuth, what about its altitude? The sun (or moon) would need to be much lower to accommodate a sunrise or sunset effect.
Aside: Cantilevered building structures or pedestrian bridges that have a significant horizontal footprint would need a |
Awesome. We'll also need something like |
There are loads of other of odd building shapes that are not suitable for simple extrusion. Since many of these are important landmarks that can't be ignored, we'll probably need some kind of separate true 3d modelling - maybe cantilevers and sky bridges would best be preprocessed into whatever this format ends up being rather than having special extrusion handling for them? |
Would such a 3D shape levitate in midair? or would it rest on a second, smaller shape? |
@peterqliu these |
In the source being used in @lbud’s demo, each building part is extruded individually, so imagine Fallingwater being represented by a number of building parts, some of which have a
I don’t think it’s strictly necessary to support arbitrary building shapes in order to support raised features as part of extrusion. Or perhaps the concept should be generalized so that, for instance, a point feature can levitate above a tilted map. Such a property would be useful for the “user location dot” or “course puck” that is typically drawn with a drop shadow, as if levitating, in mobile map SDKs. But for buildings, I think the concept of a “knocked-out” floor is not merely decorative and also not necessarily tied to true 3D modeling. |
this is great.
👍
yes? but no, not really. how would this spec deal (now or in the future) with complex but critical edge cases like the eiffel tower? would this be covered by "support for extruding lines and points?" |
Would it be possible to add the |
Hmm. @lucaswoj — I considered this, but ultimately I think it makes more sense to create a new layer type (also, I should note I'm very skeptical about use cases for extruding lines and points*):
* I'd also add that I do see the case for raising, say, a point (circle/symbol type) on a map, but I wouldn't consider those "extrusions" — "extrusion" here isn't so much "raise this thing on the map" as it is "turn this into a vertical prism/give it walls." |
There are use cases for extruding lines and points, as opposed to having them levitate. For example, you might want to place an elevation profile on the map, or mark cities with extruded points whose heights correspond to population or some other attribute. |
Alright; maybe we'll do those later. |
If it's not a significant scope creep, negative extrusions would be useful for things like strip mines/sinkholes. edit: can just be a rectilinear cavity, not a complex shape or mesh |
@peterqliu unfortunately that is a significant scope creep for now. edit: re edit: still significant scope creep |
Could this be a root property on the style? We would still need a Otherwise, on this spec 😄 |
Will the map look funny in any situations if the lighting doesn't affect unextruded fills? |
👍 for adding |
Here's an update to @lbud's and my proposed style spec changes:
Notes
|
What unit is |
Is this spec being designed with future support for 3D terrain meshes in mind? |
Amazing ! Do you have an idea of the release date ? |
Why a
The other
I appreciate that this is the naming convention established by OSM. |
What is the function of
Can you say more about this? E.g. is it a technical limitation or a bug in the current code that we haven't tracked down yet? What happens if you use something like
Or even simply |
These are probably better options than
It's a bit long-winded, but maybe the second option is better, for clarity and just to be more parallel? |
The only information that “height” provides in this context is that “top” and “bottom” are measured along the vertical (altitudinal) axis. But “top” and “bottom” already provide this context. In CSS, when an element is absolutely positioned, |
Are there situations (even in the future) when an
how about some form of |
@1ec5 No, it's a three-dimensional |
Also agree that |
|
I would like to revisit this proposal
There has been continued interest in extruding lines, points, and circles. The implementation of this functionality may be done later but the specification design must be considered now. The cleanest way to implement this functionality is to allow
The only reason
I find it surprising that the top of an extrusion is colored differently than a fill layer. This implies that lighting is applied inconsistently to different layer types. That'd be surprising whether
We can keep the implementations separate and hide that implementation detail from the spec.
A quick search indicates that 3d modeling software (Blender, Sketchup) supports "extruding" lines and points. |
Indeed, but as I pointed out in #456 (comment), I think there’s a distinction to be made between “levitating” a layer (raising it above the ground) and extruding it (giving it a support structure). Is it extrusion if you take a 2D layer and levitate it without giving it any depth? Consider a map that has extruded buildings, so you want the Maki POI markers to levitate with leader lines extending from the POIs down to the ground, to avoid any ambiguity around depth. The symbol layer for the POI markers would be levitated, while the leader lines would be implemented as extruded point layers. Google Maps does something like this on the Web (in 3D Earth view), although it would be awesome to be able to vary the vertical offset by the POI’s importance. Maybe it’s already possible using Implementation-wise, should we treat levitation as a special case of extrusion regardless ( |
Alright team, you've got me convinced. @mapbox/gl @peterqliu Increasing use cases for 3d maps (navigation, gaming) definitely present use cases for
Levitation use cases will be addressed in mapbox/DEPRECATED-mapbox-gl#6. But we will design the spec in a way that makes it more extensible for extruding multiple geometry types. As such we are modifying this spec proposal: presently,
In the future we'll add the same properties to At present this means we'll handle The biggest catch in this is that as soon as a feature is extruded it will also be affected by the map's lighting. The current in-progress implementation of extrusions treats |
(I'm flexible on exact wording of |
Just noting here that our roadmap doesn't currently include the ability to create 3D leader lines (I suppose you could hack something together with a symbol layer + circle layer, but they wouldn't be related to each other, so collisions would be inconsistent). I think this is fine for now, as you also can't currently create 2D leader lines either. Leader lines in general may need special implementation in the symbol layer. |
Closing as implemented — will open tickets for other 3d properties as needed. |
@lbud Is there a plan to create tickets for levitated line and circles? After playing with the extrusion layer (and loving it), it'd be great to get lines that correlated vertically with their extrusion. Also circles. |
@bensleveritt there's discussion happening at mapbox/DEPRECATED-mapbox-gl#6 about how we may approach "levitated" features. |
@lbud Thanks, I did see that, but I wasn't sure it was the most up to date tracking of the feature. |
How do you style individual building. |
Hi @phprad, thanks for using Mapbox. For "how do I" questions like this, please refer to our help documentation, and if you can't find the answer there, contact support. This issue tracker is for reporting bugs and feature requests. Thank you! |
Does i understand right, properties like |
That's right @strech345, there is no antialias or outline property for fill-extrusions. |
Hello @lbud , |
Sure, |
Hello @lbud , |
It is not under active development or prioritized at this time. |
Spinning off of mapbox/mapbox-gl-js#684 (comment): I've reimplemented @ansis's 3d building demo (js branch; spec branch; shader branch). That code is ported pretty faithfully from the demo, except that I've renamed
building
toextrusion
everywhere: itextrusion
type (in which one would specify a polygon source layer)properties.levels
(the demo is done based on a source from @ajashton with this property), or falls back to a hardcodedlevels
integerextrusion-shadow-color
, which colors the shadow tint (but is pretty subtle; doesn't change the amount of possible shadowing)I propose the following additions to the spec (:warning: not all of which are yet implemented):
extrusion
type. At present it only extrudes polygons. We may add support for extruding lines and points in the future, given compelling use cases/need.visibility
extrusion-color
extrusion-shadow-color
(open to other naming suggestions -- @tmcw might have one)extrusion-opacity
(I'm on the fence about this as it can create weird ghostly buildings, but can support if people find ghostly buildings compelling)extrusion-pattern
: implementation has been punted so far but I fear this should probably existextrusion-antialias
extrusion-outline-color
(and if so, what should an extrusion outline be? Just the base? Other edges? (Hint: I haven't done other edges))extrusion-translate
extrusion-translate-anchor
extrusion-height
: Though undoubtably there are cases to extrude not based on data (@1ec5 would here point out that the buildings in DC are more or less all the same height by law), I think it's important this new type be DDS-first.extrusion-lighting-anchor
(whether a lighting direction should be oriented to map or viewport)map.setLightDirection
to change lighting@mapbox/gl @mapbox/cartography-cats
The text was updated successfully, but these errors were encountered: