How do I do this?
If you connect a heightfield_visualize node and color with the height ramp section…how do you export that height ramp color along with the 3 layers as a texture? Attaching a heightfield output node will only export the layers in the heightfield visualize node. Being able to export the visualization Height Ramp in an Erode node would also suffice.
Thanks!
Exporting color information from a height ramp?
6464 6 0-
- Thunderflex
- Member
- 11 posts
- Joined: Sept. 2017
- Offline
-
- Enivob
- Member
- 2658 posts
- Joined: June 2008
- Offline
-
- Thunderflex
- Member
- 11 posts
- Joined: Sept. 2017
- Offline
It does help and provided me with something for the future, but that didnt help my current issue. I'm trying to bake out the height ramp colors to turn into a terrain tint map for pre-vis. But I can't figure out how to do this. Or if there is another way to color the heightfield and bake textures out. Houdini recently provided a new sop_terrain_texture_rop node but it bakes normal, height, occlusion and cavity, but not color, which is kind of funny and also a bit frustrating!
-
- Thunderflex
- Member
- 11 posts
- Joined: Sept. 2017
- Offline
For further clarification: the route you suggested simply bakes that color information into vertex color, which can then be exported as a texture or saved into the mesh. That gives the appearance of low resolution and quality…im looking to essentially bake what is visible in the viewport to a 2d texture. In world machine, all I have to do is add a bitmap output node. I don't really understand why this is a difficult procedure in Houdini.
I have tried so far, Heightfield Output…right clicking height field visualize node and saving texture uv to image (which results to a friggin line on a white img), usung sop_terrain_texture_rop, which includes normal map, heighmap, cavity, occlusion maps (and all export great and work great) but no fricken color map!?. I've tried modifying each of these nodes Type Properties in hopes to get a color export…and i still cant get this working. It's like…really really frustrating…
I have tried so far, Heightfield Output…right clicking height field visualize node and saving texture uv to image (which results to a friggin line on a white img), usung sop_terrain_texture_rop, which includes normal map, heighmap, cavity, occlusion maps (and all export great and work great) but no fricken color map!?. I've tried modifying each of these nodes Type Properties in hopes to get a color export…and i still cant get this working. It's like…really really frustrating…
-
- Thunderflex
- Member
- 11 posts
- Joined: Sept. 2017
- Offline
Don't worry everyone, I figured it out. I was able to copy the ramp parameters from the height ramp in the erosion visualization or visualize node, and paste it into a lookup node in a cop network and export from the lookup node.
I later added this network to the sop_terrain_texture_rop in a new render plane so I can use the convenient export button. This part required a little Python and learning how Type Properties work, which fortunately through hours of frustration, now I can tile my texture and use a convenient export button.
One thing I think is odd though is that I cant export using the export button from the sop terrain texture rop if I use a sopimport. It only seems to work if I use a file node, so I have to save the texture from the lookup node first, then reimport that file into a file node, THEN run the export button in the texture rop. It would be cool if whatever is imported via the SOPimport was cached in a temp file somewhere that way I don't have to export a texture and reimport manually. If Anyone knows how to do that, thatd be super useful!
I later added this network to the sop_terrain_texture_rop in a new render plane so I can use the convenient export button. This part required a little Python and learning how Type Properties work, which fortunately through hours of frustration, now I can tile my texture and use a convenient export button.
One thing I think is odd though is that I cant export using the export button from the sop terrain texture rop if I use a sopimport. It only seems to work if I use a file node, so I have to save the texture from the lookup node first, then reimport that file into a file node, THEN run the export button in the texture rop. It would be cool if whatever is imported via the SOPimport was cached in a temp file somewhere that way I don't have to export a texture and reimport manually. If Anyone knows how to do that, thatd be super useful!
-
- iamjerim
- Member
- 1 posts
- Joined: Dec. 2017
- Offline
-
- swadeart
- Member
- 1 posts
- Joined: Oct. 2021
- Offline
Coming into this thread years later I did come up with another way if what you want is an output "ramp" image that represents your various color ramps in houdini. But be warned, it's a hack and Thunderflex's method sounds superior...but I don't know cop networks, so here we are.
Basically you create a linear piece of geometry that represents your ramp spatially. This might be simple linear (left to right) gradient applied to a new heightfield. The resolution of your heightfield really only needs to match the desired resolution of your ramp texture.
You then use this ramp as an input for your HeightField Visualize and change the Min/Max elevation to fit the new range (0-1, or 0-100 etc).
Now you do a heightfield convert and make sure to bake that color to your mesh. Because your mesh has as many points as you want final pixels this should mean you don't lose any interpolated data. Now you just need to bake this to a texture which can be done in houdini or you can export the mesh into other applications if that's easier to bake vertex color to texture.
The caveats are that it's pretty easy to run afoul of color space issues this way. And if you have multiple layers you'd need to do this for each one.
Basically you create a linear piece of geometry that represents your ramp spatially. This might be simple linear (left to right) gradient applied to a new heightfield. The resolution of your heightfield really only needs to match the desired resolution of your ramp texture.
You then use this ramp as an input for your HeightField Visualize and change the Min/Max elevation to fit the new range (0-1, or 0-100 etc).
Now you do a heightfield convert and make sure to bake that color to your mesh. Because your mesh has as many points as you want final pixels this should mean you don't lose any interpolated data. Now you just need to bake this to a texture which can be done in houdini or you can export the mesh into other applications if that's easier to bake vertex color to texture.
The caveats are that it's pretty easy to run afoul of color space issues this way. And if you have multiple layers you'd need to do this for each one.
-
- Quick Links


