[max sdk] Getting render state of particle flow

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  04 April 2006
[max sdk] Getting render state of particle flow

Hi,
I'm trying to retrieve particle container object from particle flow.

IParticleGroup *iPGroup = ParticleGroupInterface(pFlowGroupNodes[i]);
   IObject *pContObj = iPGroup->GetParticleContainer();


pFlowGroupNodes is INodeTab with nodes which class id is ParticleGroup_Class_ID.
This is working fine but if I for example want to get render mesh or a channel from pflow I get it's viewport state (let's say 10% of all particles).
To switch all objects to render state I do this

BeginEnum beginEnum(t);
   ClearFlags clearFlags;
   
   for(int i=0;i<allNodes.Count();i++)
   {
   	ReferenceMaker* rm = allNodes[i];
   	EnumRefs(rm, clearFlags);
   }
   
   for(int i=0;i<allNodes.Count();i++)
   {
   	ReferenceMaker* rm = allNodes[i];
   	EnumRefs(rm, beginEnum);
   }


In first loop I clear A_WORK1 flag. In second I call RenderBegin(t) for every reference and set A_WORK1 flag back. After rendering is finished I do same thing but I call RenderEnd(t) instead.
This is working fine because for example all modifiers are in render state, also particles like spray or snow are in render state. With pflow it is different. iPGroup->GetParticleContainer() returns NULL. Can anyone tell me why this is happening? I suspect that RenderBegin may not be implemented for particle groups. In that case is there any other way to retrieve particle channels for example IParticleChannelAmountR? Functions that are used to acquire them like GetParticleChannelAmountRInterface require some object, what else could it be if not particle container?
When I tried GetParticleContainer() inside render effect plugin (it gets scene already set to render state) it works as it should be. Particle flow stuff in render state. So I guess I just don't know how to switch it.

Thanks for any help.
regards
__________________
Pixel Factory
 
  04 April 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:30 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.