Jump to content

Adding Custom Agent To Crowds?


Atom

Recommended Posts

I am still trying to get Zoki's file to do anything.

 

Zoki says I have to "set the project".

 

Can someone explain what is meant by that statement?

 

I have downloaded the bluewaitStreet.hip file and located the Reload button but I still get nodes in an error state because they are referencing rigs that are external to the posted file. "failed to open ...agents/blue/blue_rig.rig"

 

How do we work with crowd systems?

Is there a way to make a self contained file, like Blender can, inside of Houdini that contains all the essential assets?

 

Am I expected to know how to make some default rig to use the above example?

 

A clear working example for noobs would be great to see posted.

 

Should I be concerned about the warnings in the message box? Are these warnings the reason why the posted HIP file does not work for me?

post-12295-0-48080600-1425906679_thumb.j

Edited by Atom
Link to comment
Share on other sites

Agent data is saved by default to $HIP/agents. If you're using someone else's file, most likely you'll be missing it as it's not part of the hip file. Easiest way to rebuild it, is to save hip file in your preferred location and click Render on the ROP network 'agent_bake' in this case(this will write out the needed files). You'll have to click 'Reload' on any crowdsource SOPs so they pick up the saved files.

 

For general setup ideas take a look at the 'examples' on the Crowd shelf. Also, if you click 'Simulate' without giving it any crowdsource objects if will create a default setup for you with some agents walking around (using existing assets that come with Houdini). Help also has a lot of useful info (http://127.0.0.1:48626/crowds/)

 

*Houdini Quickstart tutorials (nice 2-3min short videos to get you up to speed quickly)

http://www.sidefx.com/index.php?option=com_content&task=blogcategory&id=253&Itemid=408

 

I am still trying to get Zoki's file to do anything.

 

Zoki says I have to "set the project".

 

Can someone explain what is meant by that statement?

 

I have downloaded the bluewaitStreet.hip file and located the Reload button but I still get nodes in an error state because they are referencing rigs that are external to the posted file. "failed to open ...agents/blue/blue_rig.rig"

 

How do we work with crowd systems?

Is there a way to make a self contained file, like Blender can, inside of Houdini that contains all the essential assets?

 

Am I expected to know how to make some default rig to use the above example?

 

A clear working example for noobs would be great to see posted.

 

Should I be concerned about the warnings in the message box? Are these warnings the reason why the posted HIP file does not work for me?

Edited by AdamJ
Link to comment
Share on other sites

Has someone tryied to use custom attributes, like custom "state" attribute, to vary agent´s start clip? It´s seams broken, I can´t get to work, even with the default agent.

In the help, the attribute is "currentstate" (the crowd source uses "state" attr), but it doesn´t seam to work too...

Link to comment
Share on other sites

You should be able to override the 'state' attribute (string) either through the randomize option or just plugging in a wrangle after the crowdsource SOP (before the OUT null) and doing

if (@ptnum%2==0){
    s@state = "run";
}
else {
    s@state = "walk";
}

I'll update docs as they're out of date (attribute names changed a few times :)

 

Has someone tryied to use custom attributes, like custom "state" attribute, to vary agent´s start clip? It´s seams broken, I can´t get to work, even with the default agent.

In the help, the attribute is "currentstate" (the crowd source uses "state" attr), but it doesn´t seam to work too...

 

Edited by AdamJ
  • Like 1
Link to comment
Share on other sites

Well.. it´s working, sorry for the confusion. I just needed to add the states in dop and perhaps a reload in the crowd source!

 

If I have, let´s say, lot´s of clips, is there a way to use them in dops instead of adding lots of state nodes? Perhaps with vops and attributes?

Link to comment
Share on other sites

yeah need to hit reload on the crowdsource so it picks up any clips you've baked out since the initial hip load/last reload.

 

Crowdstate nodes associate animation with states (through detail attribs) and limit scope of forces to only affect particles in that state. Transition nodes also look for them to populate the dropdown menus. In theory you could manage all the attributes in vops/wrangles; as long as they're set to valid agent clip data it should work. Check out the crowdstate/clipdata_detail node Data Bindings tab for the attributes that are being set.

 

 

Well.. it´s working, sorry for the confusion. I just needed to add the states in dop and perhaps a reload in the crowd source!

 

If I have, let´s say, lot´s of clips, is there a way to use them in dops instead of adding lots of state nodes? Perhaps with vops and attributes?

Link to comment
Share on other sites

Adam, I´m testing rendering crowds with the style sheets. One question now: How can I access a parameter (like a ramp), inside the script? (I have a ramp and want to use a "chramp" function inside the script, but I get an error).

 

I think the crowd solution in houdini is very strong, and could replace our need of massive, one main problema I think is the layers "way" of changing geometry. We can´t iterate over lot´s of options right now, because, as far as I understood, we have to have on layer for each geometry composition. If we could layer layers, we would have far more options... I hope you guys improve this in the near future!

Link to comment
Share on other sites

I think you'd have to use spline() and fetch ramp parm data yourself as right now there's no way to grab it directly.. (though I just tried this and it doesn't seem to work so not sure if it's supported yet)

 

edit: following should work now; \"cubic\" needed to be escaped since we're passing the whole thing as a json string in quotes

"code" : "cvex mFn( int seed = 0; export vector out_color = {0,0,0} ) { float values[] = {`ch("ramp1value")`,`ch("ramp2value")`,`ch("ramp3value")`,`ch("ramp4value")`}; float s = spline(\"cubic\", float(seed/11.0), values ); out_color = set(0,s,0); }",
"bindings": { "seed" : "intrinsic:indexorder" }

From what Ed mentioned earlier the layer workflow is in it's early stages right now so submit those RFEs :)

Edited by AdamJ
Link to comment
Share on other sites

  • 3 months later...

Hi

 

Has anyone figured out a way to randomise agent geometry? I've been trying to see if there is a way to use agent layers to swap out geometry, but not having much luck.

For example, I would like to have a agent with say 5 different (geometry) hats that I could randomly distribute across my agents.

It seems like it should be a simple copy stamp operation.. hopefully I'm just missing something simple! 


thx

j

Link to comment
Share on other sites

The layers is not yet fully implemented. In my tests, the conclusion I made was that you should bake you character with all the geometry and then, create layers files with each possible geometry, like: layer 0 = no hat; layer 1 = hat 1, and so on.

You can edit the layer file that the rop operator saves.

Link to comment
Share on other sites

Thanks Guilherme

I was trying exactly that yesterday, writing out full geo and modifying the agent layer files, well I was writing out multiple layer files, but that didn't behave properly. Probably just due to naming confusion...
I have a layer file for

"shape": "default.geo"

and one for
"shape" : "default.hat"
I'm trying to vary them using a random layername string attribute. 

Link to comment
Share on other sites

  • 5 months later...

Hi guys,

Just wondering if you got anywhere with the layer manipulation?

 

I'm trying to do something similar where I have 4 different deforming meshes. I've baked the agent with all the geometry inside, and then created extra layer files to support each piece of geometry. E.g. for the layer where the agent is wearing a jersey, I have

 

./myagent_layer.jersey.lay

"deforming":[
  {
     "transform":"geo_Jersey",
     "shape":"jersey.geo_Jersey",
     "bounds_scale":1
  }
]

I've also modified the shapelip Bgeo to make sure the name attribute on the primitive matches (i.e. jersey.geo_Jersey).

 

When I go in to the Agent SOP and change the current layer to jersey, I don't see any geometry at all. Is that normal? I can see geometry for the default and collision layers, but not for the custom ones.

 

Any ideas what's going on?

 

Many thanks,

Andy

Link to comment
Share on other sites

HI Cameron,

Yep, I agree! It's hard to debug with what I've shown, I was just hoping someone had encountered this already.

 

My impression was that the Agent Layer SOP is intended to be used after the agent has been cached to disk? I.e. to modify the incoming agent for render that's already been cached, rather than being used to generate layers which are then cached out. That's been my assumption up to now as I'm not sure where you'd put it if it's supposed to be used before caching. Will look into it.

 

The other issue with the Agent Layer SOP is that while it appears to be set up to support rigid meshes, but doesn't appear to have anything to allow you to add layers of deformable geometry. I'm still finding my way through all of this, so maybe I've just missed something?

 

Anyway, I'll look at putting together a simple scene together to upload as an example. I've had a few thoughts since my original post that I'm gonna test out first, but either way, I'll post back here tomorrow.

 

Thanks for your help.

 

Andy

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...