|
|
Hi People,
I've wrote a little script that converts Max-particle to Povray-Arrays.
You need to follow a view rules to use it:
- Use only triangles as particles in Max (so only use particle-systems, able for
you to chose the type of particle)
- best is to scale the particle down to zero-units, so every triangle of the
particle is in the same place. (the result then in PovRay is exactly the same
positon of each particle then)
In this example XVid .avi-file I used a blob object + a sphere for each
particle, using random radius (same seed for the spheres and the
blob-components)
here the max-script:
################################################################################
basename = getSaveFileName caption:"Basename"
if(basename != undefined)then
(
scale = 1
for frame = animationrange.start to animationrange.end do
(
filename = basename + "_" + frame as string + ".inc"
output_file = createfile filename
at time frame tmesh = snapshotAsMesh selection[1]
format "#declare blb=array[" to:output_file
format "%]\n" (tmesh.numverts/3) to:output_file
for v = 1 to tmesh.numverts/3 do
(
vert = getVert tmesh (v*3)
format "#declare blb[%]=<%,%,%>;\n" (v-1) (vert.x*scale) (vert.y*scale)
(vert.z*scale) to:output_file
)
close output_file
)
)
################################################################################
Post a reply to this message
Attachments:
Download 'blob.avi.dat' (4091 KB)
|
|