iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.09k stars 293 forks source link

[PointMaterial] Custom attenuated points parameters #2171

Closed ketourneau closed 1 year ago

ketourneau commented 1 year ago

Description

Allow custom attenuatedpoints parameters

Motivation and Context

We need to adjust attenuated points parameters for a better rendering in our case.

AnthonyGlt commented 1 year ago

This is a nice feature, could you make these parameters (minAdaptiveSize/maxAdaptiveSize/adaptiveScale) editable by the user when he's loading a pointcloud using a C3DTilesLayer? Like what was done with the pntsMode parameter. There is an example in examples/3dtiles_pointcloud.html. By searching where pntsMode is called, it could be possible to implements the same process with pntsMinAdaptiveSize/pntsMaxAdaptiveSize & pntsAdaptiveScale . (could be helpful https://github.com/iTowns/itowns/pull/2042) Don't hesitate to ask if help is needed

AnthonyGlt commented 1 year ago

Maybe could be a good idea to introduce a parameter size_mode: ...., // PNTS_SIZE.ADAPTIVE || PNTS_SIZE.VALUE that would automatically set the size at 0 (when PNTS_SIZE.ADAPTIVE is set) and use minAdaptiveSize/maxAdaptiveSize/adaptiveScale defined by the user. WDYT ?

ketourneau commented 1 year ago

@AnthonyGlt Thx for your code review. I applied the change. I add size_mode parameter, I think it's a more intuitive way to set point size behaviour. Is everything good ?

AnthonyGlt commented 1 year ago

Looks good to me. After tests, does it answer your needs ?