Blending shaders by velocity


#1

I remember seeing a video somewhere showing a RealFlow mesh being rendered with both a transparent water shader and a foam shader that were being mixed based on the meshes velocity.
Sorry, I can’t recall what it was or who made it but I hope someone here understands what i’m getting at.

I was thinking that a velocity pass could be rendered and converted to a greyscale image that could be used to blend the two but…

Would there be some way to maybe bring the particles into Max with Krakatoa and mesh with Frost while somehow piping the velocity info into a shader so that it could all be done without leaving Max or having to make new maps if there were changes made to the camera?
I don’t know much about Frost or how it generates UVs…
Is this even feasible?


#2

Just to add…
I’ve read the Frost page at the Thinkbox site:

It also demonstrated how the velocity information can survive a round-trip from source particles through FROST mesh to PRT Volume particles and produce correct Motion Blur in Krakatoa, and also how the MagmaFlow operators could be used to create advanced rendering effects by providing user-defined velocities.
Another example was shaded using vertex color…
It’s 5:30am here and I haven’t slept yet; maybe that’s partially to blame for this making my head hurt.
Me thinks i’ll revisit this when i’m rested. :wink:


#3

You don’t need UVs if you’re gonna render with Krakatoa. You can get the prt in the loader, then use a KCM to normalize the velocity and use the normalized one to map the color to a gradient, RGB is good for comping :slight_smile:


#4

To quote the current POTUS, “Yes, You Can!” :slight_smile:

Possibly the best approach would be:
*Create a PRT Loader and get the RealFlow particles in.
*Add a KCM to the PRT Loader, get the Velocity channel, get the Magnitude, divide by the Max. Velocity (where the value would be white), then convert back to Vector and output as ANY Mapping channel (e.g. Mapping 2).
*Create a FROST object out of the PRT Loader - it will extrapolate the vertex mapping channels based on the particle mapping channels.
*Assign a Blend material to the FROST and set the 3rd (control map) slot to Vertex Color map. Pick the Mapping channel used in the KCM and you will get the top material where the value is black and the bottom material where white, with the two blended where the value is between 0 and 1.

Here is some additional reading:
http://forums.thinkboxsoftware.com/viewtopic.php?f=89&t=4932


#5

Sorry, maybe that wasn’t explained well in my zombie like state. :smiley:
It would ultimately be a Frost mesh rendered with Vray.

I’m gonna give this a try.
This is extremely cool stuff you’re doing over there at Thinkbox!
Thanks Bobo! :buttrock:


#6

One more thing to play with after F-day :slight_smile:

P.S.: POTUS?! :smiley: Alright :smiley:


#7

Just an FYI :slight_smile: I think you may be referring to Yuval’s work: (aka PixelPro)

http://vimeo.com/25209359

The blend medium used is Vorticity ;), although I don’t see why velocity wouldn’t work too.


#8

PITASS IMHO :smiley:

Nope, wasn’t him.
I believe he’s rendering the vorticity info with Krakatoa and comping it with a RFRenderKit water mesh in that example.
I can’t for the life of me remember who inspired the idea to use Frost.
I believe it was actually a guy using Softimage.

Anywho…
I’m getting really nice results with an anisotropic mesh and a blend material.
I’ll try and get a decent example video up soon.


#9

oh Snap! now I’m curious.

Yes, Yuval was comping a krak pass and a rfrk mesh, he had a nice explanation somewhere (can’t find it, and not the rf vorticity tut but the actual full process)


#10

Here’s the result if you happen to be curious. :smiley:
http://www.vimeo.com/26863705
It’s not super obvious because there are velocity & vorticity based particles in the comp as well but the subtle change in the mesh was worth it in my opinion.

Thanks again!


#11

Hey cool, it has some swirly action, nice :slight_smile:


#12

Thanks.
Yeah, the environment mesh is raised slightly on the the end so it catches the flow a bit and creates a nice little swirling pool. :smiley:


#13

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.