Hybrido RPC particles converted to PRT...

gregory@sub-pixel.com
Posts: 13
Joined: Sat Jun 08, 2013 11:38 am

Hybrido RPC particles converted to PRT...

Post by gregory@sub-pixel.com » Thu Jul 11, 2013 12:36 pm

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...

User avatar
LuisMiguel
Posts: 528
Joined: Fri Jun 04, 2010 2:37 pm

Re: Hybrido RPC particles converted to PRT...

Post by LuisMiguel » Thu Jul 11, 2013 1:04 pm

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.

gregory@sub-pixel.com
Posts: 13
Joined: Sat Jun 08, 2013 11:38 am

Re: Hybrido RPC particles converted to PRT...

Post by gregory@sub-pixel.com » Thu Jul 11, 2013 1:12 pm

Thank you, Luis!
I'll try it asap!

gregory@sub-pixel.com
Posts: 13
Joined: Sat Jun 08, 2013 11:38 am

Re: Hybrido RPC particles converted to PRT...

Post by gregory@sub-pixel.com » Thu Jul 11, 2013 2:16 pm

Yes! Worked like charm!
Thanks again, Luis!

User avatar
LuisMiguel
Posts: 528
Joined: Fri Jun 04, 2010 2:37 pm

Re: Hybrido RPC particles converted to PRT...

Post by LuisMiguel » Fri Jul 12, 2013 10:41 am

no problem ;)

luisM.

gregory@sub-pixel.com
Posts: 13
Joined: Sat Jun 08, 2013 11:38 am

Re: Hybrido RPC particles converted to PRT...

Post by gregory@sub-pixel.com » Thu Jul 25, 2013 1:40 pm

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!

User avatar
LuisMiguel
Posts: 528
Joined: Fri Jun 04, 2010 2:37 pm

Re: Hybrido RPC particles converted to PRT...

Post by LuisMiguel » Fri Jul 26, 2013 11:48 am

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.

gregory@sub-pixel.com
Posts: 13
Joined: Sat Jun 08, 2013 11:38 am

Re: Hybrido RPC particles converted to PRT...

Post by gregory@sub-pixel.com » Fri Jul 26, 2013 12:31 pm

I see...
Thank you, i'll try them asap....

gregory@sub-pixel.com
Posts: 13
Joined: Sat Jun 08, 2013 11:38 am

Re: Hybrido RPC particles converted to PRT...

Post by gregory@sub-pixel.com » Fri Jul 26, 2013 12:54 pm

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...

User avatar
LuisMiguel
Posts: 528
Joined: Fri Jun 04, 2010 2:37 pm

Re: Hybrido RPC particles converted to PRT...

Post by LuisMiguel » Wed Jul 31, 2013 11:42 am

Hey,

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

luisM.
Last edited by LuisMiguel on Mon Aug 05, 2013 9:58 am, edited 1 time in total.

Post Reply