AWS Thinkbox Discussion Forums

sand/star sparkle

I am sure this question has been asked a thousand times. whenever I look at great examples of krakatoa renders of sand or stars there is a cool sparkle effect that I can never seem to achieve. The texture map method seems to work great on static particles of a prt volume but what if you have the particles moving? When the particles move the texture map is static and so it kinda swims through the map so you don’t get the glitter or sparkle flowing along with the particles. How does one go about getting a cool sparkle or glitter effect with krakatoa with moving particles?

Thanks guys.

Cheers, Christian

Actually, it has not been asked a thousand times. Not sure if I have seen it even once…

To answer your texturing question, Krakatoa can look up a texture based on UV coordinates (where the particle’s point corresponds to a single texel in the bitmap or procedural map). If the UV coordinate does not change over time, a moving particle will retain the same texel value and won’t “swim” through the texture. The “swimming” is usually a result of using either object or world space coordinates (the position of the particle itself, either relative to the object’s local origin, or to the world origin).

If the particle’s position must be used (because it is required by the type of texture or the type of effect - see video below), you would need to generate a consistent channel between frames where moving particles retain their “birth-time position” value over time in a new channel. We first introduced the Krakatoa Birth Channel generator in Krakatoa for Cinema4D two years ago, and in the mean time it has become part of Krakatoa MX, too (starting with v2.5). Basically it can take an existing PRT sequence, and generate a new channel on all frames that contains the position of the particle on a reference frame (typically the birth frame of the particle). This can also be applied to any other channel, not just Position. Here is a video that shows how it works: youtube.com/watch?v=GmIuFIT1PSY&t=8s

Regarding the actual sparkle, there is a neat trick to create actual gradual changes in the brightness of particles. If a particle has a Normal channel (if it is coming from Particle Flow, we would assume the X axis of the particle to be the Normal), and you are using the Phong Surface shading mode of Krakatoa, you can think of each particle as of a tiny sub-pixel sized flat mirror that bounces light back into the eye depending on its orientation, and the light and camera positions. If you move your camera around, the specular highlight of the particle will change depending on the angle between the Normal, the Light and the view vector connecting the camera to the particle. Now if you add a SPIN to the particle so it turns about some axis over time (easy to do in Particle Flow or Thinking Particles), then the Normal will be spinning over time even if the particle, the light and the camera are not moving at all. And if the period of the spin is different for each particle, you would get a randomly sparkling cloud of particles!

A similar effect could also be achieved using Magma - you could perform a similar calculation using the particle’s Normal and the relevant light and camera positions, and manipulate channels like Color, Emission, Density etc. as a function of the changing angles (in this case, it would be easy to use both the Normal and the negative Normal to produce a two-sided reflector instead of the Phong Surface shading single-sided one that needs to spin 360 degrees to repeat a sparkle.

Hope this gives you some ideas…

Bobo, Thanks again for your invaluable direction. I tried the sparkle method of rendering phong shading with the particle normals and I seem to be getting a glitch with the phong shader. I attached an mov so you can see what I am talking about, there seems to be a glitch halfway through. I am sure its the phong shading because when I render an isotropic shader I don’t get the glitch. I also attached a reference vid for you to see so that you can see the result that I am going for with all this, specifically the look of the sparkle in the green ink. Thanks again.

Cheers
Christian
INK DROPSRef_clip.mp4 (11.1 MB)
glitter_glitch_phong.mov (8.51 MB)

I am not sure there is a glitch. Rather, it appears that your particles have the same uniform spin, thus producing light and dark areas depending on which way the normals are pointing.

Of course, now that you showed a reference, the spinning particles trick is not what you are after. But I made two simple videos of a Particle Flow from a Geosphere with Uniform Spin at 360 degrees per second about the World X Axis, compared to totally Random 3D spin 720 degrees per second and 180 degrees/sec variation.
As you can see from these videos, uniform spin makes the surface appear to be turning around (but it is the normals that are spinning at each particle, nothing else is moving).
uniformspin.mov (2.51 MB)
The random spin produces sparkles like on some Christmas ornaments…
randomspin.mov (10.2 MB)

What you probably need is getting normals from either the gradient of the FumeFX field density (the PRT FumeFX object can generate normals from a FumeFX sim, and you could steal those normals using Magma from the nearest particle), or from the surface of a Frost mesh made from the particles, and then adding some variations using a texture map’s Perturbed Normal value added to the normal to produce a bump map effect.
I will play with that and see if I can show you some ideas…

Thanks Bobo, I tried using the normals from Frost with a noise texture map added and I got the attached result, which I think is pretty good.

I want to try the FumeFX prt method that you suggested but I keep getting this error when I make a Fume PRT from my Fume grid:

ERR: fumefx_particle_istream::load_voxels() - Failed to load the FumeFX voxel data from:
ERR: “\vfxisilon\ifs\SFX_SERVER\FILM\2016_1220_0216\FumeFX002_0099.fxd”

Any ideas on why I would be getting this error? I am using FumeFX 4.0.4 with Krakatoa 2.5.1 in Max 2016sp3. Maybe a wrong setting in FumeFX?

I would love to see any ideas that you came up with as well. Thanks again!

Cheers,
Christian
lookdev_v01.mov (13.9 MB)

thinkboxsoftware.com/krakato … e-log.html

FumeFX 4.0.4 required another recompile of Krakatoa, so you need at least 2.5.2, or 2.6.1.

Privacy | Site terms | Cookie preferences