Particle Filling sample scene ?

Ah, ok I see… thought as you said it rendered for you, I might just use the scene :wink:

interesting, that prt and bin of the same file generate so different amounts of particles, right ?

EDIT, obviously, its not quite the same, the scaling seems to make the difference here. Makes sense.

Thanks Conrad :wink:

I tried a simple scene, exported with Krakatoa Python build, and i’m trying to use the multiply particles feature (i can’t use nParticles because what i’ve said in the other post)

I get the scene correctly rendered, but i don’t get the particles multiplied.

here is the code, it’ differs from the exported one because i modified it with some of the code that is post in the first page of this thread:

#==============================================================
# Krakatoa SR Scene File 
# Exported from Autodesk Maya 2012
# Exported on 2012/08/07
#==============================================================
# Source Scene Path : 
#==============================================================

from datetime import datetime
import KrakatoaSR
KrakatoaSR.SetLoggingLevel( "stats" )
KrakatoaSR.SetDtexLibraryPath( "libprman.dll" )
ri = KrakatoaSR.Ri()

ri.Option( "render", "UseEmissionColor", True )
ri.Option( "render", "UseAbsorptionColor", True )
ri.Option( "render", "AttenuationLookupFilter", "Bicubic" )
ri.Option( "render", "DrawPointFilter", "Bilinear" )
ri.Option( "render", "DensityPerParticle", 0.25 )
ri.Option( "render", "DensityExponent", 1 )
ri.Option( "render", "DepthOfFieldSampleRate", 0.1 )
ri.Option( "render", "RenderingMethod", "particle" )  
ri.FrameBegin( 36 )
ri.Format( 640,480,1 )
ri.Display( "../OUTPUT/_0036.jpg", "file", "rgba" )

#==============================================================
# CAMERA [|persp]:
#==============================================================
ri.Projection( "perspective", "fov", 42.18460242 )
ri.Transform(
	0.1495353434,-0.3694080606,-0.9171569472,-0,
	-4.163336342e-017,0.927586375,-0.3736087753,0,
	-0.988756381,-0.05586771653,-0.1387069472,-0,
	0.9534742717,-8.272698409,27.74175509,1
)

ri.WorldBegin()

#==============================================================
# SCENE LIGHTS:
#==============================================================
ri.AttributeBegin()
ri.Transform(
	1,0,0,0,
	0,1,0,0,
	0,0,1,0,
	0,12.07006976,5.25240148,1
)
ri.LightSource( "pointlight", "pointLightShape1",
	"Flux", (12.56636,12.56636,12.56636), 
	"DecayExponent", 0, 
	"ShadowsEnabled", False )
ri.AttributeEnd()
ri.Illuminate( "pointLightShape1", True )

#==============================================================
# PARTICLE OBJECT [particleShape1] AS PRT:
#==============================================================
ri.AttributeBegin()
ri.ChannelOperation( "Set", "Color", (0.5,0.5,0.5) ) 
ri.ChannelOperation( "Set", "Emission", (0,0,0) )
ri.Transform(
	1,0,0,0,
	0,1,0,0,
	0,0,1,0,
	0,0,0,1
)

ri.Option( "pointsvolume", "VoxelSpacing", 0.05 )  #tweak this
ri.Option( "pointsvolume", "VoxelSubdivisions", 0 )
ri.Option( "pointsvolume", "Jitter", True )
ri.Option( "pointsvolume", "JitteredParticlesPerVoxel", 1 )
ri.Option( "pointsvolume", "RandomSeed", 42 )
ri.Option( "pointsvolume", "NumDistinctRandomValues", 1024 )
ri.Option( "pointsvolume", "WellDistributedJittering", False )
ri.Option( "pointsvolume", "ParticleRadius", 0.5 )  #tweak this

ri.PointsFile ( "../PRT/particleShape1_0036.prt")
ri.AttributeEnd()

#==============================================================
t0 = datetime.now()
ri.WorldEnd()
t1 = datetime.now()
print (t1-t0)	
ri.FrameEnd()

And here is the rendered result of this code:

_0036.jpg

Some ideas?

Cheers.

You will need to use:

ri.PointsVolume( "../PRT/particleShape1_0036.prt")

if you want that prt to represent a volume instead of a set of points.

EDIT: The above no longer works. ri.PointsVolume no longer takes PRT files. It will only take mesh files. To get a volume from a PRT file, use the new “ri.ParticleMultiplication” function.

For the last couple of hours I’ve been struggling to get KrakatoaSR to render anything but the fractals example_scene.py. Whenever I try to render one of my own prts I only get a black frame. Luckily I found this thread with Tyler’s and Conrads example scene.
Because Cinema 4d kept on crashing when using voxel rendering I took it back a step and rendered from the command line. Unfortunately now I get this error message:

RuntimeError: slice_container_impl::reset() - Channel #3 is not a float32 channel and not supported by the voxel renderer

To specify, I’m using the script from the second post in this thread with the ‘Circle05.prt’ that Tyler supplied. I inspected the prt and third channel is actually a force vector in float32 (No idea, if that’s actually relevant :smiley: ).
ATM I really have a hard time to get a “foot in the door” with Krakatoa, because nothing I try yields any results. Maybe someone could supply me with a working setup, that I can use as a starting point. This would surely make my life a lot easier :smiley:

There are many possibilities as to why your renders are rendering black.

Perhaps some things to check:
-Are there lights in your scene?
-Do the particles have a “Color” channel that is all zeros? No “Color” channel will default to white.
-Do the particles have a “Density” channel that is all zero? No “Density” channel will default to 1.0.
-Do you get anything in the alpha channel of our output image? If there are no lights, you may still see things in the exr alpha channel.
-Do you have “use emission” on (useful for no lights case, like the sample_scene.py)? If so, do the particles have an “Emission” channel that is non-zero?
-Is your “DensityPerParticle” + “DensityExponent” setting non-zero?
-Might be too obvious, but are the camera and lights pointed correctly at the particles? If it is, and you have non-zero density, you should always see particles in the alpha channel.
-Try your tests in “particle” for “RenderingMethod” instead of “voxel” mode. If your in voxel mode, bad voxel setting can produce black images.

I have attached a sample scene that shows how to use lights and PRT files. It has:
-One light (direction light right in front of the camera).
-One PRT file (Circle05.prt)
test_scene.zip (929 KB)

Hi Conrad!
Your test file works like a charm. I still have no idea, why this works and the all the other scripts don’t, but at least this is a starting point to investigate.
I’ll have a look at your Do-and-Don’ts list and hopefully I can figure it out.
In any case, thanks a million for taking the work of setting this up for me!