Pyrocluster and third-party emitters
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2011 at 03:02, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12
Platform:
Language(s) : C++ ;---------
According to the C4D docs, Pyrocluster will work with any C4D compatible particle system. Unfortunately there's virtually nothing in the SDK about Pyrocluster and absolutely nothing about how to make it work with a third-party particle emitter.I'm trying to get it to work with my emitter but I can't see exactly what Pyrocluster expects to get from the emitter in the way of data. I can create a ParticleTag on my emitter and fill it with the particle data, but PC just ignores it. I've also tried receiving the TP_MSG_OBJECT_GETPARTICLES message, which I do receive okay, but there doesn't seem to be any way to return whatever info PC wants.
I've gone through the SDK particle volume example but and I can get this to work with my emitter but it's clearly different to how PC works.
I'm a bit stumped on this and if anyone has any details about what data PC wants and how to provide it, that would be enormously helpful.
Thanks,
Steve
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2011 at 08:29, xxxxxxxx wrote:
Does your particle emitter work fine otherwise? How is it build? I actually think the only valid way to build an own emitter is through TP.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/10/2011 at 08:39, xxxxxxxx wrote:
Yes, it's fine. It's a completely new emitter system, nothing to do with TP.
As I say, I can make the SDK example particle volume shader work fine, with some adjustment of course because my data structures are different. And it works without problem with a range of inbuilt C4D functions such as the Mograph tracer and the standard C4D particle modifiers.
It seems clear that PC wants some data that my emitter is not providing. I just wondered if there was any info anywhere to indicate what that was. Since PC works with both the standard emitter and TP, there is presumably a common data set it requires. (Actually, it's difficult to believe that that data is much more than is contained in the standard Particle class in the SDK.) It's really a matter of how to get that data to PC.
Unless TP uses the standard emitter as the base for its emitter, then there must be a common interface for passing that data to PC. It's that which I'd really like to know about.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2011 at 03:47, xxxxxxxx wrote:
Can you please give me a short description how your emitter is build so I can make some tests on my own?
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2011 at 05:51, xxxxxxxx wrote:
Okay, I'll try.... basically, the emitter is a generator object and stores the particle data in an array of my own class, which in turn is subclassed from the SDK Particle class. So it has all the data contained in Particle plus a lot of other stuff specific to my emitter.
Now this data is not stored in a ParticleTag as with the C4D ParticleObject but it is easy to create a ParticleTag and copy the small amount of data to fill that tag across to it. So if PC is looking for that tag to get the particle data it should find it. I've done this but PC seems to ignore it. I find it hard to believe that PC specifically wants a ParticleObject since it works with both the standard emitter and TP.
Here's the code snippet I use in the emitter's Init function to create the tag:
// add a particle tag VariableTag *vt = op->MakeVariableTag(Tparticle, theOpts.maxParticles); // maxParticles is the maximum number of particles if(!vt) GePrint("In Init Could not create particle tag."); else GePrint("In Init successfully created a particle tag.");
The GePrints there just confirm that the tag is successfully created. In GetVirtualObjects I copy the required data across, the code is:
// fill the particle tag VariableTag *vt = (VariableTag* )op->GetTag(Tparticle); if(vt) { Particle *pc = (Particle* )vt->GetLowlevelDataAddressW(); if(pc) { for(i = 0; i < particleCount; i++) { pc[i].off = pt[i].off; pc[i].v1 = pt[i].v1; pc[i].v3 = pt[i].v3; pc[i].t = pt[i].t; pc[i].bits = pt[i].bits; } } }
The variable 'pt' is an array of my own particle data class. A quick check with a debugger shows that the tag is successfully retrieved and the data is copied over, so the tag is there and contains the data PC would need. Yet it just doesn't seem to want to play.
Many thanks for taking a look at this. I'm really very grateful.
Cheers,
Steve
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2011 at 08:15, xxxxxxxx wrote:
Originally posted by xxxxxxxx
I find it hard to believe that PC specifically wants a ParticleObject since it works with both the standard emitter and TP.
I think this is exactly the reason why it's not working. I assume PC is specifically checking for TP and the ParticleObject. That's why I was asking how your emiiter is build. I have to ask the developers if PC is expecting a ParticleObject.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2011 at 08:39, xxxxxxxx wrote:
Thanks. That would be very useful to know. But it seems odd. If it's true, then the statement in the C4D reference docs that PC works with any C4D-compatible particle system is clearly not the case. In fact, PC would have to be specifically coded to work with every particle system that otherwise works in Cinema.
Anyway, I'll be very interested to hear back from the developers on this one.
Best,
Steve
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2011 at 12:05, xxxxxxxx wrote:
I got an answer from our developers. As suspected PC is checking explicitly for TP or ParticleObject. Also ParticleObject is the only 'legal' way to create standard particles.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2011 at 15:14, xxxxxxxx wrote:
Ah, that's a pity. Well, it isn't crucial for the plugin, but it would have been nice. Thanks very much for checking though, it stops me spending time on something that isn't achievable.
You've got me slightly worried with the 'legal' particles. I take it that what you mean is that if you want standard-issue C4D particles you have to use ParticleObject, but that you can develop an independent system if you wish. Just that then you're on your own and can't rely on being able to access any C4D component that uses particles. Have I got that right?
Steve
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2011 at 16:59, xxxxxxxx wrote:
Well what I meant is that the official way to create (emit) standard particles is the ParticleObject.
From the SDK docs about ParticleObject:
"This is the main emitter object that creates and holds the particles. Particles can only be created using an emitter object, but once particles are created you can modify their velocity."So you are actually not really allowed to create standard particles in any other way or only on your own risk.
TP is a different matter though.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/10/2011 at 01:58, xxxxxxxx wrote:
Right, got it. I'm taking that to mean that a completely independent particle system is allowed, but for standard particles you use ParticleObject. That's no problem, mine is about as non-standard as you can get. I just wanted to make use of as many inbuilt assets as I could, like the standard particle modifiers.
Thanks,
Steve