AWS Thinkbox Discussion Forums

SDK: Frost crash when using custom IParticleObjectExt class as source

I have a SimpleObject2 plugin that inherits the IParticleObjectExt class.

I have implemented the following methods:

void UpdateParticles(INode *node, TimeValue t);
int NumParticles();

Point3* GetParticlePositionByIndex(int i);
TimeValue GetParticleAgeByIndex(int i);
float GetParticleScaleByIndex(int i);
Point3* GetParticleSpeedByIndex(int i);

When I choose my SimpleObject2 as a source for a Frost object and turn on my debugger, as I step through the code I can see Frost querying my object for it’s IParticleObjectExt interface, updating its particles, querying number of particles, querying particle position and velocity…and then I get a hard max crash.

Is there some other function from the IParticleObjectExt I need to implement in my plugin? Basically, what is the list of functions Frost calls on an object to get the particle data it uses to construct a mesh.

I’m not sure here. I’ve asked one of the developers to provide you some feedback here.

Have you tried other datasets? I’m wondering if there’s some data that’s in a format Frost’s not expecting.

We also call the following functions:

TimeValue GetParticleAgeByIndex(int index)
int       GetParticleBornIndex(int i)
TimeValue GetParticleLifeSpanByIndex(int index)
Point3 *  GetParticleOrientationByIndex(int index)
float     GetParticleScaleByIndex(int index)
Point3 *  GetParticleScaleXYZByIndex(int index)
AngAxis * GetParticleSpinByIndex(int index)

I think you’ll just need to implement the functions that return a pointer. By default they return NULL and it looks like we don’t handle that gracefully.

Ah you beat me to it, was just about to post that the crashing stops when I implement

Point3* GetParticleScaleXYZByIndex(int i);
AngAxis* GetParticleSpinByIndex(int i);
Point3* GetParticleOrientationByIndex(int i);

(I already had the others implemented)


1 Like
Privacy | Site terms | Cookie preferences