Writign out Binary files from particles data using python ?

102 views
Skip to first unread message

ashishdantu

unread,
Jan 5, 2008, 4:48:42 AM1/5/08
to python_inside_maya
Hello all,

since i've seen python can be useful, wanted to touch on a trivial
requirement. I have attempted to *hack* around this issue earlier. But
have not been able to do this cleanly !

heres the thing. I want to write out a binary file sequence (real
flow's particle bin format in particular) by taking maya's particle's
data - frame wise. What i did earlier was tried to fuse two python
scripts which 1) read maya pdc files and read the attribute values and
store them 2) write to real flow - bin format files using these stored
values.

Now i' being a complete noob in python (handling or decoding /
encoding binary data and files - particularly) cudnt figure out why
the married scripts produce bin files, but which dont work inside
RF !

I'd request this to be a noob's thread of learning python and its use
with maya to make new toools. So pls bare my mistakes and would
appreciate all help !! let me know if i should paste the code that i
tried to have you guys check it * or * actually i'd prefer a fresh
look at approaching this kinda problem solvign using python !

i guess for this the file grammar of what makes a RF's particle bin
format is necessary to get started. I hava pdf from the docs .. pls
tell me how to post that .. here ??

-ashish

marcin

unread,
Jan 5, 2008, 8:02:13 AM1/5/08
to python_inside_maya

Hi!

I've written PDC reader some time ago. It uses struct module to read
values. If you know structure of RF bin file you can create RF bin
file using similar technique. If this will help you I can paste
example of reading PDC Maya file in Python.

ashishdantu

unread,
Jan 6, 2008, 2:18:15 AM1/6/08
to python_inside_maya
hi marcin,

ya thank you for the lead... ya sure i'd appreciate any help..

heres the code for you guys to check and let me know the mistakes. Pls
note that this is a mix of two scripts fused to make the exchange of
data work together...Now the issue is the tool does produce bin files
but when i try to load these file sequence in RF, it hangs !

-ashish

# PDC to BIN export tool
'''
Script : pdc_to_bin.py
Desc : Read pdc files and write out bin files
Author : Ashish Dantu - ashis...@gmail.com
Date : 1/10/2007

Notes : Based on scripts by :
# Name: export_custom_normal.rfs - Author: Gregory
Ecker
# Name: pdc_import.rfs - Author: Jorge Medina

Usage : When the script is run, it will open a 'filedialog'
window. Choose a .pdc file (start file in a pdc sequence).
The script will write out .bin files in the same
directory.

Script flow :
main() [get folder path ]
-> fires importFile() [open each pdc file in
the path and store the POS and vel values]
-> fires binmain() [for each pdc,
write a bin file in the same directory using the pass pos and vel
values]
-> fires
writeBinParticleFileHeader() [write header info]
-> fires
writeParticleFileFrame() [write the per particle attributes]


'''

import Tkinter,tkFileDialog,tkMessageBox,struct,array,os,sys,dircache

######################################
## binMain
## ITEMS to be PASSED :
## endFrame = len(pdcfiles in the folder)
## particleNode = particleshape node name
## fullbinDir = particle bin directory
## numOfParts = rfId (particles for the current frame)
## posiPP = particle pos array
## velPP = particle vel array

def
binMain(endFrame,particleNode,fullbinDir,numOfParts,posiPP,velPP,currFrame):

# default frame parameters
global sceneFps
sceneFps = 25
start_frame = 0
end_frame = endFrame
step_frame = 1

# get directory to write data to:
fullPath = fullbinDir

# step through scene and write out bin files:
#print 'exporting frame :' , str(currFrame), ' Total parts ',
numOfParts #, ' \n the pos is \n ',posiPP

# create file for this frame, write out header info:
str_number = '%(#)05d' % {"#":currFrame}
filename = particleNode + "_custom" + str_number + ".bin"
fullfilename = fullPath + filename
filehandle = open(fullfilename, "wb")

