Crowds in Solaris/Lops/USD

   5964   15   2
User Avatar
Member
59 posts
Joined: 10月 2010
Offline
Hi geniuses,

I want to start a discussion on rendering Crowds using the Solaris/Lops/USD thing.

I know a small amount about Crowds in Houdini and a bit less about Houdini ways and means (all the 99 different syntax styles, etc).
I know even less about Solaris/Lops/USD (I don't even know what to call it) but I can see it probably is a good idea to get to know it a bit.

I have a crowd setup with some flag-waving agents.

1. I want to know how to get a Crowd sim into Solaris/Lops/USD
2. I want to know how to render the agents with texture variations on their clothing.
3. I want to know how to render the flag, which is a vellumUnpack thing on an Agent Layer, with texture variations.
4. I want to be able to vary skin tone on the agent's body shader, using, I'm guessing, a Color Correct node or something similar, but driven by an attribute on the Agent.
I do have working methods to get all of these working in Mantra, so it should be possible to get this done in Solaris/Lops/USD

Now, I know it's asking a lot to get workflows on all this, but I am stuck on step 1.
I have got a SopImport node pointing to my Crowd cache, but then what? There is so much new terminology in Solaris/Lops/USD I have no idea where to look. I haven't found any workflow help on this particular subject and I am not a lookdev/rendering person, so 99% of the jargon is lost on me (it's VERY confusing, SideFX guys)

Houdini is a cruel mistress at the best of times, but trying to figure out something nobody else seems to have done before is very hard indeed, especially for me, a non-genius.

Any help at all would be greatly appreciated.

Dan
Edited by dansidi - 2020年6月29日 08:52:52
User Avatar
スタッフ
4523 posts
Joined: 7月 2005
Offline
This is a great idea!

dansidi
I have got a SopImport node pointing to my Crowd cache, but then what?

So let's start with step 1… With the SOP Import, are you not getting your crowd showing up in LOPs? What is going wrong? What jargon is confusing you at this point? Maybe if you posted a hip file we can see the problems you're having and work through them step by step, with everybody looking at the same hip file, and seeing the same solutions…
User Avatar
Member
59 posts
Joined: 10月 2010
Offline
Hi MTucker (is it Mike?)

I've got a little HIP file I am happy to share.
It uses a model and animation clip from Mixamo, so no harm showing this.
Just a few texture files included: two variations for clothing and two for flags, which I'd like to choose using an attribute, somehow.
It would be really great to be able to choose a texture for the flags post-sim. I'm certain that this sort of thing can be done, but how?

So, step 1. I have used the SOPimport node to bring the cached crowd sim into Solaris/Lops/USD.
How do I assign textures to various bits of the crowd?

In the AssignMaterial LOP node, the Primitives parameter shows:

`lopinputprims('.', 0)`

which is mysterious. I would guess it means something like: ‘get the first primitive from the node plugged into this node’.
I do not know what any of the other items in the drop-down list mean either. I have tried them all, of course, but none seem to choose the bits of geometry. I suppose that's because the Crowd Sim is Packed Primitives and I don't know what to click in Solaris/Lops/USD to get them to work. I have tried the ‘Packed USD Primitive’ and the ‘Packed Primitives’ check boxes in the SOPimport node, but they don't seem to do anything at all.

Can we, in the first instance, work towards getting the diffrent bits of geometry (body, shirt, pants, etc) to find a random shader? That would be a start!

Many thanks for your patience
Edited by dansidi - 2020年6月29日 13:36:12

Attachments:
solarisCrowd_v001.50.bgeo.sc (46.4 KB)
solarisCrowd_render_v001.hiplc (663.6 KB)
Ch01_1001_Diffuse_small_01.png (283.2 KB)
Ch01_1001_Diffuse_small_02.png (288.1 KB)
liverpoolFlag_01.png (118.7 KB)
ManchesterCityFlag_01.png (168.1 KB)

User Avatar
Member
59 posts
Joined: 10月 2010
Offline
I should also say that I get these a lot:




I assume it's because I'm clicking around the interface like an idiot, trying things here, there and everywhere.

The result means I cannot load my file again, nor any of the .bak files. I have to start over!

Er.. I apologise if my hip file is not working on your machine.
Edited by dansidi - 2020年6月29日 12:19:38

Attachments:
Annotation 2020-06-29 170209.png (19.9 KB)

User Avatar
スタッフ
4523 posts
Joined: 7月 2005
Offline
Hey @dansidi, the “m” is for Mark.

You only sent one frame of animation, which is probably okay… I just had to advance to frame 50 to load it. But even then it produces the following error trying to load the .bgeo.sc file:

Unable to read file “F:/hips/f74407/solarisCrowd_v001.50.bgeo.sc”.
Warning: could not load rig. The following paths were searched:
$HIP/agents/BrianFlag/BrianFlag_rig.rig
V:/projects/StadiumCrowd/Houdini/StadiumCrowd/agents/BrianFlag/BrianFlag_rig.rig
(near byte offset 119156, line 1, column 119157)
Backend IO

Can you share that .rig file too? And maybe any other .rig files used by the .bgeo.sc file? And if there is any way you can change the .bgeo.sc file so that it points to the .rig file as a relative path like “./Brian_Flag_rig.rig” (instead of saving the full path, which will only work on your machine), that will save a lot of effort for anyone trying to follow along.

Fatal errors are bad… Hopefully if I can get this file loaded I'll be able to reproduce the crashes and get some of them fixed.

Thanks,
Mark
User Avatar
Member
59 posts
Joined: 10月 2010
Offline
Thanks Mark,

I didn't think you would need the agent rig, as the crowd sim was cached. Guess I was wrong.

I am enclosing a compressed file containing the complete Agent rig. Place it in a folder called “agents” in the Houdini project you are currently using.
There is probably a better way to encapsulate a Houdini project (HDA or something?) but I am not familiar with it.
Please forgive my clumsiness with this software.

I have also made some progress getting materials onto Crowd agents, but it is very far off from working.
Basically it's not clear how to select ‘Primitives’ of individual agents of a Crowd sim in Solaris/Lops/USD.

Wildcards do not seem to work and setting shader assignment for individual Agents is just not going to work for a large crowd.
Please tell me how it is done!

I thought Solaris/Lops/USD would take away some of the pain of Stylesheets, but in truth it's a lot worse! (until you know how to use it, of course)

Many thanks for your help

Dan
Edited by dansidi - 2020年6月29日 17:00:52

Attachments:
BrianFlag.rar (1.2 MB)
solarisCrowd_render_v003.hiplc (854.1 KB)

User Avatar
スタッフ
4523 posts
Joined: 7月 2005
Offline
Now the filecache node in the new hip file is referring to a .bgeo.sc file that you didn't provide (version 2 of your simulation?)
User Avatar
Member
59 posts
Joined: 10月 2010
Offline
This is going really well.
I hope everyone is able to keep up…

Here is the cache file.

Attachments:
solarisCrowd_render_v002.50.bgeo.sc (46.9 KB)

User Avatar
Member
59 posts
Joined: 10月 2010
Offline
Looking in the help docs at the SOPimport LOP

It says this:




Is that something? What does it mean?
How does it apply to a Crowd sim?
I can't see anywhere on the SOPimport LOP where it says ‘usdinstancerpath’
so, is this a custom attribute you have to create somewhere?
It's not clear at all (to me)
Edited by dansidi - 2020年6月30日 01:47:41

Attachments:
Annotation 2020-06-30 064425.png (23.7 KB)

User Avatar
Member
8041 posts
Joined: 9月 2011
Offline
dansidi
Is that something? What does it mean?
How does it apply to a Crowd sim?
I can't see anywhere on the SOPimport LOP where it says ‘usdinstancerpath’
so, is this a custom attribute you have to create somewhere?
It's not clear at all (to me)

