Hello.
In this PhotoDome depth map example, a grayscale depth map is used.
I’m trying to apply a color depth map and it doesn’t work correctly.
What should I do? Convert color depth map to grayscale, how to do it?
Help me please.
Hello.
In this PhotoDome depth map example, a grayscale depth map is used.
I’m trying to apply a color depth map and it doesn’t work correctly.
What should I do? Convert color depth map to grayscale, how to do it?
Help me please.
Why not converting the data in gray scale ?
I only have a color depth map.
what does the color represents in this case ? a conversion needs to happen
As far as I understand, the distance is measured here approximately on such a scale, dark blue (closer) and dark red (further).
I would suggest to recreate in the playground something similar to this mesh onready observable · BabylonJS/Babylon.js@8e19ab8 · GitHub in the playground as it is not much code to adapt to your scale and if interesting for others as well, this could be a nice contribution
Hello! Just checking in if you still have questions @D_Taylor
no, the solution was to convert the color scale to grayscale
@D_Taylor @sebavan Is there a way to do opposite operation ? that is…
from a grayscale depth map → to a color depth map ?
Color scale can be rainbow, magma or plasma…
Yes. Assuming that your depth map is in the 0 … 1 range, then think with me, it can be used as a uv for a texture.
So, you can just create a color texture with the color grad you want, and sample from it using the depth as u, having v always zero.
If your depth is not in the 0 … 1 range, you can easily convert, by dividing the current depth of a pixel by the maximum depth, and then mapping to uv and sampling from the color texture.
Not at home now but I can build a playground later, if you still need.