Instance particle color to instanced objects

   13231   11   3
User Avatar
Member
523 posts
Joined: July 2005
Offline
Hello,


I have a little particle system with a ramp function coloring from blue to red ($LIFE).

I've instanced a simple box with point instancing.

How can I give these boxes the color of my ‘underlying’ particles…?



thanks,



bern
User Avatar
Member
1532 posts
Joined: July 2005
Offline
Have a look at this quickie tutorial that JeffW was kind enough to put together.

http://www.sidefx.com/index.php?option=com_content&task=view&id=1050&Itemid=216 [sidefx.com]

Gene
User Avatar
Member
523 posts
Joined: July 2005
Offline
Hello ,



here's a little test file…


H8 Mantra renders colors

H9 Mantra does not render colors…


Why does Mantra 9.1 not render the colored boxes?????




Using Houdini 9.1.165

thanks,



bern

Attachments:
instance_h9.hipnc (184.0 KB)

User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Check out the response I posted on OdForce for the same thread:

http://forums.odforce.net/index.php?showtopic=6590&st=0&p=44137&#entry44137 [forums.odforce.net]
Lightrig Technique - od

I wouldn't expect an instance file in H8 to work in H9. That is one area that has been completely reworked including the replacing of $IPT with instancepoint().

See the comments on the nodes.

Point instancing in H9 is lots of fun and very accessible now.
There's at least one school like the old school!
User Avatar
Member
523 posts
Joined: July 2005
Offline
Hello Jeff,


thanks for the link to Odforce, but for the moment it's not on-line( Upgrades going on)

The scene is made in Houdini 9. If I render with the ‘old’ Mantra H8 ROP everything works.
But using Mantra 9.1 my blocks stay gray.

Is there a difference how Mantra 9 and Mantra 8 do this stuff (instance rendering)

I want to pass my particle color information to the shader…


thanks ,



bern
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
There have been a few changes yes.

You need to add the instance properties to your object. You use the Edit Parameter Interface to do this. If you open this dialog on your object (RMB on the node or from the parameters Gear menu), on the left hand side switch this to Render Properties. Then look in the Mantra9 parameter properties and find the instance parameters. There are four of them.
Select them and then press the Right arrow between the first two major colums then accept.

Now all you need to do is turn on the point instancing toggle and specify your box as the instance object or you can define this down in SOPs.
There's at least one school like the old school!
User Avatar
Member
523 posts
Joined: July 2005
Offline
Thanks Jeff,


Instancing works well now.

I just can't get my particle color to my instanced geometry (boxes).


greetings,




bern
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
I think that's a shader issue.
The shader that you apply to your instanced geometry has to be able to take in Cd.
If you use Materials, then most of these will inherit the geometry Cd and Alpha if present as attributes.
If you are using individual SHOPs then most don't inherit geometry. Try Super material.
There's at least one school like the old school!
User Avatar
Member
523 posts
Joined: July 2005
Offline
Hello,

this doesn't seem to work with Mantra 9:

using the vm_surface attribute like in this article:

http://odforce.net/wiki/index.php/MantraInstancing [odforce.net]


One way to workaround this limitation is to use an AttribCreate SOP that reproduces the vm_surface attribute using as reference, the output from a Shader SOP that has Point Instancing turned on and Indirect References turned off.


With Mantra 8 this works…why not with Mantra 9.1?




thanks
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Because this has all changed if you use the new Mantra in H9 with SOHO.

Look at the Material SOP and what it does to your geometry. Add a material assignment to your geometry and pull in a parameter or two using the local overrides.
Next open up the spreadsheet and look at the Primitive attributes added by the material SOP:

shop_materialpath /shop/my_material
material_override {'Kd':1,'opacityb':1,'opacityg':1,'opacityr':1,}

Also look at the way they are built. The second attribute is in the form of a Python dictionary:

{ ‘token1’:value1, ‘token2’:value2}

Much better than in H8 where you had to massage a difficult to work with string. Now it is simply shop_materialpath and material_override as either a primitive, point, vertex or detail attribute.
It's predictable and you can easily create and manage these strings in Python.
There's at least one school like the old school!
User Avatar
Member
832 posts
Joined: July 2005
Offline
hey jeff, does this require mean that the shader parameters need to be promoted to the materials parameters?
User Avatar
Member
523 posts
Joined: July 2005
Offline
Thanks Jeff,



I added a Material SOP to my Particle Network node.

I set it to Point Attributes, so that my instances inherit the point values (color)

I choose Overide > Color

What must I enter to transfer the point colors to my material?

$CR $CG $CB does not work in the color field….

Is it possible to post an example because I'm a little stuck now?


thanks
  • Quick Links