# writeBinParticleFileHeader(filehandle, particleNode,
currFrame,numOfParts)
writeBinParticleFileHeader(filehandle,
particleNode,currFrame,numOfParts)
#print '\n',len(posiPP)

for i in range (0,len(posiPP)):
#print ' > wrtFileFrame for ', i
#print posiPP[i]
writeParticleFileFrame (filehandle,posiPP[i],velPP[i],i)
filehandle.close()


######################################
# writeParticleFileFrame
# write a frame of data to the open filehandle for the given particle
node.

def writeParticleFileFrame(filehandle, posiPP, velPP,partID):

filehandle.write(struct.pack('3f',
posiPP[0],posiPP[1],posiPP[2])) # 3f position
filehandle.write(struct.pack('3f',
velPP[0],velPP[1],velPP[2])) # 3f velocity
filehandle.write(struct.pack('3f', 0.0, 0.0,
0.0)) # 3f force
filehandle.write(struct.pack('3f', 0.0, 0.0,
0.0)) # 3f vorticity
filehandle.write(struct.pack('3f', 0.0, 0.0,
0.0)) # 3f normal
filehandle.write(struct.pack('i',
1)) # i number of neighbors $$
NOT_IMPLEMENTED
filehandle.write(struct.pack('3f', 0, 0,
1)) # 3f texture vector
infoBits = 7
filehandle.write(struct.pack('h', infoBits)) # h infobits $$ WHAT
IS THIS ?
filehandle.write(struct.pack('f', 1000)) # f age
filehandle.write(struct.pack('f', 1)) # f isolation time
filehandle.write(struct.pack('f', 3)) # f viscosity
filehandle.write(struct.pack('f', 1)) # f density
filehandle.write(struct.pack('f', 1)) # f pressure
filehandle.write(struct.pack('f', 1)) # f mass
filehandle.write(struct.pack('f', 1)) # f temperature
filehandle.write(struct.pack('i', 1)) # i particle id


######################################
# writeBinParticleFileHeader(filehandle, emitterNode)
# write header for bin particle file
# filehandle: must be open
# particleNode: node of emitter to write out

def writeBinParticleFileHeader(filehandle, particleNode,
currFrame,numOfParts):

#print filehandle, particleNode, currFrame,numOfParts
#global sceneFps
sceneFps =25

filehandle.write(struct.pack('l',
0xFABADA)) # 'l' magic
filehandle.write(struct.pack('250s',
particleNode)) # '250s' fluid name
filehandle.write(struct.pack('h',
9)) # 'h' version 9
# globalscale = scene.getGlobalgetGlobalVariableValue("scale")
globalscale = 1.0
filehandle.write(struct.pack('f',
globalscale)) # 'f' scene scale
iType = 1
filehandle.write(struct.pack('i',
iType)) # 'i' fluid type
curtime = currFrame * 1/sceneFps
filehandle.write(struct.pack('f',
curtime)) # 'f' elapsed sim time
filehandle.write(struct.pack('i',
currFrame)) # 'i' cur frame number
filehandle.write(struct.pack('i',
sceneFps)) # 'i' frames per second

filehandle.write(struct.pack('l',
numOfParts)) # 'l' number of particles
# radius = emitterNode.getParameter("radius")
radius = 0.1
filehandle.write(struct.pack('f', radius)) #
'f' radius $$ NOT_IMPLEMENTED - NOT SURE WHERE THIS IS
filehandle.write(struct.pack('3f', 1, 1, 1)) #
'3f' $$NOT IMPLEMENTED pressure max,min,avg
filehandle.write(struct.pack('3f', 3, 2, 1)) #
'3f' $$NOT IMPLEMENTED speed max, min, average
filehandle.write(struct.pack('3f', 3, 2, 1)) #
'3f' $$NOT_IMPLEMENTED temperature:, max,min, average
# ePos = emitterNode.getParameter("position")
filehandle.write(struct.pack('3f', 0.0,0.0,0.0)) #
emitter position
# eRot = emitterNode.getParameter("rotation")
filehandle.write(struct.pack('3f', 0.0,0.0,0.0)) #
emitter rotation
# eScale = emitterNode.getParameter("scale")
filehandle.write(struct.pack('3f', 0.0,0.0,0.0)) #
emitter scale

