Replies: 5 comments
-
In master the following has been merged: #965 which might help. It will allow you to render the RGB values (Animated Waves option) onto the ocean surface. You could run a second camera with that enabled and target a render texture? That option samples the data in the vertex function so it won't be 100% accurate but should be close. You'll need to remove the |
Beta Was this translation helpful? Give feedback.
-
thank you so much! |
Beta Was this translation helpful? Give feedback.
-
@mooh I made a mistake. The 0.5 is needed. The other issue is that the data texture stores real units and the output of the camera will be clamped between 0-1. Replacing that line with the following should work: col.rgb = clamp(input.debugtint / 50, -1, 1) * 0.5 + 0.5; The 50 is just the maximum distanced displacement value (in metres) so change as needed. And the 0.5 at the end ensures negative values are not clamped. When you sample you'll need to convert it back to get real units. Apologies. Hopefully got it right this time :^) |
Beta Was this translation helpful? Give feedback.
-
I now understand it's RGB channels are the XYZ display on Animated Waves. |
Beta Was this translation helpful? Give feedback.
-
I explain this above. There's a couple ways you can get the height. What I described above is one way. Another way is to sample the _CrestOceanMaskDepthTexture and reconstructed the world position from that (you'll have to work that out by googling). It is only available if the Underwater Renderer is active (enable on that component: Debug > Disable Height Above Water Optimization). |
Beta Was this translation helpful? Give feedback.
-
Hello, I'm a student studying computer vision.
I found out about your crest github while looking for various tools to create a sea wave image dataset.
I would like to create a ground truth for the dataset by extracting depth for the sea wave image using your unity asset, Crest.
In Crest, I found AnimWaves expressing the wave height for the xyz value in the rgb channel.
Using this, I looked at the code LodDataMgrAnimWaves.cs because I wanted to see the height of the wave on the screen that the camera was looking at through the rgb channel, but I couldn't find the location of the camera when drawing AnimWaves.
AnimWaves seems to be an expression of the shape of the wave when viewed vertically from above, but I want to know the rgb channel of the height of the wave when viewed from the side to the horizontal plane.
As shown in the picture below, I would like to extract the height of the wave through the rgb channel.
If you know how to do it or if you can help me, I look forward to hearing from you
Beta Was this translation helpful? Give feedback.
All reactions