Planetside Software Forums

General => Terragen Discussion => Topic started by: alank on December 18, 2023, 08:58:48 PM

Title: How to mask a DEM Heightfield by altitude
Post by: alank on December 18, 2023, 08:58:48 PM
Hi, 
I am going crazy here, spending many days trying to solve this, and would greatly appreciate any assistance please.

I have a DEM heightfield of an island. This comes with a flat area where the ocean was. I was hoping to remove this, so that my lake/ocean is deeper. Screenshot attached. 

Basically, anything that has an altitude of 0.1m I would like to mask off/remove.

Many thanks.
Title: Re: How to mask a DEM Heightfield by altitude
Post by: Dune on December 19, 2023, 03:58:43 AM
I don't exactly know how it works with dem and heightfield,but you could try adding a surface shader (or distribution shader), set an altitude, a fuzzy zone, and lower by offset (and/or smooth).
Title: Re: How to mask a DEM Heightfield by altitude
Post by: schmeerlap on December 19, 2023, 09:28:18 AM
I've never worked with a DEM but if it's the same as any other heightfield you should be able to adjust the height with a Height Adjust Vertical node
with the Add Height adjustment, this will raise or lower your heightfield.
I'm actually working on the example I've attached.
Title: Re: How to mask a DEM Heightfield by altitude
Post by: Stormlord on December 19, 2023, 09:30:16 AM
Yes, very good solution!

STORMLORD
Title: Re: How to mask a DEM Heightfield by altitude
Post by: alank on December 19, 2023, 09:27:30 PM
Quote from: Dune on December 19, 2023, 03:58:43 AMI don't exactly know how it works with dem and heightfield,but you could try adding a surface shader (or distribution shader), set an altitude, a fuzzy zone, and lower by offset (and/or smooth).
Hi,
thanks so much! 

Yes this solution (surface layer with negative dispalcement) worked. Many thanks.

Note that I already had a 'heightfield adjust vertical' node. ALl it was doing was raising the entire heightfield, which included the area I wanted removed. I think the Digital Elevation Model must have included the ocean.