######################################
# importFile

def importFile( fileName,fullbinDir,nFiles,rootName,currFrame ):

file = open( str(fileName), "rb" )
magic = str( file.read( 4 ) ) # pdc or not
if ( magic != "PDC " ):
#print( "The file " + fileName + " is not a PDC format." )
file.close()
return ( False )

listrfIds = []
posiPP = []
veloPP = []
switch = 0
rfId=0.0

# 1 Integer indicating the file format version number.
version = struct.unpack( ">i", file.read( 4 ) )[0]

#1 Integer holding bit information about whether the values stored
in the file are BIG_ENDIAN or LITTLE_ENDIAN.
endianess = struct.unpack( ">i", file.read( 4 ) )[0]

# 2 Integers holding extra bit information that various file
format version might decide to use.
file.read( 8 )

# 1 Integer indicating the number of particles represented in this
file.
cParticles = struct.unpack( ">i", file.read( 4 ) )[0]

# 1 Integer indicating the number of attributes that have values
stored in this file.
cAttributes = struct.unpack( ">i", file.read( 4 ) )[0]

for i in range( 1, cAttributes ):
#posiPP = []
#veloPP = []

# 1 Integer indicating the length of the attribute's name
nameLength = struct.unpack( ">i", file.read( 4 ) )[0]

# M Characters indicating the name of the attribute, where M
is the length of the name.
attributeName = struct.unpack( "=" + str( nameLength ) + "s",
\
file.read( nameLength ) )[0]
# 1 Integer indicating the type of data for the current
attribute.
attributeType = struct.unpack( ">i", file.read( 4 ) )[0]

if ( attributeType == 3 ): # 3 ---> Double Array
if ( attributeName == "particleId" ):
for j in range (0,cParticles): #
cParticles --> num of particles
mayapId = struct.unpack( ">d",
file.read( 8 ) )[0]
#fill the particle Ids
listrfIds.append
( mayapId )
else:
file.read( 8 * cParticles )

elif ( attributeType == 5 ): # 5 ---> Vector Array
switch = 1
if ( attributeName == "position" ):
# Update particles' position.

for rfId in listrfIds:
posadd=[0.0,0.0,0.0]
posadd[0] = struct.unpack( ">d",
file.read( 8 ) )[0]
posadd[1] = struct.unpack( ">d",
file.read( 8 ) )[0]
posadd[2] = struct.unpack( ">d",
file.read( 8 ) )[0]
posiPP.append(posadd)

if ( attributeName == "velocity" ):

for rfId in listrfIds:
veladd=[0.0,0.0,0.0]
veladd[0] = struct.unpack( ">d",
file.read( 8 ) )[0]
veladd[1] = struct.unpack( ">d",
file.read( 8 ) )[0]
veladd[2] = struct.unpack( ">d",
file.read( 8 ) )[0]
veloPP.append(veladd)
#print '\n after append vpp > ',veloPP[0]
else:
file.read( 8 * 3 * cParticles )

if (switch ==1):
#print '\n vel PP >',veloPP

binMain(nFiles,rootName,fullbinDir,cParticles,posiPP,veloPP,currFrame)

file.close()
return ( True )

# -------------------- MAIN ------------------- #
def main():


