tkeskita / BVtkNodes

Create and execute VTK pipelines in Blender Node Editor
GNU General Public License v3.0
111 stars 19 forks source link

Color Mapper node color by vector field magnitude #58

Closed renehommel closed 1 year ago

renehommel commented 3 years ago

I do not know if the following problem has already been discussed: When using vtkStreamTracer, the velocity magnitude is not correctly mapped to the streamlines, as can be seen from the screenshot (right image). A coloring with the components u, v, or w works without problems (left image). I tried it with completely different datasets, always with the same result. Also changing the node settings does not solve the problem. What can be the reason?

I can share the VTU file, but it is about 50MB.

streamlines_U
tkeskita commented 3 years ago

Hi @renehommel,

this is a very common problem. We should modify Color Mapper to improve this, so please let this issue remain open until a fix is applied. The reason is, your ResultArrayVector is a vector and Color Mapper needs a scalar. I think the Color Mapper should be modified so that if it encounters vector or tensor field it calculates magnitude and uses that. Current workaround is that somewhere upstream you must calculate mag(x) and use it in Color Mapper.

renehommel commented 3 years ago

thanks for the clarification and the hint