nparticles as source points?

   3118   9   1
User Avatar
Member
22 posts
Joined: June 2013
Offline
I created an otl that takes in source points and copies geometry created inside the otl to those points.

When brought into maya, and a normal particle is attached it works fine, but if nparticles are attached it does not copy the geometry to those particles.

Is there something I have to do with the nparticles to get them to work?
______________________
Todd Boyce
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
That should work. The only thing I can think of is that you need to do a “sync” at a frame where there are actually particles (i.e. the asset actually has output), so that a mesh node is created on the Maya side. However, this applies to both particle and nParticle types.
Andrew / アンドリュー
User Avatar
Member
22 posts
Joined: June 2013
Offline
Ok, I didn't know about syncing but that worked like a charm.

I have a second question though, I'm trying to drive a channel based on the nparticle's age.

My initial attempt using $AGE doesn't seem to be working - is the nparticles' age remapped into houdini's $AGE attribute? Is there some other way I need to be going about this?

Thanks for the help!
______________________
Todd Boyce
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Hm, looks like the age attribute is not being mapped to Houdini Engine. The plugin uses the MEL “particle -q -perParticleDouble nParticleShape1” to list out the per-particle attributes to map. However, that list doesn't include age for some reasons. Let me look into adding it. It should be fairly straightforward.
Andrew / アンドリュー
User Avatar
Member
22 posts
Joined: June 2013
Offline
That would explain it!

Thanks for looking into it and adding that support!
______________________
Todd Boyce
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Having the age attribute doesn't mean you can access it right away with the $AGE variable. You would have to use attribCreate SOP to map the “age” attribute to the “AGE” variable.

Also, if you use Debugging -> View Assets in Houdini, you can see a snapshot of the Houdini Engine state. This is useful for debugging. For example, this lets you see what data is available in the input geometry.
Andrew / アンドリュー
User Avatar
Member
22 posts
Joined: June 2013
Offline
Ok, good to know. Thanks!
______________________
Todd Boyce
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
I've made the changes to include the “age” attribute. It should be in tomorrow's build (14.0.466).
Andrew / アンドリュー
User Avatar
Member
22 posts
Joined: June 2013
Offline
Awesome!

I got a work-around by connecting the nparticle age to its color (though I found you have to make it's base color black because for whatever reason Maya doesn't obey this linkage on the frame it is born).

Thanks Andrew!
______________________
Todd Boyce
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
The plugin will actually convert other per-particle attributes as well. So instead of connecting to color, you could alo create a custom attribute and connect age to that.
Andrew / アンドリュー
  • Quick Links