## Show file picker dialog and get the selected file.
root = Tkinter.Tk()
root.withdraw()
filePath =
tkFileDialog.askopenfilename(parent=root,defaultextension='pdc',title='Choose
a folder with PDC')

if filePath == None:
print "Choose a file"
else:
print 'The chosen path is > ',filePath

## Find path and file root name.
path = os.path.split( filePath )
filename=path[1]

if ( filename.count( "." ) != 2 ):
return ( 1 )

( rootName, dummyNumber, dummyExt ) = filename.split( "." )

## Build the list of files to load in order using their sequence
number.
listFiles = dircache.listdir( path[0] )
## all the files in the current chosen path
listFiles.sort()
nFiles = len (listFiles)

stepFile = 0
newListFile = []
for n in range ( 0, nFiles ):
if ( listFiles[n].count( "." ) != 2 ):
# the pdc filename should have two dots (.) >
particleShape1.1000.pdc
continue
( rootNameAux, number, ext ) = listFiles[n].split( "." )
if ( ( ext.lower() == "pdc" ) and ( rootName ==
rootNameAux ) ):
newListFile.append( int( number ) )
if ( len( newListFile ) < 2 ):
return ( 1 )

newListFile.sort()
#print 'Current sequence of files from chosen pdc are :\n %s and
total files are %d' % (newListFile,nFiles),'\n'

# ---- read each file ---- #
nFiles = len ( newListFile )
for i in range ( 0, (nFiles) ):
# Build file name to load.
number = str (newListFile[i])
fileName = path[0] + "/" + rootName + "." + number + ".pdc"
#print '\n Reading file : ',fileName

# for each of the file, fire the import def and print out the
values
# importFile( fileName,fullbinDir,nFiles,rootName )
if ( not importFile( fileName,(path[0] +
"/"),nFiles,rootName,i ) ):
return ( 1 )

# Return success
return ( 0 )

if __name__ == "__main__":

result = main()
if ( result == 1 ):
tkMessageBox.showinfo('Retry','Reading failed !')
else:
tkMessageBox.showinfo('Done','Reading success :)')

ashishdantu

unread,
Jan 7, 2008, 9:11:30 PM1/7/08
to python_inside_maya
anyone on this pls ?? *help* !

if going through the above code is tiring (which cud be true !) pls
give me guidance on how to write it kinda tool in a fresh
perspective.. read and write out particle attributes directly using
python from maya ?

all i need to know is how should one interpret and design the program
to cater to the requirements of RF's bin file format which is:

This is the specification for RealFlow BIN2 particle files
----------------------------------------------------------
(Don't confuse with BIN mesh files)
[float][int][long int] = 4 bytes
[short int] = 2 bytes
[char] = 1 byte
----------------------------------------------------------
(Begin of file)
[long int] ; verification code = 0xFABADA
[char]*250 ; fluid name
[short int] ; version (current = 9)
[float] ; scale scene
[int] ; fluid type
[float] ; elapsed simulation time
[int] ; frame number
[int] ; frames per second
[long int] ; number of particles
[float] ; radius
[float]*3 ; pressure (max, min, average)
[float]*3 ; speed (max, min, average)
[float]*3 ; temperature (max, min, average)
[float]*3 ; emitter position ;; version>=7
[float]*3 ; emitter rotation ;; version>=7
[float]*3 ; emitter scale ;; version>=7
-> loop for <number of particles>
[float]*3 ; particle position (XYZ-global)
[float]*3 ; particle velocity (XYZ)
[float]*3 ; particle force (XYZ)
[float]*3 ; particle vorticity (XYZ) ;; version>=9
[float]*3 ; normal vector (XYZ) ;; version>=3
[int] ; number of neighbors ;; version>=4
[float]*3 ; Texture vector (UVW) ;; version>=5
[short int] ; info bits (see below) ;; version>=5
[float] ; elapsed particle time (age)
[float] ; isolation time
[float] ; viscosity
[float] ; density
[float] ; pressure
[float] ; mass
[float] ; temperature
[int] ; particle ID
-> end loop
[Additional data] ; internal data ;; version>=6
(End of File)
----------------------------------------------------------

-ashish

marcin

unread,
Jan 9, 2008, 2:20:01 PM1/9/08
to python_inside_maya
This is my part of Maya PDC reader. From what I read PDC file seems
little strange, because it contains ghostFrame attribute which is the
last attribute in PDC file and this attribute is completely different
than any other particle attribute. If it appears in PDC file this
means that this is the end of file. I didn't found this part in your
script. Is your import PDC part of script working correctly ?


import os,sys
import struct

try:
f = file(sys.argv[1], "rb")
except IOError, e:
print "Error ",e


pdcHeader = f.read(28)


print 'PDC Header info \n'


pdc_header = struct.unpack('>4s6i',pdcHeader)

nAttributes = pdc_header[6]
nParticles = pdc_header[5]
pObj=nParticles


for i in range(1,nAttributes):
attrNameLength = struct.unpack('>i', f.read(4))
attrName = struct.unpack('>'+str(attrNameLength[0])
+'s',f.read(attrNameLength[0]))
if attrName[0] == 'ghostFrames':
break
attrType = struct.unpack('>i', f.read(4))

if attrType[0] == 0:
struct.unpack('>i', f.read(4))
print attrName, attrType

elif attrType[0] == 1:
print struct.unpack('>'+str(nParticles)+'i',
f.read(nParticles*4))
print attrName, attrType

elif attrType[0] == 2:
struct.unpack('>d', f.read(8))
print attrName, attrType

elif attrType[0] == 3:
print struct.unpack('>'+str(nParticles)+'d',
f.read(nParticles*8))
print attrName, attrType

elif attrType[0] == 4:
struct.unpack('>3d', 24)
print attrName, attrType

elif attrType[0] == 5:
print struct.unpack('>'+str(3*nParticles)+'d',
f.read(nParticles*24))
print attrName, attrType

ashishdantu

unread,
Jan 9, 2008, 9:32:03 PM1/9/08
to python_inside_maya
hi marcin,

thank you marcin !!

i'm not aware of this ghostFrame thingy !! :( thank you for letting me
know about this.... so ghostFrame is like EOF ?? where did u read
about this ?

the way i tried to verify the data being read from pdc is fine or not
is by printing the stored values (when i ran this py script in RF... )
and i compared this with the values which get printed when the
pdc_import.rfs is run in RF while importing pdc sequence..

my script accomodates the items mentioned in this page -- but i dont
see any ghostFrame attribute being described in there :( help page >>
file:///C:/Program%20Files/Autodesk/Maya2008/docs/Maya2008/en_US/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Dynamics&file=Use_the_PDC_File_Format.html

i'd be greatful if you can guide me on this. because this is a very
useful tool and a gud learning exercise !

so according to ur script, we can read the pdc data .. so how do i
convert/translate this to RF's bin format ?? i'm new to binary data
handling so.. might take a bit of time to understand..

thank you !! again !
-ashish

** Isnt there a way to attach files in these threads ?? all formatting
is gone when we paste code here !! anyone ?? **

ashishdantu

unread,
Jan 9, 2008, 9:44:38 PM1/9/08
to python_inside_maya
hi marcin,

or is it a better way or faster way to just write a python script,
which can be run from maya (after choosing which particle is to be
exported) and then we just write out to a RF's bin file format ??

this should reduce our work of reading a pdc file format (atleast
untill i can wrap my head around this file format !! ) ... ??

if yes, what are the things to be aware of in the program flow ? since
we have the file grammar of what makes a RF' s bin file, we can get
particle PP attributes , and write to this bin files directly ?? i
hope there are no such "ghostFrames" type surprises in RF's bin
files !! ??

-ashish

marcin

unread,
Jan 10, 2008, 3:03:25 PM1/10/08
to python_inside_maya
First I created simple scene with only one particle and I found that
at the end of every PDC file ghostFrame attribute appear. But this
attribute has completely different structure than any other attribute
and I can't read it in a standard way. I don't know why this thing is
undocumented. You can create similar file with RF. First create some
simple scene with minimal amount of information and then try to
investigate it.

Jason Porath

unread,
Jan 16, 2008, 2:29:57 PM1/16/08
to python_inside_maya
Hi Ashish,

I just wanted to let you know, I'm working on similar scripts right
now... trying to get bin to PDC, as well as PDC to bin. I'd initially
been trying to write it in C, working off of some of the maya rf
plugin code, but I'm switching to python, to get around the hassle of
compiling for different platforms.

I haven't gotten very far with it, but wanted to let you know I'm
poking around as well.

The one thing I did find while trying to write a bin culler script
(one that'd copy a bin sequence, but cull out some of the particles)
was that RF is very weird about the data at the end of the file. I
could be wrong about it, but in the description, they have "additional
data" as defined in the spec. The nextlimit guys told me to just write
two zeroes at the end of the file, but that never worked for me.

I got my C script to the point where it would read in and write out
exact copies of the bin files, but the instant you started adding or
taking out particles, loading it would crash RF -- even if you changed
the header accordingly.

I'll let you know how my investigations go.

-Jason

Jason Porath

unread,
Jan 16, 2008, 5:17:39 PM1/16/08
to python_inside_maya
Ashish,

Your code works for me. It's pretty fast, and comes into RF cleanly as
a gas emitter.

I am using RF 4.3.8.0123 and Maya 8.5 64-bit, both on OSX and on
Linux. I am going to try modifying it a bit to come in as a liquid or
dumb particle emitter, and see how it works -- and then get to making
it go in the opposite direction (bin->pdc).

I hope that helps a little bit in diagnosing your problems. I can send
you the actual code I used (I had to clean up the spacing a lot from
how Google Groups formatted it).

THANK YOU for writing this, it saved me easily 4-5 days of banging my
head against a wall.

-J



On Jan 5, 11:18 pm, ashishdantu <ashishda...@gmail.com> wrote:
> hi marcin,
>
> ya thank you for the lead... ya sure i'd appreciate any help..
>
> heres the code for you guys to check and let me know the mistakes. Pls
> note that this is a mix of two scripts fused to make the exchange of
> data work together...Now the issue is the tool does produce bin files
> but when i try to load these file sequence in RF, it hangs !
>
> -ashish
>
> # PDC to BIN export tool
> '''
>        Script : pdc_to_bin.py
>        Desc :  Read pdc files and write out bin files
>        Author : Ashish Dantu - ashishda...@gmail.com

ashishdantu

unread,
Jan 16, 2008, 9:49:39 PM1/16/08
to python_inside_maya
HIIII JAssonnnnnnn !!

ok, Jason (i was excited to read ur post !! - sory if u dont like me
shouting out ur name like that ;-) )

*" Your code works for me."* - can you confirm that ? again ? i mean
say i had one maya file with a particle emitted and cached it into pdc
and then you ran my py file and you got the *_cutom####.bin files out
which you loaded into RF using the binary loader (before setting the
sequence, set emitter type to gas ) and you point the when you scrub,
doesnt hang ??? I tried just now and but RF hangs for me !!! :(

dont know what wrong steps i'm doing !! badly stuck with this ! i'm
on maya 8.0 (32 bit) and real flow RF 4.3.6.0121 (32 bit) on win xp
(32 bit)... since you are doing pdc > bin and bin > pdc ! i'd like to
ask if you have encountered the "GHOSTFRAMES" thingy as marcin had
pointed out ? and is there a diference in the way maya 6.0 or 8.0 or
2008 writes out pdc files ?? Is it that i'm on windows ???
AARrrggghhhhh !!! *confused* !!

I could hav mailed you the py file, to avoid ur re-
formatting .....and yes i will be v.v.v.v.v.v gratefull to you if you
can explain me this file conversion mechanism.. and i'd appreciate if
you send me the code where it loads as liquid.. what things do you
change to make it liquid ?

i wanted to write a py script which i thought wud be used from maya
-2008 to write out bin files by reading particle data and converting
to RF bin files... directly without having to deal with this pdc
format !!! how could one get the per particle attributes ?? using
cmds.getAttr() command ?? or `particle -q ` would be better ?

thanks a ton again !! you lit my day !
-ashish
(drop me mail - if you want me to send py file)

Jason Porath

unread,
Jan 17, 2008, 4:52:57 PM1/17/08
to python_in...@googlegroups.com
Hi Ashish,

Yeah, we've tested the code several times, and are actually
abstracting it a little bit now. We're building a "rosetta" suite of
python files, to change from any particle file to any other (pdc->bin,
bin->pdc, pdc->rib, bin->rib, etc). We've tested it now on 32-bit OSX
and 64-bit Linux, and it works on both.

The one thing we found problems with was on 64-bit linux, the data
types being read in. 64-bit python uses double the memory space for
"double" data types, so we switched all the "double"s to "long"s, and
everything was fine.

We haven't done anything regarding ghostframes attributes yet, so that
hasn't been giving us any issues. I don't know if Maya 6.0's PDCs are
any different from Maya 8.5, but we doubt it.

We just change the header file to make it come in as liquid. The iType
variable (fluid type) is initially set as 1, which is "gas." If you
change it, it'll come in differently. We're bringing ours in as
"dumb," which doesn't seem to automatically get set inside of RF. We
haven't been able to get the files to simulate in RF yet (and probably
won't be able to as liquids), but we haven't tried very hard yet. We
are guessing we probably won't be able to, but that's okay -- we're
just going to use RF to mesh, mostly.

I haven't done speed tests, but I'm pretty sure that looping through
particles in Maya to spit out BINs would be slower than just
converting the PDCs straight away. I'd generally recommend writing out
the PDCs. It's easier to go back to see what the particles looked like
in Maya, just in case the conversion didn't work right.

I've got some weird internet issues that may prevent me from sending
files, but I'll try to send you what we're using.

-J

Jason Porath

unread,
Jan 17, 2008, 5:19:15 PM1/17/08
to Cosku Ozdemir, python_in...@googlegroups.com
We're writing out standard RIB output for particles, with a flag to
output as either RiPoints or RiSpheres.

-J


On Jan 17, 2008 2:08 PM, Cosku Ozdemir <coskuo...@gmail.com> wrote:
> Hey Jason,
> How are you doing the PDC-RIB?
> Are you just writing out RiPoints?
> Cheers,
>
> -c

ashishdantu

unread,
Jan 17, 2008, 11:04:23 PM1/17/08
to python_inside_maya
hii Jason,

i think there is some issue with windows ?? how can it work on OSX and
linux and not in windows !! ?? thats the only difference here right ?

can you pls send me (to ashis...@gmail.com) the working script you
have ? i'll test one of my pdc sequence and run the py file on a mac
we have here...

now coming to the point of getting it in as gas or liquid, yes, i also
see that we aint gonna run any simulations after this bin import into
RF ! just bring it in mostly for meshing ! but is it possible to emit
particles from this bin loader in RF ?? and is it absoluetly possible
for this bin sequence to behave as normal RF's particles ?? i havent
tried this so far !

""but I'm pretty sure that looping through - particles in Maya to spit
out BINs would be slower than just - converting the PDCs straight away
"" --- yes i agree to this point ! and the fact that this tools is
run independent of maya makes it even faster to churn out the bins !
we dont hav to open MAYA everytime !!

anybody who feels windows and OSX (as far as this py tool is
concerned) could make a differnce ??? if yes, what could they be ?
jason, awaiting your reply and py file :) wanna test it out and see it
work !!! (pdc->bin,> > > bin->pdc, pdc->rib, bin->rib, etc) !!
oOOOWWWw !! nice interplay of data !! i heard from RF's team once that
they are gonna work on a PDC to BIN plugin for maya , but when , no
one knows !

btw, i found PDC utils - http://visservices.sdsc.edu/software/maya/utils/pdc.php
>> where the source code adn PDC explanations are listed. Might be of
some help !

-ashish

On Jan 18, 6:19 am, "Jason Porath" <jpor...@gmail.com> wrote:
> We're writing out standard RIB output for particles, with a flag to
> output as either RiPoints or RiSpheres.
>
> -J
>
> On Jan 17, 2008 2:08 PM, Cosku Ozdemir <coskuozde...@gmail.com> wrote:
>
> > Hey Jason,
> > How are you doing the PDC-RIB?
> > Are you just writing out RiPoints?
> > Cheers,
>
> > -c
>
Reply all
Reply to author
Forward
0 new messages