instancerpath is for point instancers–used for copying geometry to particles for example. Sop import can translate packed geometries to point instancers, optinally. I don't think it's applicable to crowd packed agent prims, which are a different kind of packed primitive. They should be translated to native usdskel characters, unless I'm misunderstanding your premise.
User Avatar
Member
59 posts
Joined: 10月 2010
Offline
Thanks for your input, jsmack.

I want to assign random textures to my Crowd Agent's flags


I have some packed flag geometry with a primitive attribute called ‘flagType’
I have imported that geometry using SOPimport LOP
The ‘flagType’ attribute has been converted to ‘primvars:flagType’

Now I want to assign a random file texture to the material attached to the geometry, using the flagType attribute to choose which texture to use. With me so far?

I'm guessing that using the editMaterial LOP is the way to go.

Here is the LOP network




And here is the VOP network inside the editMaterial LOP




It's not working, what have I missed?
Edited by dansidi - 2020年6月30日 05:37:18

Attachments:
Annotation 2020-06-30 102929.png (55.2 KB)
Annotation 2020-06-30 103041.png (153.5 KB)

User Avatar
Member
59 posts
Joined: 10月 2010
Offline
Or perhaps the materialVariation LOP is better for assigning random textures.

Something like this?




Which is, of course, not working.

Please can somebody help me: what is the correct workflow for assigning random textures on a shader, driven by a attribute on the geometry?
Edited by dansidi - 2020年6月30日 09:39:08

Attachments:
Annotation 2020-06-30 113600.png (62.8 KB)

User Avatar
Member
59 posts
Joined: 10月 2010
Offline
OK, I've tried everything I can find/think of.

I'm going with ‘not possible at the moment due to user limitations’

Back to Mantra…

Thanks for attempting to help me, guys.
Edited by dansidi - 2020年6月30日 09:51:19
User Avatar
スタッフ
4523 posts
Joined: 7月 2005
Offline
That last file was enough to make the hip file load and run and show some crowd agents. I changed the trouser and shirt materials to show solid colors instead of textures (because I don't have your texture files). Then I changed the vary material assignment node to affect both crowd agents, and choose between the trouser and shirt materials to be assigned to the trousers of each agent. This seems to work, although there are update issues with Houdini GL if you change the seed to re-randomize the assignments (already fixed for 18.5 FWIW).

In the specific case of the flags, you need to either use a path attribute at the SOP level to split the flag into multiple meshes, or you need to create groups at the SOP level, and import those groups as Geometry Subsets in the SOP Import LOP so that you can assign materials to each flag separately.

All that to say you were pretty close… The update failures I'm sure were a major impediment, though karma may do a better job of handling the updates…

I'm attaching a zip file with all files in the right places, and some paths updated in the hip file to refer to $HIP and make sure all the bits and pieces work together without needing to access anything outside the zip file. I hope you don't mind me re-posting your stuff - it's nothing you didn't already post, I just moved some files around…

Attachments:
f74407.zip (2.7 MB)

User Avatar
Member
59 posts
Joined: 10月 2010
Offline
Hi Mark,

Thanks very much for your message.

Yes, the GL update issue is annoying.
Yes, the constant crashing when changing to the renderer from GL is very annoying.
Yes, there are gaps in the documentation regarding what I am attempting to do.
Yes, Houdini Crowd people are few and far between, so there is not that much specific help on this forum for us.
I usually get “I don't know about Crowds, but try this thing that works for RBDs” Of course it never works for crowds.

So thank you for taking time to try and answer my questions. I will have to go back into Solaris/Lops/USD and try it now.

Dan
Edited by dansidi - 2020年6月30日 14:04:05
User Avatar
スタッフ
4523 posts
Joined: 7月 2005
Offline
And thank you for your patience

There's defeinitely a lot of new stuff hitting you all at once here. But I sincerely believe the end result will be easier to use than mantra with style sheets, once we get the kinks worked out…

If you are familiar with style sheets, you should also look at the Assign Material LOP. It can be a bit overwhelming, but it actually provides a lot of stylesheet-like functionality where you can use CVEX to create material parameter overrides, which are used to automatically create new materials with those parameter values, and assign the materials to the geometry all in one node.
  • Quick Links