Ici on parlera USD
Si un attribute shop_materialpath existe deja sur l'asset on va pouvoir directement re-assigner les shader.
string shop_materialpath = usd_attrib(0, @primpath, 'primvars:shop_materialpath'); string dir, name; splitpath(shop_materialpath, dir, name); string roots = "/materials/"; string matPath = roots + name; return matPath;
- Importer les shader avec un node material librairy
- Dans le parametre Material Vop mettre par exemple: /obj/ar_scene/matnet1/*
- Dropper un assign material en Vexpression et mettre le code ci dessus.
- Le tour est joué !
Barre de droite du viewport
- Progressive rendering
- Gpu rendering Display option d -> render -> arnold
- Gpu rendering
- Minimum AA sample
Houdini/Solaris : Render layers, AOV, Cryptomattes (HTOA) - Part 01
kick -laovs -i Nul Available aovs: Type: Name: LPE: -------------------------------------------------------------- VECTOR2 motionvector (~) RGBA RGBA C.* VECTOR N (~) FLOAT Z (~) RGB direct C[DSV]L RGB indirect C[DSV][DSVOB].* VECTOR Pref (~) RGB albedo C[DSV]A RGB emission C[LO] RGB diffuse_direct C<RD>L RGB background CB RGB denoise_albedo ((C<TD>A)|(CVA)|(C<RD>A)) RGB sss_albedo C<TD>A RGB specular_albedo C<RS[^'coat''sheen']>A RGB diffuse C<RD>.* FLOAT cputime (~) RGB diffuse_indirect C<RD>[DSVOB].* RGB sss_indirect C<TD>[DSVOB].* RGB diffuse_albedo C<RD>A RGBA shadow_matte FLOAT volume_Z (~) RGB specular C<RS[^'coat''sheen']>.* RGB coat_direct C<RS'coat'>L RGB specular_direct C<RS[^'coat''sheen']>L RGB specular_indirect C<RS[^'coat''sheen']>[DSVOB].* RGB volume_direct CVL RGB coat C<RS'coat'>.* RGB coat_indirect C<RS'coat'>[DSVOB].* RGB coat_albedo C<RS'coat'>A RGB sheen C<RS'sheen'>.* RGB transmission C<TS>.* RGB transmission_direct C<TS>L RGB transmission_indirect C<TS>[DSVOB].* VECTOR2 AA_offset (~) RGB transmission_albedo C<TS>A VECTOR P (~) RGB sheen_direct C<RS'sheen'>L RGB volume CV.* RGB sheen_indirect C<RS'sheen'>[DSVOB].* NODE shader (~) RGB sheen_albedo C<RS'sheen'>A RGB sss C<TD>.* RGB sss_direct C<TD>L RGB volume_indirect CV[DSVOB].* RGB volume_albedo CVA FLOAT A (~) FLOAT ZBack (~) RGB opacity (~) RGB volume_opacity (~) FLOAT raycount (~) UINT ID (~) NODE object (~) FLOAT AA_inv_density (~) RGBA RGBA_denoise (~) -------------------------------------------------------------- (~) No opacity blending
Karma supports Cryptomatte AOVs and you create Cryptomatte IDs using the following data sources.
Primitives
Materials bound to prims
Constant or uniform string/integer PrimVars
When you generate unique IDs for each instance, you don’t need to use material stylesheets. All you need to do is assign unique values of a string PrimVar to each instance.
Pour setter des crypto custom ce referer aux screen ci dessous.
Available aovs: Type: Name: LPE: -------------------------------------------------------------- VECTOR2 motionvector (~) RGBA RGBA C.* VECTOR N (~) FLOAT Z (~) RGB diffuse C<RD>.*L RGB diffuse_albedo export_basecolor RGB diffuse_direct C<RD>L RGB diffuse_indirect C<RD>.+L RGB specular C<RG>.*[LO] RGB specular_direct C<RG>L RGB specular_indirect C<RG>.+L RGB coat C<...'coat'>.*[LO] RGB sheen ??? RGB sss C<...'sss'>.*[LO] RGBA shadow_matte shadow;C<RD>.*[LO] RGB transmission C<TG>.*[LO] RGB emission C.*O RGB volume CV.*L RGB volume_direct CVL RGB volume_indirect CV.+L RGB motionvector ray:motionvector RGB N ray:hitN RGB P ray:hitP
https://www.andreaskj.com/live-pref-in-solaris/
node = hou.pwd()
stage = node.editableStage()
from pxr import Sdf, Usd, UsdGeom
import loputils
# Get Parameters - Replace these with your own values!
primpattern = "/hydralisk/**"
sourceframe = 140
primvarname = "pRef"
# Parse Primpattern
ls = hou.LopSelectionRule()
ls.setPathPattern(primpattern + ' & %type:Mesh')
paths = ls.expandedPaths(stage=stage)
# Compute Point Reference
for prim in paths:
prim = stage.GetPrimAtPath(prim)
primvarsapi = UsdGeom.PrimvarsAPI(prim)
points = prim.GetAttribute('points')
points_values = points.Get(sourceframe)
primvar = primvarsapi.CreatePrimvar(primvarname, Sdf.ValueTypeNames.Color3fArray, UsdGeom.Tokens.vertex)
primvar.Set(points_values)
Cd = mtlxgeomcolor Autres : mtlxgeopropvalue
mtlxFrame -> mtlxConvert (float vector 3)
cocher allow shader parameter animation
Hierarchy
- Star -> solo geometry
- Manage viewport override -> sauver des etat de visualisation du scene graph tree
- Save tree expansion -> sauver des etat d'expansion du scene graph tree
Double clic sur snap shot pour ouvrir render gallery
Assigner du arnold et du karma en meme temps
- Connecter les deux shader a un collect node, le nommer
- On peu disble les output flag des deux shader de base pour pas qu'ils soient importer dans la hierarchy usd
- Assigner le shader
- Quand on switch de moteur de rendu il prend le bon shader
primitive definition -> kind authoring -> nested groups and components
import data -> [v] subset groups -> *
asset .usdc pour usd compressed file asset.usda -> ascii file -> human readable file asset.usd:SDF_FORMAT_ARGS:format=usda -> forcer un .usd a s'ecrire en ascii (human readable) -> configure -> prim def -> [v] path attributes
les groupes de couleurs autour des nodes represente les layers
- Dans le node merge -> merge style -> permet de faire d'un merge un layer
- Pour exporter une couche usd a partir d'un point donné du network.
pour prune (delete) des objet mais pas le lighting -> prune restriction = %type:Mesh
Creer une hierarchy/import des assets
- reorganiser/creer la hierarchy
layout les calques usd deja importés
- lock parameter sur les transform et rotate : pour pas quelle bouge
faire un edit cam sur la cam et lui mettre la backplate en backgroundimage
- drop un render setting -> karma -> shading -> [] enable depth of field
dropper node light , setter sur edit, mettre la light a edit dans primitive path.
render geometry settings -> visibility -> set -> Matte pour arnold ou Holdhout mode -> Matte pour Karma
Schemas are structures defined by USD to bring in data and format it properly for use in USD. This can refer to attributes that are renamed, creating the correct primitive type, or mapping attribute classes, to name a few.
- P -> points
- N -> normals
- v -> velocities
- uv -> primvars:st
- shop_materialpath -> primvars:shop_materialpath
-> scene graph details Les attributs custom sont transformés en :
- primvars:monAttributCustom
def selectPrim(selection):
print ("select")
import hou
import loputils
try:
cNode = hou.selectedNodes()
if len (cNode)==1:
loputils.selectModifiedPrims(cNode[0])
except:
print("marche Pas")
pass
hou.ui.addSelectionCallback(selectPrim)
string shop_materialpath = usd_attrib(0, @primpath, 'primvars:shop_materialpath');
string dir, name;
splitpath(shop_materialpath, dir, name);
string roots = "/materials/";
string matPath = roots + name;
return matPath;