Planetside Software Forums

General => Terragen Discussion => Topic started by: sboerner on January 12, 2021, 11:46:47 PM

Title: How to fix DEM scanline artifacts
Post by: sboerner on January 12, 2021, 11:46:47 PM
Does anyone know of a way to smooth out these spikes, while keeping the underlying displacement? This is a 1-meter DEM file, and it looks like they're caused by noise in one of the scanlines. I thought a smoothing filter shader (which I've never used before) with a mask plugged into the scale modulator might work, but no.
Title: Re: How to fix DEM scanline artifacts
Post by: WAS on January 13, 2021, 01:05:27 AM
Quote from: sboerner on January 12, 2021, 11:46:47 PMDoes anyone know of a way to smooth out these spikes, while keeping the underlying displacement? This is a 1-meter DEM file, and it looks like they're caused by noise in one of the scanlines. I thought a smoothing filter shader (which I've never used before) with a mask plugged into the scale modulator might work, but no.
I think the only real definitive way is a clone tool in Photoshop. Clone as close to the area as possible, and use ctrl + shift to do a straight line (if it is), and follow the scan lines to mask them out with "good" data.
Title: Re: How to fix DEM scanline artifacts
Post by: Dune on January 13, 2021, 02:49:44 AM
Maybe they are nodata areas? They can be filled somehow by some check. I also had trouble loading certain DEM's, and had to change to lineair color space. This is why I prefer greyscale tiff's to work with, so best to indeed convert the DEM and clone out.
Title: Re: How to fix DEM scanline artifacts
Post by: sboerner on January 13, 2021, 10:44:55 AM
Thanks.

The DEM is an img file, not a tiff. Not sure how I'd convert that to something editable, but I'd rather not anyway because it is part of a matrix of 50+ DEM files that have been tiled to create a large-scale scene. The artifacts aren't no-data areas – I did check that. The good news is that they are in the background. I am saving out the combined DEMs as a ter heightfield file, and found that if the resolution is reduced most of the artifacts average out. So problem solved this time. 

I guess I was hoping there might be a procedural way to fix things like this, but understand why there isn't.
Title: Re: How to fix DEM scanline artifacts
Post by: Dune on January 13, 2021, 10:53:12 AM
Good to hear you solved it.