Jump to content

Smoothing DEM data


davide445

Recommended Posts

For a realtime application want to elaborate real DEM data, so to being able to generate specific masks. 

Problem is the site is in mountain with great slopes, so that the data appear to be not smooth

3TvGNck.jpg

Asking a hint about smoothing these artificial terracing without changing the other heightfield features. 

Link to comment
Share on other sites

based on the mapbox documentation, those DEM files are pngs with 0.1 mete height increments. I'd suspect that the texture resolution is lower than the tesselation on the terrain making those height steps visible.

So you'll probably need some type of filtering like j00ey suggested.

  • Like 1
Link to comment
Share on other sites

@j00eywas trying to replicate your work into my project, but i faced a problem: you converted all to VDB and I need to output an heightmask. Normally using heightfield_output, it's not working with your output node. I can't find any way to convert back the VDB to a terrain.

@nukiattached the original Mapbox height and the heightmap result of a conversion I'm using into the 3D realtime engine.

maps.zip

Link to comment
Share on other sites

There's no VDB in the hip I sent - I converted it to poly. You can use heightfield_project SOP to convert that back to heightfield.

But do you want to output the original jagged heightfield with a mask so you can smooth it in your real-time engine? Or you want to smooth the jagged heightfield and output that?

  • Thanks 1
Link to comment
Share on other sites

@j00ey I can't smooth it in the realtime engine (except developing some new component that's not the path I want), want to smooth (or better to say refine) it first in Houdini and next just export and use it as is in the realtime engine.

Here are how the original Mapbox data appear in Houdini, a problem since I need to have a vehicle running on these slopes, that for sure are not terraced in reality

image.png.edc14b3938fe8ac5b664b64bada8a58d.png

Link to comment
Share on other sites

The stepping is actually worse on the flatter areas contrary to what I expected - this is down to the resolution I think, as @nuki said.

Have a look at this file in case it's useful - you might want to combine different levels of blur for different steepnesses, it depends what you're after. My method here isn't much better than a simple heightfield blur but it retains a little bit of detail in the steeper areas.

 

smooth_steep_areas2.hiplc

Link to comment
Share on other sites

Testing the hiplc is working fine, but the result didn't change in the realtime engine.

I was noticing another element, that maybe show how beginner still I am: the converted_heightmap.tga I created just using an Heightfiled Output attached to the Mapbox node using Image Output settings Packet Raster, Single Channel, 32f, it's in fact a RGB8 image.

Trying to output using RGB format instead of Single Channel and 16b fixed Type produce an RGB16 image.

What's the correct Image Output settings to obtain an R32F or R16F image?

Edited by davide445
Link to comment
Share on other sites

It's an option, but was making it work in H16 release, with later H17 breaking the APIs so didn't work past that. 

Not a problem so far I'm not working on terrains on continuous basis, even if I will have still a lot of work to do for this specific case. 

Edited by davide445
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...