The two Houdini Digital Assets (HDAs) for converting a heightfield into other data, are two tools that work perfectly together to produce the data you need. The Terrain Mesh ROP will create one or multiple meshes from your heightfield, and the Terrain Texture ROP will render your heightfield into textures. The user gets control over a couple of parameters, which allows the user to get their desired result.
Terrain Mesh ROP
The Terrain Mesh ROP is a tool that can convert a heightfield into a mesh, while keeping curvature into account while doing so. The tool provides several parameters as seen above to let the user achieve the desired results.
Segmenting
The segmenting tab on the interface gives the user control over how the tool will split the provided heightfield layer into mesh pieces. The Height Layer parameter is the heightfield layer the tool will use to determine the shape of the generated mesh. By default the height layer. The user could however change this to any custom layer. This allows for additional layers to be baked out instead.
The tool will then split up the generated mesh into the specified tile count. The default is 4x4, but can be changed to whichever the user requires. (Including 1x1)
Using the Visualize Toggle, you can quickly debug if the tool generates the data the way you want. It will color your meshes, and also show the generated UVs.Meshing
The meshing tab controls how the tool will convert the voxel based heightfield into a quad based mesh. The Base Density slider controls the ratio of voxels to quads. A value of 1 will produce as many quads as there are voxels in the heightfield. But this is often not required, since the heightfield could contain regions that do not need a lot of detail.
That's where the Adaptive Density parameter comes to play. The number of density levels will control how many more higher layers of details there are allowed to be. This will then result in more dense mesh regions where the curvature is higher. This falloff can be controlled using the Density Falloff Ramp. The image above demonstrates this quite nicely, where we see the mountain top having a lot of detail, which gradually becomes less detailed in flatter regions.
UVs, Extrusion & Exporting
The tool also has two ways of generating UVs. The first one being from 0-1 UV-Space for the entire generated mesh combined. (Seen on the right in image above). This will result in the UV coords to match with the mesh. The tool however also allows each chunk to generate UVs which map every individual chunk from 0-1 UV-Space. This will give your textures a higher texel density.
Terrain Texture ROP
The Terrain Texture ROP allows the user to render the heightfield data not directly supported by the Heightfield Output sop into textures with ease. The tool allows you to render the following textures: Normal Map, Height Map (In case you want to use terrain systems in engine instead of meshes), Cavity Map, Occlusion Map. More could follow based on user requests.
The tool also allows you to specify tiled maps. Set the number of tiles and the total combined resolution, and hit export to start the rendering process. Note that rendering will take longer when using a higher resolution. (Just like any other render)
COMMENTS
Evgeniy Kovalenkov 7 years ago |
Good tools!!!
RudiNieuwenhuis 7 years ago |
Could it be these tools are not in the development branch on github yet?
Ambrosiussen 7 years ago |
Hi,
The tools have already been published to the development branch. They are called "sop_terrain_segment_rop.hda" and "sop_terrain_texture_rop.hda".
https://github.com/sideeffects/GameDevelopmentToolset/tree/Development/otls
Did you try downloading them through the update shelf in Houdini, or manually?
Paul
RudiNieuwenhuis 7 years ago |
Hi Paul, I tried the update shelf. Will have another look. Tnx.
RudiNieuwenhuis 7 years ago |
Manually worked. Tnx.
RudiNieuwenhuis 7 years ago |
I think there is a little issue when using HtoA in conjunction with this. The HOUDINI_PATH gets set in the houdini.env file but Arnold needs this too.
Ambrosiussen 7 years ago |
Thanks for the heads up. I will forward this information :)
polybender 7 years ago |
Tried updating using shelf - did not work.
polybender 7 years ago |
Manual worked.
bhb 6 years, 12 months ago |
Two things:
1) ¿¿How to work with 1x1 Tile??
The .hda only admit 2 x2 Tiles and up.
2) When exporting the terrain (.fbx 2004 or .fbx.2006) , the .hda export all tiles separately. How to export the whole terrain only??.
3) When importing the terrains in other app like Maya2016 .. all the terrain are named GEO in the shape name properties from maya.
For this they must renamed one by one previously. :(
Look inside the fbx.. and all named are the same.
Model: 1016381696, "Model::GEO", "Mesh" {
Version: 232
Properties70: {
P: "RotationActive", "bool", "", "",1
P: "InheritType", "enum", "", "",1
P: "DefaultAttributeIndex", "int", "Integer", "",0
P: "Visibility Inheritance", "Visibility Inheritance", "", "",0
}
Shading: Y
Culling: "CullingOff"
}
}
Ambrosiussen 6 years, 12 months ago |
Hi!
These requests are definitely possible. I will look into these, and push an update to Github once implemented. (Including the WM naming convention)
Paul
bhb 6 years, 12 months ago |
TODO:
1)These are exported:
Terrain_1.fbx
Terrain_2.fbx
Terrain_3.fbx
Terrain_4.fbx
Should be interesting to add a PREFIX and SUFFIX to name like this(same way to WM):
Pre_Terrain_1_x00_y00.fbx
Pre_Terrain_1_x01_y00.fbx
Pre_Terrain_1_x01_y00.fbx
Pre_Terrain_1_x01_y01.fbx
2) A way to export in .raw16(same way to WM)
bhb 6 years, 12 months ago |
4) sop_terrain_texture_rop
INCOMPATIBLE WITH
heightfield_xform
Changing the dimensions inside heightfield_xform(Uniform scale, grid scale or height scale).. sop_terrain_texture_rop becomes PLAIN.
Ambrosiussen 6 years, 12 months ago |
Hi,
You should now be able to find an updated version on Github with support for:
- HF Translate & Scale in both tools (No rotation yet)
- Single File Export
- 1x1 Tiles
- Mesh Name now equal to Chunk ID. (No more "geo1")
Thunderflex 6 years, 11 months ago |
"- Mesh Name now equal to Chunk ID. (No more "geo1")"
Is this available already maybe I got the wrong build? I installed today 1/3/18 and sop_terrain_segment is still exporting with 'geo1, geo2' etc format instead of x0_y0, x0_y1, etc.
bhb 6 years, 12 months ago |
Thanks! I appreciate it.
Thunderflex 6 years, 11 months ago |
Oh man, this is suuuper useful thanks! I did have to install them manually, the automatic didn't seem to work for me as well.
If I had one texture request it would be for RGBA Splat Maps so I could quickly lay in some textures. I could color the heightfield_erode tool to be RGBA for the coloring thgen I would just need the sop_terrain_texture_rop.hda to accept the coloring and slice it up for me. :)
Thunderflex 6 years, 11 months ago |
Nevermind, I think I found where to do this. Looks like the sop_terrain_texture rop has a big ol list of items already contained and I just had to expose the other options. Niiiceeeee
RudiNieuwenhuis 6 years, 3 months ago |
Just a quick question, why did you uvtexture at a 90 degrees angle and scale at -1,1,1?
Seems to me that keeping the angle at 0 would be much more intuitive with a scale at 1,-1,1.
I mean, normally I would think you want to project your map onto the HF from the top with x pointing to the right, right?
pande 6 years, 1 month ago |
i was watching the clip and checked the time.. it was 3 in the morning and i was like ... WTH... so quickly quit the clip to jump into bed just to realize its just 11:00.....
JohnDraisey 5 years, 10 months ago |
Yup, going to use this in my game ASAP.
Adekya 5 years, 3 months ago |
Hi,
I'm exporting Heightmaps from the tool but always get this "terracing" issue. Is there a way to have real good smooth heightmpas in Houdini ?
Thanks
TotiEden 5 years, 1 month ago |
Hi Paul,
I would like to use this sop in a TOP network, and it seemed to me that you had to post the solution somewhere. But where ?
Thanks
Edison 4 years, 11 months ago |
---------------------------------------------------------------------------------------------------------------------------------
I can't export textures by Terrain Texture Rop, and I find a error node:"sop_terrain_texture_rop / ropnet / shell"
---------------------------------------------------------------------------------------------------------------------------------
That is the information about this node:
Python error: Traceback (most recent call last):
File "", line 31, in
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.229/houdini/python2.7libs\houpythonportion\ui.py", line 850, in decorator
return func(*args, **kwargs)
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.229/houdini/python2.7libs\hou.py", line 51133, in render
return _hou.RopNode_render(*args, **kwargs)
OperationFailed: The attempted operation failed.
Error: Cook error in input: flip1.
Pol L_R 4 years, 8 months ago |
Got this error when exporting
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.416/houdini/python2.7libs\hou.py", line 11398, in cook
return _hou.Node_cook(*args, **kwargs)
OperationFailed: The attempted operation failed.
Error while cooking.
Zigmund 3 years, 4 months ago |
It seems there is a problem with the tool. When splitting to 4x2 tiles, the X and Y attributes, created by the tool, do not correspond to the actual position of the tiles.
thomas.valentin.garrel 2 years, 11 months ago |
Hi thanks for this, it's really helfull.
But i have an error when i want export
Error running callback:
Traceback (most recent call last):
File "gamedev::Sop/sop_terrain_segment_rop/parm", line 1, in <module>
File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.383/houdini/python3.7libs\hou.py", line 16462, in cook
return _hou.Node_cook(self, *args, **kwargs)
hou.OperationFailed: The attempted operation failed.
Error while cooking.
How can i fix that ?
Didier Muanza 2 years, 7 months ago |
hey there,
I m using terrain ROP , but whenever i bring the geometry to substance , ther displacment break as if each pieces where differents geometry do you know how to fix it?
Please log in to leave a comment.