Just a way to work as if you have a render view, instead of in the viewport.
In Stage, make a Clone Control Panel tab (where your parameters are)
click the Clones with a arrow button, make a new Local one, select Karma CPU or GPU..
Drag your karma render settings node onto the "Node".
Now
you can toggle a render on and off in a Render Gallery window & it
will save a snapshot each time (might be good or bad....).
Thursday, 8 October 2026
rendering with karma/solaris in a more "normal way"
Tuesday, 9 June 2026
refracting aovs in karma
make a custom attribute, i've called it poso2, i'm hijacking the Position value for this & fitting it between 0 and 1.
in karma, use the geompropvalue to load it in to the shader. here i use a mtlxdot because apparently it doesn't change the value of the attribute (?). i plug it into a karma aov thing and name it "poso", using the $OS. Here i'm using the float value to drive a colour ramp.
The source name is :
C<TG>.*L
and Source Type is LPE.
Tuesday, 12 May 2026
usd look publishing reminder
when publishing usd look (with AYON, at least), double check the "materials" folder path. It needs to be sat under the main asset. Eg. if the main asset is /f1, the materials need to be located in /f1/materials.
equally, the geo should be under /f1/geo/
Thursday, 7 May 2026
rename, string substitution, replace in every occurence.
This is for replacing *EVERY* occurence of a string. Eg. SOMEONE has manually selected objects to assign materials to and you don't want to change every single instance of the object path!! This will go through your entire houdini script and change it
use this to string subsitute/replace. make a tool - right click on the shelf and select new tool.
Paste this code into the "code" tab and click create.
import hou
contexts = ["/obj","/mat","/stage"]
def changeParms(node, search, replace):
string_parms = [p for p in node.parms() if p.parmTemplate().type() == hou.parmTemplateType.String]
for parm in string_parms:
if (search in parm.eval()):
newValue = parm.rawValue().replace(search, replace)
parm.set(newValue)
input = hou.ui.readMultiInput("Tell me what to look for: ", ("search","replace"), buttons=('OK',"Cancel"), default_choice=0, close_choice=1, title="Replace Files")
if (input[0] == 0):
search = input[1][0]
replace = input[1][1]
for rootNode in contexts:
for node in hou.node(rootNode).allSubChildren():
changeParms(node, search, replace)
Tuesday, 14 April 2026
geometry and material variants, instancing in solaris
Variant workflow. Use the Component builder + Geo Variants to build some variants. You'll use the Component Material node to create the mat variants, then packaged them out with the component output. Bake this as a USD.
Load your cached out USD. Attach an "explore variants" node and set the mode to explore. Set spacing to zero so they're all at the origin.
Then plug it into an Instancer. Specify the primitives you want to prototype (use in instancer). Make sure you UNTICK "Only Copy Specified Prototype Primitives". The rest is as normal (eg make some points inside the instancer and give it an index attribute).
Now all of your variants are in play.
This seems a bit longwinded, but I guess it does work and fits within a pipeline a bit nicer? It also works nicely with the variant systems that exist in Houdini/Solaris.
BONUS - if instead of using the Instancer in "Point Instancer" mode, you use "Instanceable Reference", you gain access to each and every instance. If you do this, you can actually use the Set Variant nodes to change particular instances, eg. you switch one of them to be a pig and make it red instead of green. Performance does take quite a big hit if you do this though.
Friday, 10 April 2026
how to match geo based on path attribute and delete non matching (or keep) primitives
This is quite a specific script.. I got chatgpt to make them for me!
TWO SCRIPTS - they compare input 0 and 1's path attritbutes. Firstly, they strip away (deleting) the primitives that don't match.
Use case- you have two mostly identical alembic files of a house. One has UVs you want to transfer to another, but maybe one has some excess geo that you haven't processed yet, or forgot to delete. This will get the two alembics having the same geo (based on path attributes!), so you could do a clean transfer.
// Get this primitive's path
string my_path = prim(0, "path", @primnum);
// Flag to track match
int match_found = 0;
// Loop over all primitives in input 1
int nprims1 = nprimitives(1);
for (int i = 0; i < nprims1; i++)
{
string other_path = prim(1, "path", i);
if (my_path == other_path)
{
match_found = 1;
break;
}
}
// Remove primitive if no match
if (!match_found)
{
removeprim(0, @primnum, 1); // 1 = delete associated points if unused
}
AND THE REVERSE - KEEPING ONLY THE NON MATCHING STUFF, so you can merge that back into the matching stuff after transferring UVs or whatever.
// Get this primitive's path
string my_path = prim(0, "path", @primnum);
// Flag to track match
int match_found = 0;
// Loop over all primitives in input 1
int nprims1 = nprimitives(1);
for (int i = 0; i < nprims1; i++)
{
string other_path = prim(1, "path", i);
if (my_path == other_path)
{
match_found = 1;
break;
}
}
// Remove primitive if a match IS found (reverse logic)
if (match_found)
{
removeprim(0, @primnum, 1);
}
replacing strings
can't remember if i've written about the "Replace" function. Replacing a given string with nothing, eg "" is a *another* way to remove parts of an existing string!
string tempo=s@path;
tempo=replace(tempo, "/ppHeroBuilding_forTexture/","");
@path=tempo;