-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option --shaderscolumn deprecated #173
Comments
PR see #172 |
hello do I understand correctly that this PR will break usage of tesselate_building that sets shaders column? my use case can't use client-style styling because the output is intended for Cesium for Unreal which doesn't support that yet CesiumGS/cesium-unreal#1392 |
yeah it's a breaking change with result uniform styled geometries, good to you know you are using this feature. This change might need some reconsideration. |
I don't have any particular data, but I was told by superior that its wanted feature and I already made REST API that wraps this conversion that can color features by attribute mapping, attribute intervals and interval to color interpolation, and configuration can be different for roof, wall and floor. I will ask them to participate in this conversation. I think it would be better if it was possible to style it on client side, but it's just not supported in cesium for unreal. |
As alternative I’m thinking to have 1 style per geometry (so not 1 style per triangle) that would reduce complexity and work in all cases |
what is geometry in this context? a polygon? |
yes one of the input geometry types LineStrings/Polygon/MultiPolygon/PolyhedralSurface/TIN Input table in this case will look like:
Will this work for you? |
yes, thank you |
@bertt Yes, I agree with @mittermichal. Coloring each polygon differently would be very beneficial for us. Thanks for your awesome libraries! ❤️ |
@ivopisarovic I'm thinking if the above solution is in place (with 1 style per geometry) to rewrite the tesselate_building tool a bit, so for each building there will be 3 geometries in the table (for roof, walls, floor) with an extra attribute for the type. The style can then be set in the style column. Note it will take some time to implement these changes so for now the current solution will still work. |
@bertt Sure, it would be awesome! :) No problem it will take time. We can help with testing later if you need. |
I've found another non breaking solution: For geometry collection types like MultiLine, MultiPolygon and PolyHedralSurface there is a new possibility to have a shader per inner geometry. For example consider a Multipolygon geometry of 2 squares:
The number of shaders can be:
Tool tesselate_building will still work the same, but can be simplified (by making use of this new method). See #188 for the changes involved. Closing this issue. |
do I understand correctly that the order of geometry in geometry collection corresponds to order in shadercolumn BaseColors list? |
yep |
Notice: Option --shaderscolumn is deprecated and will be removed in a upcoming release (breaking change)
With option shaderscolumn it's possible to define the shader per triangle in the database, using a predefined JSON format.
See https://github.com/Geodan/pg2b3dm/blob/master/styling.md
Although a very powerful mechanism, reasons for deprecation are:
function is not used much;
function is complex and slows down new developments;
function does not work when triangulation is performed by pg2b3dm (for example with lines or non triangulated geometries)
Alternative options are:
Set styling options for the complete tileset --default_color, --default_metallic_roughness;
Use client side styling, see https://github.com/Geodan/pg2b3dm/blob/master/styling.md#client-side-styling.
The text was updated successfully, but these errors were encountered: