In a bit of a quandary regarding setting up particles instances:
1. Regarding ParticleSystem 'particleSource', 'particleRepresentation', and
'particleRepresentationFrame': When changing a particles instance, is the
plugin required to call all of these? If I fill in 'particleSource' and
'particleRepresentationFrame' will Nuke fill in 'particleRepresentation' when
it is needed?
2. For a ParticleOp where input-0 is another ParticleOp, and inputs 1-n is
geometry to be instanced. This works the first run through the timeline, but
(in 7.0) a second run through never calls applyBehaviour (cached?) and gets
stuck in an infinite loop.
bool applyBehaviour( const ParticleContext &context, ParticleSystem *ps ){ //
Cycle inputs 1-3 on this op Node *node = this->node(); for ( unsigned p = 0,
np = ps->numParticles(); p < np; ++p ) ps->particleSource(p) = { node, (p %
3)+1 };
return true;}
Leads to: DD::Image::ParticleRender::geometry_engine(DD::Image::Scene&,
DD::Image::GeometryList&) + 1316
DD::Image::ParticleRender::create_geometry(std::vector<int, std::allocator<int>
> const&, DD::Image::ParticleSystem*, DD::Image::Scene&,
DD::Image::GeometryList&, float) + 729
DD::Image::GeoOp::get_geometry(DD::Image::Scene&, DD::Image::GeometryList&) +
457 DD::Image::ParticleRender::geometry_engine(DD::Image::Scene&,
DD::Image::GeometryList&) + 1316
DD::Image::ParticleRender::create_geometry(std::vector<int, std::allocator<int>
> const&, DD::Image::ParticleSystem*, DD::Image::Scene&,
DD::Image::GeometryList&, float) + 729
DD::Image::GeoOp::get_geometry(DD::Image::Scene&, DD::Image::GeometryList&) +
457 [ ... back to top ]
3. If I use a MergeGeo to hold all the instances and pipe that into input-1 it
works as expected, but how does the ParticleEmitter get away with not having to
do this?
bool applyBehaviour( const ParticleContext &context, ParticleSystem *ps ){ //
Cycle inputs 0-2 on our input-1 (a MergeGeo) Node *node =
this->input(1)->node(); for ( unsigned p = 0, np = ps->numParticles(); p < np;
++p ) ps->particleSource(p) = { node, (p % 3) };
return true;}
_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev