Jump to content
Werner

Multiple Materials on Crowd agents

Recommended Posts

I'm trying to find a way to apply multiple materials (Skin, leather ext....) to agents in Houdini Crowd system.

 

I looked through some tutorials on how to work with packed primitives, but I could not find a way to retrieve the groups or name attributes on the crowd agent.

What would be the right way to extract the name attributes and apply multiple shaders back onto the character agents?

 

Has anyone done this successfully? 

Edited by Werner

Share this post


Link to post
Share on other sites

I'm trying to find a way to apply multiple materials (Skin, leather ext....) to agents in Houdini Crowd system.

 

I looked through some tutorials on how to work with packed primitives, but I could not find a way to retrieve the groups or name attributes on the crowd agent.

What would be the right way to extract the name attributes and apply multiple shaders back onto the character agents?

 

Has anyone done this successfully? 

 

in the stylesheet example files there are 2 good examples of variance in shader or shader parms. Check the packed and the crowd stylesheet files.

Share this post


Link to post
Share on other sites
Check the packed and the crowd stylesheet files.

Where are these files?

Can we get H15 already?

Share this post


Link to post
Share on other sites

I'm still battling to get this to work. The lady in the video posted mention briefly the you can assign various materials to groups, but then just applies one single material to the crowd source.

 

I get that agents are packed prims and usually it worked fine to force Save all SHOPs in the Mantra node just to get all the materials back on agents at render time...but not on my current scene...not sure why yet.

 

I packed the hda model before running the agent bake, and it renders with all the materials applied to groups(edit packed node to point the different materials to their groups). Once baked, the agents still renders white.

 

This is not to get texture variation on the agents. I'm just trying to get the multiple materials that was assigned to the original character to show up at render time on the baked agents.

Edited by Werner

Share this post


Link to post
Share on other sites

Save All SHOPs should work provided that the SHOPs paths when you baked the agent are the same in the scene that you loaded the agents into. If that's not working for you, can you attach a simple example of your setup?

Share this post


Link to post
Share on other sites

Save All SHOPs should work provided that the SHOPs paths when you baked the agent are the same in the scene that you loaded the agents into. If that's not working for you, can you attach a simple example of your setup?

 

I got it to work. I really think more tutorials about crowd material stylesheets are needed.

Share this post


Link to post
Share on other sites

Hi All

I'm trying to do something similar and I would like to know if it's possible to apply, in the baked Agent, a different material for each geo.

The stylesheet is great but because it applies everything at renderTime I need a different approach  in order to see the textures in the viewport.

My approach at the moment is to get different agent layers with different body variations and each geometry need a different material and texture.
I got everything working when I import the FBX inside Houdini; but after baking the agent it looks like I loose every information about the materials and obviously if I apply one material in the crowdSource node, I got just one texture visible.

Obviously I could create a different crowdSource node for each body Variation and then apply the material there, but it seems to me the wrong way to do it.

Any idea?
Cheers
M

 

Share this post


Link to post
Share on other sites
On 18.11.2015 at 10:21 AM, Werner said:

 

I got it to work. I really think more tutorials about crowd material stylesheets are needed.

It would be great if you could share the solution ;)

However, I think I got it, the way it's supposed to be done (but please correct me if I'm wrong). I'm quite new to Houdini so the learning curve keeps hitting me in the face, but after watching almost all GoProcedural tutorials and recent Masterclasses (which mention adding different materials to different agent layers, but never actually show it) combined with studying help I ended up with a workflow that I've just described in a small document. Maybe it can help, I've attached it.

Now a question from me: 

How could we create an image plane (render pass) from a group name attribute? I mean the group name we create in "crowdsource" node.

For example, we create a scene with 10 different groups, we name them, and we want to have a mask for every group after we render. We could bind a parameter in the shader? But we have to bind that in every material? For the shoes, hats, bodies, of e.g. 30 different characters? That would be a nightmare.

Another solution: create a simple shader with just the parameter and use it in Takes? But then we render the scene twice - the "normal" render with shaders we created for all the characters and assigned through Material Stylesheets, and then the "masks" render, right? Still not a perfect solution.

Thanks for any tips.

HoudiniCrowdMaterialStylesheetsForParts_v1.0.pdf

crowd_group_name.PNG

Share this post


Link to post
Share on other sites
On 5/27/2016 at 10:17 AM, loogas said:

How could we create an image plane (render pass) from a group name attribute? I mean the group name we create in "crowdsource" node.

Try using http://archive.sidefx.com/docs/houdini15.5/vex/functions/renderstate in your shader. Use the property "packed:attribname" where "attribname" is the name of your attribute.

 

Share this post


Link to post
Share on other sites
On 5/27/2016 at 7:17 AM, loogas said:

It would be great if you could share the solution ;)

However, I think I got it, the way it's supposed to be done (but please correct me if I'm wrong). I'm quite new to Houdini so the learning curve keeps hitting me in the face, but after watching almost all GoProcedural tutorials and recent Masterclasses (which mention adding different materials to different agent layers, but never actually show it) combined with studying help I ended up with a workflow that I've just described in a small document. Maybe it can help, I've attached it.

Now a question from me: 

How could we create an image plane (render pass) from a group name attribute? I mean the group name we create in "crowdsource" node.

For example, we create a scene with 10 different groups, we name them, and we want to have a mask for every group after we render. We could bind a parameter in the shader? But we have to bind that in every material? For the shoes, hats, bodies, of e.g. 30 different characters? That would be a nightmare.

Another solution: create a simple shader with just the parameter and use it in Takes? But then we render the scene twice - the "normal" render with shaders we created for all the characters and assigned through Material Stylesheets, and then the "masks" render, right? Still not a perfect solution.

Thanks for any tips.

HoudiniCrowdMaterialStylesheetsForParts_v1.0.pdf

crowd_group_name.PNG

What is the agent prep node for in your pdf?

Edited by mwillustrations

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×