Basic questions about H15 texture baking tools

   6150   6   3
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
I find the documentation for the baketexture rop (Houdini 15) a bit lacking in detail. Here's a few things that I am curious about:

1. How do I use the baketexture shader? - Currently I use the baketexture ROP and it seems to work - At least for a Displacement map bake.
It seems to work without the baketexture shader. What's the intend here? What's the right way to set things up?

2. Can I use a cage for shooting the rays?

3. Can I change some kind of tolerance so high-res geometry that intersects with low-res geometry gets fully rendered?
Or does the low-res baking object always have to be smaller than the high-res?
- Note: It would be very bad if the low-res has to always be smaller than the high-res, because usually the goal is to minimize the difference in mesh(-size) between the two and simply inflating the high-res before the bake won't work properly for complex meshes.
- Note 2: Assuming that there is currently no such tolerance value: I saw that the baking process can determine areas where the high-res falls below the low-res. That information could drive where the tolerance is applied for a perfect result. The only way that would break is if the high-res had a hole in the area or was outside the ray-cage. In any case, it seems like a better result could be achieved without much effort.

4. Can I bake out a point/primitive/vertex attribute (like color, or curvature) with the new baking tools? (If not, what is the simplest alternative?)
Edited by - Dec. 3, 2015 16:49:22
User Avatar
Member
110 posts
Joined: May 2015
Offline
Hi Dimitri,

Thanks for your input on the baking setup. In answer to your questions:

1. The Bake Shader is only there to offer output for common baking tasks (eg. displacement, normal maps, occlusion). You are free to bake out any shader, which you've noticed. In general, if you're baking geometry between low-res and high-res objects then you probably want to use the Bake Shader.

2. We do not support a separate “cage” object for the trace, but you can do this by creating a copy of your low-res object and modeling the shape to better fit your high-res object. As long as the UVs match with your low-res object the bake will be fine.

3. Yes, when rendering between low-res and high-res objects the trace looks in both directions along the normal. Your low-res object does not need to be smaller than the high-res. There is also a maximum distance used to limit the distance of the trace. For holes we have an alpha output plane that shades as white for rays that miss the high-res object. This lets you trace from simple to complex geometry (eg. a low-res plane to a detailed fence with holes).

4. We do not have baking at the primitive level yet, but you could output the sampled attribute from a shader and bake that. You can sample the resulting texture at the UV coordinates and set your primitive attribute with the result. Would you find it useful in your work to have primitive attribute baking (ie. per-point)?

Hopefully this answers your questions, but if not please let us know.

~M
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
Thank you! Much appreciated!

To 1.: I am not quite sure I get this right. I get the following idea:
I activate “Bake Shader” on the bake texture rop, but I do not have to manually assign a Bake Shader as the shader for the low-res (or high-res) mesh, right? - The existance of the bake shader is the confusing bit, to me. I guess it exists for learning purposes and because the bake texture rop somehow uses it internally, right?

To 2.: I have not thought of it that way. It makes perfect sense for the procedural work-flow with Houdini.
I wonder about two things, though:
- No cage means that there is no visually obvious way to adjust max ray height depending on an area.
- My knowledge of this stuff is limited, but as far as I understand adjusting the lowres bake mesh could potentially lead to problems with angle-sensitive bakes.

To 4.: For now, I am interested in baking out point or primitive color for use in texture creation and or as masks. Similarly I considered baking curvature (for the same purposes).
Overall, it seemed intuitively useful in Houdini to be able to bake an arbitrary attribute. You could do all kinds of processing on a custom attribute during procedural geometry creation and turn that into a useful mask or base color or whatever. And if if you can do that for various attribtues at the same time, you can automate processes easily.
As far as I understand, the VEX Variable Image plane basically does that in a shader context. It seems like a great convinience to have the same system for baking primitive attributes to image planes.
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
On an important side note:
Could it be that the “Additional Pixels at Border” parameter is broken? On H15.0.313 Indie and H15.0.311 Indie I don't get any visible border expansion on any of my texture bake rop bakes. (UDIM Post Process is set to Border Expansion and UV Unwrapping method is UDIM).
User Avatar
Member
476 posts
Joined: Aug. 2014
Offline
DASD
On an important side note:
Could it be that the “Additional Pixels at Border” parameter is broken? On H15.0.313 Indie and H15.0.311 Indie I don't get any visible border expansion on any of my texture bake rop bakes. (UDIM Post Process is set to Border Expansion and UV Unwrapping method is UDIM).
I've noticed the same problem (15.0.244.16).
User Avatar
Member
48 posts
Joined: Feb. 2013
Offline
the border expansion works when you render to disk, it doesn't show up in mplay.
User Avatar
Member
453 posts
Joined: Feb. 2013
Offline
@omgeric: Great catch! Thanks!
  • Quick Links