Page 1 of 2

Hybrido RPC particles converted to PRT...

Posted: Thu Jul 11, 2013 12:36 pm
by gregory@sub-pixel.com
So, i forgot to enable the PRT export for the Hybrido particles and only saved the RPC ones...
Is there a way to convert them after the sim in PRT format?
Like we used to convert grid to bin particles in the old RF2012 after the sim was finished....
I'd hate to re-sim for another 40 hours just to get the PRT files...

Thanks in advance.....
Gregg

Edit: Or even convert the RPCs to BIN format, which Krakatoa also reads them...

Re: Hybrido RPC particles converted to PRT...

Posted: Thu Jul 11, 2013 1:04 pm
by LuisMiguel
Hey,

You can do it by executing this script in the batch script. Make sure you have the first frame with the particles displayed in the viewport, althought you disable the viewport, and the rpc checkbox is checked.

Code: Select all

GD = scene.get_HY_GridDomain("Grid_Fluid_Domain01")
for f in range(scene.getMinFrame(), scene.getMaxFrames() +1):
	scene.setCurrentFrame(f)
	GD.activeExportResource(14, False)
	GD.activeExportResource(5, True)
	GD.export()
	GD.activeExportResource(14, True)
luisM.

Re: Hybrido RPC particles converted to PRT...

Posted: Thu Jul 11, 2013 1:12 pm
by gregory@sub-pixel.com
Thank you, Luis!
I'll try it asap!

Re: Hybrido RPC particles converted to PRT...

Posted: Thu Jul 11, 2013 2:16 pm
by gregory@sub-pixel.com
Yes! Worked like charm!
Thanks again, Luis!

Re: Hybrido RPC particles converted to PRT...

Posted: Fri Jul 12, 2013 10:41 am
by LuisMiguel
no problem ;)

luisM.

Re: Hybrido RPC particles converted to PRT...

Posted: Thu Jul 25, 2013 1:40 pm
by gregory@sub-pixel.com
Hey, Luis...
On the same topic...
How can i convert bin secondary particles (Splash, Foams, Waterlines etc.) into PRTs, as well?

Is there somewhere documented the "activeExportResource" command and what format their export ID numbers represent?
Couldn't find anything detailed enough...

Thanks!

Re: Hybrido RPC particles converted to PRT...

Posted: Fri Jul 26, 2013 11:48 am
by LuisMiguel
Hey,

There is a way but maybe it is better with the names

Code: Select all

GD = scene.get_HY_GridDomain("Grid_Fluid_Domain01")
for f in range(scene.getMinFrame(), scene.getMaxFrames() +1):
   scene.setCurrentFrame(f)
   GD.activeExportResource(EXPORT_PARTICLES_BIN, False)
   GD.activeExportResource(EXPORT_PARTICLES_PRT, True)
   GD.export()
   GD.activeExportResource(EXPORT_PARTICLES_BIN, True)
The same thing you could do with the rpc files replacing "EXPORT_PARTICLES_BIN" with "EXPORT_PARTICLES_RPC"

luisM.

Re: Hybrido RPC particles converted to PRT...

Posted: Fri Jul 26, 2013 12:31 pm
by gregory@sub-pixel.com
I see...
Thank you, i'll try them asap....

Re: Hybrido RPC particles converted to PRT...

Posted: Fri Jul 26, 2013 12:54 pm
by gregory@sub-pixel.com
Hmmm....
I can't find the "EXPORT_PARTICLES_RPC" constant...
All other constants work; ABC, ASC, BIN, PDC, PRT....

Edit1:
There is a ""EXPORT_GRID_DOMAIN_RPC" though...
Maybe i can use that for exporting RPCs to PRTs using the names instead of the number IDs?

Edit2:
Yes, that works fine...

Re: Hybrido RPC particles converted to PRT...

Posted: Wed Jul 31, 2013 11:42 am
by LuisMiguel
Hey,

You are right. That script was for sph particles and I just changed the format. It was "EXPORT_GRID_DOMAIN_RPC". ;) sorry.

luisM.