Artelia / NIMPHS

Blender add-on. Numerous Instruments to Manipulate and Post-process Hydraulic Simulations (OpenFOAM, TELEMAC).
https://Artelia.github.io/NIMPHS
GNU General Public License v3.0
13 stars 2 forks source link

Rework point data management #9

Open Failxxx opened 2 years ago

Failxxx commented 2 years ago

Description

I don't think we need to have different ways to import point data as vertex colors (remap options). Indeed, we could simply use the 'Map Range' node remap values.

Links to documentation, examples or class definitions

Here is an example: Left, use of the 'Map Range' node with a 'LOCAL' method for remapping, with values [-0.3978, 0.3978]. Right, 'CUSTOM' method for remapping [0.1, 0.3]. This difference is probably due to a first remap operation when using 'LOCAL' method (see next screenshot).

Screenshot from 2022-09-02 11-13-11

Screenshot from 2022-09-02 11-15-06

Pseudocode or screenshots

Totally remove the 'method' option?

Failxxx commented 2 years ago

Also, vertex_colors is deprecated since 3.2. Would probably be nice to use color_attributes now. See:

Failxxx commented 2 years ago

However, it does not seem possible to store point data which values are not in [0, 1] as the documentation says: https://docs.blender.org/api/3.1/bpy.types.MeshLoopColor.html#bpy.types.MeshLoopColor

Thus, it could be difficult to implement this for Blender versions < 3.2