3D-Wind-Field icon indicating copy to clipboard operation
3D-Wind-Field copied to clipboard

Question regarding coloring.

Open jeonhyeonji92 opened this issue 3 years ago • 3 comments

I found out that the colors are defined in file segmentDraw.frag but can only be defined as a solid color. Is there a way to define gradient colors to different speed? I saw in another post that you commented to “access the texture of step 1 and decide which color to use when drawing the lines” in order to change the colors to different speed, but I wasn’t sure how to do this. Is this done in frontend(java script) or row(glsl)?Would you give me some guidance on how to change the colors for different speed in gradient?  Thank you!

jeonhyeonji92 avatar Mar 24 '21 05:03 jeonhyeonji92

Is this done in frontend(java script) or row(glsl)?

The particle color is displayed by GLSL program

Would you give me some guidance on how to change the colors for different speed in gradient?

Basically you just need to pre-define a color table and pass it to GLSL program, then output different color according to the speed of particle in GLSL program. You can refer to my previous deleted implementation commit "remove color table"

RaymanNg avatar Mar 26 '21 14:03 RaymanNg

A few months ago, I modified this demo as a npm module "cesium-particle" , which based on the respected author's achievements and supports color table rendering.You can refer to it.

hongfaqiu avatar Sep 10 '21 01:09 hongfaqiu