fume Fx & Normal

HI guys,i was wondering if it’s possible to cache normal from FumeFX fluid,i tryed ouputting all channel from FumeFx and i checked the normal when exporting the particle to PRT format ,but once i look at the normal data it’s all black.
if any one can tell me how to generate the normal from Fume Fx that would be useful ,also if their is a way to use magama flow to generate normal channel like using the dot product between the camera and the pointPosition of each point,but i think that magma flow can’t deal with camera data for know.
any idea i appreciate.
thx

AH you posted at CGtalk to, I replied there as well.

AFAIK, FumeFX CANNOT generate Normals indeed.

A Normal in Krakatoa is just the local X axis of the particle, and since FumeFX doesn’t even have particles when rendering directly in Krakatoa (we take the voxel as particle), there is nothing to grab from the FumeFX channels. Specifying “Normals” in the Krakatoa Channels rollout when saving does not mean actual normals will be saved unless the source object provides them.

Generating normals from a FumeFX cloud is not very straight forward. When we were doing G.I.Joe, at a certain point we used a PRT Mesher (not included in Krakatoa yet) to generate a low-res. mesh based on some base particles from our own PFlow clouds, then we would steal the normals of that blob into the particles inside. In theory, we could create a level set out of the FumeFX voxel field and steal the normals from it, but I am not sure what the technical implications might be. We were also considering the automatic generation of normals using a similar approach to what we used on G.I.Joe but transparent to the user. Unfortunately, it did not make it into 1.5.x and I don’t know if it will in the future.

If we would provide the PRT Mesher or some form of MagmaFlow nodes that could generate normals based on particle density gradients for example, it would make it easier.

But FumeFX’s voxels could be used to generate normals based on the gradient, no? Meaning, you just evaluate the gradient of the density (smoke?) and do trilinear sampling for each particle.

  • Chad

I love the word “just” in the above sentence. :slight_smile:

But you have access to the FumeFX density values in the voxels, right? A simple 3D kernel or central differences could be performed on that with maxscript if you wanted to. I’d have to check to see how FumeFX formats the data, but if it’s a uniform grid, it should be pretty easy.

EDIT: Seems theres even a global variable to sample adjacent voxels in XYZ. I don’t have time to make some sample volumes, but I’ll try to take a crack at it later.

actualy i was looking to a similar way on using maxscript that loop over the voxel and calculate the normals,i know it’s not a just .but i’m not an expert of Maxscript for this days.maybe i will go for it soon

What do you want the normals to be based on? Can you make a simple dataset for testing? The techinques I’m thinking of aren’t any different from what I’ve already been using with voxel datasets, I just haven’t tried making one out of FumeFX before, but it’s something I’m interested in.

i’m guess world normal Coordinate should serve the need,what i’m look for is shade the fumeFx simulation to be render us a solid think object,like if u mesh it for example,it’s still limited in terms of shading but u can render with krakatoa using a phong model and an envligthing for the reflection.
after all we can translate the normal to be relative to the camera or to the world.