Forum

Author Topic: DEM overlay to model  (Read 5460 times)

GrinGEO

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
DEM overlay to model
« on: February 06, 2019, 07:06:56 PM »
Is it possible, instead of using the texture generated by Agisoft, overlay to the 3D model the DEM color palette? Becouse I have a very interesting alpine mapping that I would like to share to the client in DEM palette overlay mode via Sketchfab.

If this could be possible, it would be awesome

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15083
    • View Profile
Re: DEM overlay to model
« Reply #1 on: February 06, 2019, 07:25:18 PM »
You can use the script to modify the vertex colors (if available) for the mesh model and see the model in Shaded view mode with the vertices colored according to the altitude.

The sample script and the example of the output are attached.
Best regards,
Alexey Pasumansky,
Agisoft LLC

GrinGEO

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
Re: DEM overlay to model
« Reply #2 on: February 06, 2019, 07:53:54 PM »
Ok thanks sound interesting. I normally don't use vertex colors and have it disabled, since I didn't understood this feature.

Like Exporting the DEM in normaly grayscale and now added palette, Could we not export the DEM as palette & than import as overlay to the texture?

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: DEM overlay to model
« Reply #3 on: April 06, 2022, 03:50:57 PM »
Is there any way of changing the palette for the colorizing?

I've been trialling creating DEMs for our dive site maps, and we really need to show where set depths are (max depth for training levels, 5m, 12m, 18m, 30m, 40m, etc.)  So i've been playing with 'Set Palette' and getting exactly what we're looking for.

But we'd really like to also colorize the 3D Model vertices with this same palette... But instead, this scrip only gives a default rainbow palette, not obeying the default palette in Preferences, or the palette set in the DEM.

Any way to do this?

Thanks.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15083
    • View Profile
Re: DEM overlay to model
« Reply #4 on: April 06, 2022, 05:43:21 PM »
Hello CheeseAndJamSandwich,

This script version is not using DEM palette settings. The colors are hardcoded to the script body. But I think it should be possible to modify the behavior and use the DEM palette settings. Can you specify, if you are using Absolute values option for DEM palette?

A possible workaround could be exporting DEM in false colors representation (Raster Transform -> Palette option), re-importing it as orthomosaic and then running Colorize Mesh Vertices command using the pseudo-orthomosaic data as a source.
Best regards,
Alexey Pasumansky,
Agisoft LLC

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: DEM overlay to model
« Reply #5 on: April 06, 2022, 06:09:16 PM »
For the Dive Site Map model we're working on, we're using absolute values...  So i've set colours at 0, -5, -12, -18, -30, -40, etc...
We'd likely only use the absolute values.

This would be awesome if it did just follow the DEM Palette...  We're experimenting with different shades of different colours for each of the depth bands...  This will make reading the map very, very easy for the dive guides, students, etc.

Thanks for looking into it!
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15083
    • View Profile
Re: DEM overlay to model
« Reply #6 on: April 08, 2022, 08:34:17 PM »
Hello CheeseAndJamSandwich,

I have made a quick prototype that should colorize the mesh vertices according to the existing DEM palette (assuming that it is defined in absolute values).

Please check, if it works as expected on your projects now.

Best regards,
Alexey Pasumansky,
Agisoft LLC

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: DEM overlay to model
« Reply #7 on: April 09, 2022, 04:35:49 PM »
Please check, if it works as expected on your projects now.
This does work exactly as expected, thanks.

It sure does love RAM  :D  I've finally found the function that actually requires the whole 64GB of my system ram.
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15083
    • View Profile
Re: DEM overlay to model
« Reply #8 on: April 09, 2022, 05:22:55 PM »
Hello CheeseAndJamSandwich,

How many vertices are there in the model of the project which requires 64 GB RAM for the script?
Best regards,
Alexey Pasumansky,
Agisoft LLC

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 162
    • View Profile
    • Sketchfab Models
Re: DEM overlay to model
« Reply #9 on: April 10, 2022, 09:18:12 AM »
154,855,509  ;D

From 17,441 cameras...
It's a big area, and is scanned at only 4-5m altitude...
The 17,441 cameras are what's left starting with 40,000 photos, each 'flight' aligned and thinned down using Reduce Overlap of 9, then all 15 thinned 'flights' combined, aligned and reduce overlap to 9 again...

Here's the extents of the scan so far.  Mantas & Divers photoshopped in for scale.
(click https://postimg.cc/K1sXypzs to see a bigger version)
My 'little' scan of our dive site, 'Manta Point'.  Mantas & divers photoshopped in for scale!
https://postimg.cc/K1sXypzs
Sketchfab Models:
https://sketchfab.com/cheeseandjamsandwich/models