Fluid Volumetric Lighting

dust's picture

damn video compression ruining my glimmering fluid light rays. ;(

so this patch is ridiculously difficult to get a good audio reactive render in realtime. although you may not see so well with the video. i seem if only pseudo to achieve fluid simulated lighting in 3d with qc...

(from vimeo:)

this is a fluid light simulation. the inspiration for this came from the peculiar way dust and light interact with each other... like when the early morning sun rays stretch across your room and you can see the dust particles floating around in ray fluidly ....

not entirely sure if i captured the essence of my intended inspirations. i like how the light washes in.... with occlusion. it is audio reactive as the audio is the end bit of a track i'm working on called "Rise Above"

the patch needs a bit cleaning and is a derivative of a dev patch so i'm not posting to the repo. hopefully someone can get some nice offline renders with this...

Rise Above.qtz319.26 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: Fluid Volumetric Lighting

Loads of leftovers on the Editor stage :-) •~ Audio Interaction ? Two words - Smooth patch [Smooth patch is your friend].

Difficult to say just what is meant to be happening here, despite the video, as you've got a lot of un-transported assets required [meshes].

Even so, this runs quite smoothly and audio reacts straight out of the box after the addition of a Smooth patch between the Peak and the receiving ports.

The 2D Fluid Simulation needs a whole lot of careful handling IMETD. Of all the Developer OpenCL examples, it is the one that has borne more crashes than interesting fruits *:-)** .

I think it would suit a slowly rising ambient track, it shortly whited out when presented with hits of the 60's, but blossomed forth nicely with same meaty, beaty diet when showing the velocity field.

Whenever I've been building out of or on top of a given example, especially a complex one like the 2D Fluid Simulation, I usually find I help myself by rebuilding from the ground up, using only the specific components required .

dust's picture
Re: Fluid Volumetric Lighting

hadn't got to messing around with the smoothing yet. i have various iterations that flow much smoother. this patch was tuned specifically to a particular song and it was my intention to have two very different speeds driven by the peak amplitude so when the chorus was rocking you would be able tell a difference in speeds.

alternatively it is a lot harder than one would think in the itunes overall peak amplitude context, where as normally i would be using separate multi tracked out audio files instead of a master mixdown but was getting lazy and using soundflower.

yeah this patch is an old cl dev example not sure if its the updated version. either way....the file worked on 10.6 but had since stopped working so i resurrected it a bit.

the original file was very cool thats why i went back to look at now that i have learned a bit about CL. there is a ton of stuff that originally was never hooked up, plus all the mess i unhooked. didn't get around to clean it up etc... just wanted to share the screen shot. thought maybe i should post the file as well.

i put it to the side for a bit as my system can barley handle the audio reaction in realtime while screen recording.

i might be able to get some nice quartz builder renders though ?

cybero how would you suggest the smoothing ?

do you think its better to smooth out the amplitude before it is interpolated or after or both ?

there is a little multi plexor by the audio input. if you delete this everything will be smooth. like i said i was trying to get a disparity between the chorus and verse which is not shown in the video.

cybero's picture
Re: Fluid Volumetric Lighting

I think that once you've sorted out an appropriate and effective pipeline comp, you should offline render the item . I can see though why you'd prefer to record the screen. I'd use QC and a File Input patch. Smoothing is something that can be appropriated obviously enough with the smooth patch, by scripting and also by judicious use of the maths patches, at least in terms of ranging.

The level of smoothing that works best is often as not a matter of experimentation, although for a whole lot of rock, r and b, etc, time of 10 and a quadratic interpolation works pretty well.

Sometimes one wants raw data, but what works well by means fo being instantly represented - like a spectrum wave, looks dreadful when applied to a large images positions.

Smoothing does 'average' out the data, sometimes what one actually needs is less of the data and more data handling, smoothing does that after a fashion, but it is not the only solution. It does work well enough though.

The good thing about using the audio tools is that it gives you several different structures to get data from and the different ways of smoothing will produce results that work better with certain types of visualizations than others.

Looks an interesting concept.

I think your rendering problems would be best addressed by offline rendering the composition in Quartz Crystal.

cybero's picture
Re: Fluid Volumetric Lighting

Come to think of it, if I had a timelined or stop watch triggered composition, then I think screen recording it would be the best.

You use Screenium, don't you?

I think that supports H.264 and otherwise has its own codec[s] too, but H.264 is what Vimeo loves and would probably save you a load of blues.

Then the audio, I think I'd mute the audio input into Screenium, that might speed up its recording of the graphics achieved.

dust's picture
Re: Fluid Volumetric Lighting

I have been trying various different settings. I found with screenium its best to keep it set to no compression at all as it takes a little more overhead to compress into h264 while recording. the actual screenium capture doesn't look that bad. i will have to join vimeo as it took an hour for vimeo to compress the video. I do not record enough patches to know the best format for vimeo yet. I'm thinking a crystal render should be able to get some HD fluid renders. so maybe the route would be to add the audio file to the project and record all the peak amplitude numbers into a time stamped structure or plist. then use that list to drive the animation. in hopes everything lines up when I put it back together. whats your experience with kineme audio tools and quartz crystal ? I have only used crystal a few times. the first time I got stuck on a 12 hour render which defeats the purpose of qc for me being real time but I have got the settings down in think now. I just take it easy on the spatial and blurring end everything hums along.