Cyril Costa
c0y
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Solaris Crowd import, agent definitions issue Jan. 2, 2024, 10:47 a.m.
I finally found a solution to fix the problem.
I started to check with python each agent definition, which returns me always the same path (with hou.AgentDefinition.shapeLibrary(), and .rig()), but it seems that internally something went wrong while switching to Solaris (this is why I got buggy agent definition in the scene tree).
So what I did is :
- looping through each agentname, and re-apply the same agent definition in python using my agent source.
The code i'm using is :
Now, the import in Solaris is proper and clean.
Hope this will help
I started to check with python each agent definition, which returns me always the same path (with hou.AgentDefinition.shapeLibrary(), and .rig()), but it seems that internally something went wrong while switching to Solaris (this is why I got buggy agent definition in the scene tree).
So what I did is :
- looping through each agentname, and re-apply the same agent definition in python using my agent source.
The code i'm using is :
node = hou.pwd() input1 = node.inputs()[1] ref_agent_geo = input1.geometry() current_geo = node.geometry() ref_agent_def = ref_agent_geo.prims()[0].definition() ref_agent_def = ref_agent_def.freeze() #print(ref_agent_def) for agent in current_geo.prims(): agent_def = agent.definition() new_def = agent.setDefinition(ref_agent_def)
Now, the import in Solaris is proper and clean.
Hope this will help
Solaris Crowd import, agent definitions issue Dec. 27, 2023, 11:37 a.m.
Hello everyone,
I'm working on crowds right now.
I've noticed an issue when importing crowd simulation from "/obj/" context to Solaris.
The crowd sop import node and the sopimport node give me the same result.
Sometimes, when we do post-process on crowd simulation (splitting parts of the crowd, doing some stuff, retiming part of it), when we merge back the entire crowd, I have problems with agent definition into Solaris.
I have kind of broken definitions and duplicates definitions, and I don't know how to fix this, except by splitting all the parts and merge them with multiple sopimport.
For example :
here is a standard behavior when importing a crowd from OBJ context
-> As you can see, the agentdefinition has been imported properly : one single agent definition for all agents
here is what I get when I try to split / For Loop / Timeshift parts of the simulated crowd, and merge back everything :
-> I have in the agentdefinitions, several definitions.
The result of this, is that all rendering are incorrect : some agents are not properly loaded, and don't appear.
I was wondering if someone already have this issue, and how to fix this.
By the way, I've tried to read in python the agent primitive shapeLibrary, to see if something went wrong, but they all have the same path. But in solaris... it create lots of definition...
Maybe there's a trick to clean up definition before importing in Solaris.
On last thing : as soon as I do Timeshift node on part of my simulated crowd and merge it back, this issue appear... I don't have solution for this.
Info : I'm on Houdini 19.5.493.
Thank you all and best wishes !
I'm working on crowds right now.
I've noticed an issue when importing crowd simulation from "/obj/" context to Solaris.
The crowd sop import node and the sopimport node give me the same result.
Sometimes, when we do post-process on crowd simulation (splitting parts of the crowd, doing some stuff, retiming part of it), when we merge back the entire crowd, I have problems with agent definition into Solaris.
I have kind of broken definitions and duplicates definitions, and I don't know how to fix this, except by splitting all the parts and merge them with multiple sopimport.
For example :
here is a standard behavior when importing a crowd from OBJ context
-> As you can see, the agentdefinition has been imported properly : one single agent definition for all agents
here is what I get when I try to split / For Loop / Timeshift parts of the simulated crowd, and merge back everything :
-> I have in the agentdefinitions, several definitions.
The result of this, is that all rendering are incorrect : some agents are not properly loaded, and don't appear.
I was wondering if someone already have this issue, and how to fix this.
By the way, I've tried to read in python the agent primitive shapeLibrary, to see if something went wrong, but they all have the same path. But in solaris... it create lots of definition...
Maybe there's a trick to clean up definition before importing in Solaris.
On last thing : as soon as I do Timeshift node on part of my simulated crowd and merge it back, this issue appear... I don't have solution for this.
Info : I'm on Houdini 19.5.493.
Thank you all and best wishes !
Solaris Crowd assign Materials on geomSubset Instance proxy Sept. 7, 2023, 8:46 a.m.
Hello,
i'm currently importing crowd setup into solaris, with complex agents :
- multiples layers
- multiple materials on same mesh.
I can't separate geometry by shop_materialpath because we also use blendshape that does'nt work if I edit de geo layers.
So I generate GeomSubsets with a Geometry Subset VOP, which use the initial shop_materialpath.
Here is an example of the agent definition hierarchy
and here is the related proxy agent (all the scene is generated by the crowdsopimport node):
We need to reassign all the shaders (previously assigned on each agent in /obj/ context). But I'm stuck with the "instance proxy primitive" which is ignored.
The problem comes for materialBinding. The shaders are note inherits from the agentdefinitioncache. Material Binding is <unbound>
So, I tried multiple things :
- Creating a collection with "%reference:" expression. But the problem is that it work on "Mesh", but not on "GeomSubset".
- Adding a material assignment directly inside de geomSubset prim (/geoSubset/mtl/mat1/, for example) :
in that case, material binding is computed, but familyName token is blank, and not "materialBind". So the shader assignment does'nt work.
So how would you do to make the materialBinding work (ideally I'd like to assign a material on the agentdefinition, and all the instance would get the same referenced path - even on geomSubset)
I can't figure out how to edit values on instance proxy or make automatic inherits (or maybe edit the familyName on instance)
I saw that we can create inherit class, but I don't really know how to setup a special class based on the agentdefinition. Hierarchy is quite complexe in our case.
Thanks for help
i'm currently importing crowd setup into solaris, with complex agents :
- multiples layers
- multiple materials on same mesh.
I can't separate geometry by shop_materialpath because we also use blendshape that does'nt work if I edit de geo layers.
So I generate GeomSubsets with a Geometry Subset VOP, which use the initial shop_materialpath.
Here is an example of the agent definition hierarchy
and here is the related proxy agent (all the scene is generated by the crowdsopimport node):
We need to reassign all the shaders (previously assigned on each agent in /obj/ context). But I'm stuck with the "instance proxy primitive" which is ignored.
The problem comes for materialBinding. The shaders are note inherits from the agentdefinitioncache. Material Binding is <unbound>
So, I tried multiple things :
- Creating a collection with "%reference:" expression. But the problem is that it work on "Mesh", but not on "GeomSubset".
- Adding a material assignment directly inside de geomSubset prim (/geoSubset/mtl/mat1/, for example) :
in that case, material binding is computed, but familyName token is blank, and not "materialBind". So the shader assignment does'nt work.
So how would you do to make the materialBinding work (ideally I'd like to assign a material on the agentdefinition, and all the instance would get the same referenced path - even on geomSubset)
I can't figure out how to edit values on instance proxy or make automatic inherits (or maybe edit the familyName on instance)
I saw that we can create inherit class, but I don't really know how to setup a special class based on the agentdefinition. Hierarchy is quite complexe in our case.
Thanks for help