Scaling the Color Scale

Feel free to ask any question here
Grillteller
Posts: 7
Joined: Thu May 19, 2016 7:58 am

Scaling the Color Scale

Post by Grillteller »

Hi,

i computed signed distances between a cloud and a mesh and i want to visualize the output. I'm interested in the values between -0.6 and 0.7 (see image).
Image
http://imgur.com/GNifNyq
But when i set the display ranges to these values, more than half of the colorscale is grey because i have values like -3.0. Is it possible to get a fully colored colorscale or do i have to edit the scalar field?

Best regards
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scaling the Color Scale

Post by daniel »

To do this you have to create a custom 'absolute' color ramp:
http://www.cloudcompare.org/doc/wiki/in ... es_Manager

An absolute color scale uses 'absolute' steps, i.e. the colors are only displayed between the values you specify. And you can also set custom 'labels' and only these labels will be used.
Daniel, CloudCompare admin
fuji1205
Posts: 12
Joined: Sat Dec 19, 2020 3:50 pm

Re: Scaling the Color Scale

Post by fuji1205 »

daniel wrote: Thu May 19, 2016 12:30 pm To do this you have to create a custom 'absolute' color ramp:
http://www.cloudcompare.org/doc/wiki/in ... es_Manager

An absolute color scale uses 'absolute' steps, i.e. the colors are only displayed between the values you specify. And you can also set custom 'labels' and only these labels will be used.
Thank you Daniel. But I was wondering why CC always clash when I try to modifying the value of the selected sliders?
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scaling the Color Scale

Post by daniel »

clash? Or crash?
Daniel, CloudCompare admin
fuji1205
Posts: 12
Joined: Sat Dec 19, 2020 3:50 pm

Re: Scaling the Color Scale

Post by fuji1205 »

daniel wrote: Sun Aug 22, 2021 3:22 pmclash? Or crash?
crash, and then I have to restart the program again
fuji1205
Posts: 12
Joined: Sat Dec 19, 2020 3:50 pm

Re: Scaling the Color Scale

Post by fuji1205 »

daniel wrote: Sun Aug 22, 2021 3:22 pmclash? Or crash?
And how we can change the color scale in absolute ? I mean absolute color difference(red, then yellow, then black, etc) instead of color gradient
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scaling the Color Scale

Post by daniel »

So the crash is definitely not normal! Which version are you using? Do you have a reproducible way to make CC crash?

And then, the gradient is the default mode. You have to trick CC by defining two steps very close to each other (like 1 and 1.00001) at each color changing point to visually achieve what you are looking for.
Daniel, CloudCompare admin
fuji1205
Posts: 12
Joined: Sat Dec 19, 2020 3:50 pm

Re: Scaling the Color Scale

Post by fuji1205 »

daniel wrote: Tue Aug 24, 2021 7:28 pm So the crash is definitely not normal! Which version are you using? Do you have a reproducible way to make CC crash?

And then, the gradient is the default mode. You have to trick CC by defining two steps very close to each other (like 1 and 1.00001) at each color changing point to visually achieve what you are looking for.
Thanks for your reply, Daniel!

I am using CC V2.12 alpha running at Windows 64-bit.

I encounter the same issue every-time when I edit the absolute value directly, it will crash.
Image 2.png
Image 2.png (12.5 KiB) Viewed 7447 times
I am sure my workstation is capable to run the CC and the point cloud size is within 10GB.

Also, I am wondering if CC can generate the color scale bar like this interval:
(C2M<-0.01),(C2M<-0.005),(C2M=-0.005),(C2M=0),(C2M>0.005),(C2M=0.005),(C2M>0.01)

Thanks again for your help!
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scaling the Color Scale

Post by daniel »

Ok, I haven't reproduced the crash, but I have indeed found a problem when manually changing the value/position of a color ramp step... I'll look at that ASAP.
Daniel, CloudCompare admin
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scaling the Color Scale

Post by daniel »

I have found the bug (and hopefully fixed it, you can try with the new 2.12.alpha version online).

And to create the color ramp you want (with the trick I suggest), with fixed color, you have to start with an absolute color scale and then:
1) reduce it to 2 steps
2) make sure the steps are above the maximum value you target (e.g. 1.0 and 2.0). And then:
3) select the first step, set the right color (the farthest), and edit its value to the minimum value (-0.01) then click somewhere else
4) click anywhere between the 2 steps, and edit the newly created step
5) set the color to the next segment color, and edit its value to something very close (-0.099) then click somewhere else
6) click anywhere between the 2 last steps, and edit the newly created step
7) set the same color and edit its value to the next intersection (-0.005) then click somewhere else
8) repeat from step 4
Daniel, CloudCompare admin
Post Reply