davide445 Posted June 14, 2020 Share Posted June 14, 2020 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 Asking a hint about smoothing these artificial terracing without changing the other heightfield features. Quote Link to comment Share on other sites More sharing options...
j00ey Posted June 16, 2020 Share Posted June 16, 2020 You could perhaps do something like the attached file... It just calculates the steepness of a smoothed version of the geo [presumably the stepping is worse the steeper the terrain] and then lerps between the input and the smoothed version using the steepness smooth_steep_areas.hiplc 1 Quote Link to comment Share on other sites More sharing options...
nuki Posted June 16, 2020 Share Posted June 16, 2020 Is the dem data 16/32 bit float? what range of values are shown in the picture? do you convert/process the dem data somehow? 1 Quote Link to comment Share on other sites More sharing options...
davide445 Posted June 16, 2020 Author Share Posted June 16, 2020 @j00ey thanks will check this back in the office. @nukithe terrain was downloaded from Mapbox and next converted to heightmap using Terrain_Output node. The original height it's from 980 m to aboit 2100 m. The shown picture its not in Houdini but in our 3d realtime engine. Quote Link to comment Share on other sites More sharing options...
nuki Posted June 16, 2020 Share Posted June 16, 2020 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. 1 Quote Link to comment Share on other sites More sharing options...
davide445 Posted June 17, 2020 Author Share Posted June 17, 2020 @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 Quote Link to comment Share on other sites More sharing options...
j00ey Posted June 17, 2020 Share Posted June 17, 2020 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? 1 Quote Link to comment Share on other sites More sharing options...
davide445 Posted June 17, 2020 Author Share Posted June 17, 2020 @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 Quote Link to comment Share on other sites More sharing options...
j00ey Posted June 17, 2020 Share Posted June 17, 2020 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 Quote Link to comment Share on other sites More sharing options...
davide445 Posted June 18, 2020 Author Share Posted June 18, 2020 (edited) 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 June 18, 2020 by davide445 Quote Link to comment Share on other sites More sharing options...
davide445 Posted June 19, 2020 Author Share Posted June 19, 2020 @j00ey art the end discovered the realtime engine accept RGBA 16 fixed format, this and using the simple heightfiled_blur node I obtain good results. 1 Quote Link to comment Share on other sites More sharing options...
j00ey Posted June 19, 2020 Share Posted June 19, 2020 Oh great. Simple method is always the best! FWIW Unity can work with heightfields directly via H Engine, I don't know if that might be an option in your engine..? Quote Link to comment Share on other sites More sharing options...
davide445 Posted June 19, 2020 Author Share Posted June 19, 2020 (edited) 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 June 19, 2020 by davide445 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.