Search - User list
Full Version: nparticles as source points?
Root » Houdini Engine for Maya » nparticles as source points?
tboyce
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?
awong
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.
tboyce
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!
awong
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.
tboyce
That would explain it!

Thanks for looking into it and adding that support!
awong
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.
tboyce
Ok, good to know. Thanks!
awong
I've made the changes to include the “age” attribute. It should be in tomorrow's build (14.0.466).
tboyce
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!
awong
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB