Build a book case in houdini
16546 27 3-
- AdamT
- Member
- 184 posts
- Joined: June 2010
- Offline
-
- Elias Ericsson Rydberg
- Member
- 41 posts
- Joined: April 2013
- Offline
It would indeed be nice to have the COP output unlimited. The workaround is still valid as it could be repurposed as a proxy resolution switch. I would very much like to access that parameter, if it is set to 1/2 I would like an xform to be 2/1 to compensate.
Anyway, here is the latest rendition!
PS. Notice how the books appear shaded when there is no poly cusp, great for distant shots I would imagine. DS.
PPS. I realize that applying textures with the UVQuickshade Op might not be the best idea. What's best practice when assigning textures in Houdini? I have not found any good answer in the training videos yet. DDS.
Anyway, here is the latest rendition!
PS. Notice how the books appear shaded when there is no poly cusp, great for distant shots I would imagine. DS.
PPS. I realize that applying textures with the UVQuickshade Op might not be the best idea. What's best practice when assigning textures in Houdini? I have not found any good answer in the training videos yet. DDS.
-
- AdamT
- Member
- 184 posts
- Joined: June 2010
- Offline
In your case it may be preferable stick a SHOP network inside your book otl and drop a material shader in there, and replace the UVQuickshade node with a Material node (put this after a convert to polys and group the primitives to shade first) pointing to the shader in the SHOP.
I've attached a clean example as I couldn't actually get it to work in your scene - I'm not sure why…it's fine specifying the texture in the SHOP directly, but just ignores the material overrides.
I've attached a clean example as I couldn't actually get it to work in your scene - I'm not sure why…it's fine specifying the texture in the SHOP directly, but just ignores the material overrides.
-
- Elias Ericsson Rydberg
- Member
- 41 posts
- Joined: April 2013
- Offline
In my scene I have a material assignment on the scene level. I'd like for the shader to pick up the texture information for each book. I expected it to work as it works with color. I attached a quick example.
Embedding a material in the HDA would mean that the user would have to tweak a shader on each book, which would be time consuming.
Looking at the UVQuickShade I realise that it adds a SHOP definition that currently overrides any material applied higher up in the hierarchy. Makes sense to me. In some way I need to add textures as an attribute instead, and have the shader pick up that attribute. But how, I wonder?
One thing seems to be clear, the UVQuickShade need to go!
Embedding a material in the HDA would mean that the user would have to tweak a shader on each book, which would be time consuming.

Looking at the UVQuickShade I realise that it adds a SHOP definition that currently overrides any material applied higher up in the hierarchy. Makes sense to me. In some way I need to add textures as an attribute instead, and have the shader pick up that attribute. But how, I wonder?
One thing seems to be clear, the UVQuickShade need to go!
-
- AdamT
- Member
- 184 posts
- Joined: June 2010
- Offline
You can put your Material SOP inside the book otl, and just have it reference the SHOP at the scene level. The Material can point to the texture cache the same way as UVQuickShade is doing - no need to store the textures as attributes (though you could probably do this as a Detail attribute if you really want to).
The important concept here is that the SHOP's shader gets it's instructions from the Material SOPs, which tells it what properties to use (including the texture map).
You can also make use of this link by overriding additional shader properties - i.e. if you wanted a glossy specular map on the brown book with the filigree floral decals, you could derive a spec map from the diffuse and use that override the Specular Map in the Materials property. You can still have the “one SHOP for all books”, but extendable for individual touches.
The important concept here is that the SHOP's shader gets it's instructions from the Material SOPs, which tells it what properties to use (including the texture map).
You can also make use of this link by overriding additional shader properties - i.e. if you wanted a glossy specular map on the brown book with the filigree floral decals, you could derive a spec map from the diffuse and use that override the Specular Map in the Materials property. You can still have the “one SHOP for all books”, but extendable for individual touches.
-
- Elias Ericsson Rydberg
- Member
- 41 posts
- Joined: April 2013
- Offline
Yeah the plan is to have one SHOP to rule them all and have the OTLs provide texture information, as you say, possibly other maps as well. I gotta investigate if it's possible to load a multi channel exr as a texture. The cropping would be the same on all channels anyway. Also gotta check what channels .rat files can store. Other than that I thought to maybe just let the user paint detail attributes such as roughness, specular angle etc. to add more variation in a directable fashion.
At the moment scene level SHOPs automatically get it's baseColorMap attribute overridden with the texture path to the correct texture. Although, when I combine books together I get material_override, material_override, material_override… as detail attributes. And the shader only picks up the 0th element in that list. Needs to be sorted out.
Cheers,
Elias
At the moment scene level SHOPs automatically get it's baseColorMap attribute overridden with the texture path to the correct texture. Although, when I combine books together I get material_override, material_override, material_override… as detail attributes. And the shader only picks up the 0th element in that list. Needs to be sorted out.
Cheers,
Elias
-
- Elias Ericsson Rydberg
- Member
- 41 posts
- Joined: April 2013
- Offline
johnnycore
Ofcourse there are many ways to do this in Houdini.
What I would do is first measure what the total width of your of your shelf, and somehow place a line in there.
Then you can measure your first prop's width and carve that section out from the curve using the carve sop resample that piece so theres 3 points, and then remove point 0 and 2 that should give you a single point which hold the location of your first prop.
Repeat this step for the next prop, you can repeat all of this using a switch for multiple objects and a foreach SOP to do the line carving and such..
Do you think you could post a file showing how to do this? I have not been able to do it. I like this approach as it takes both the size of the shelf and the books into account.
Cheers,
Elias
-
- Elias Ericsson Rydberg
- Member
- 41 posts
- Joined: April 2013
- Offline
This what I've got so far. I have not yet managed to carve the curve in an iterative way yet. What I want is to repeat a carve on a curve, and have different amounts of carve each loop. The amount of carve is of course dependent on the bounds of the book being processed.
Posted an example file to show.
Edit: I found a different way to do it. Out of curiousity, is it possible to make a HDA with multi inputs? Such as the switch and merge SOPs have.
Best,
Elias
Posted an example file to show.
Edit: I found a different way to do it. Out of curiousity, is it possible to make a HDA with multi inputs? Such as the switch and merge SOPs have.
Best,
Elias
-
- Quick Links

