[Bf-committers] Volumetrics Big update and questions

echelon at infomail.upr.edu.cu echelon at infomail.upr.edu.cu
Fri Aug 22 00:45:37 CEST 2008

Hi all

 Recently I implement some important features:

 1-full grid interpolation method for make sims in low resolution and then
render it in high resolutions (usefull in some cases since give smoothed
results) (fast time simulation)
 2-Velocity interpolation for calculate the velocity field in a lower
resolution grid and simulate the density/temperature field in a higher
resol field ( middle time simulation)

  the previous method where designed for those animations that don't need
a full fluid sim

 Along with the ¨physically based¨ sims I plan to integrate others
controls for non physical fluids or near-physical (useful in magical
smokes and fires or simple bizarre FXs)

 I also plan to implement a texture coordinates advection simulation for
integrate any blender 3D procedural texture/noise with the smoke and fire
sim and that way we could and any level of detail to the final simulation
 (this is relatively easy to implement since i´ve already done something
similar before)

 I also plan to implement ways to increment turbulence in flows ( vortex
particle algorithm may be)

And here comes the big good new:

 3-  Finally I could implement to some extent ray travel distance
detection, which means basically that now you have the option to
accurately calculate the light ray diameter inside any object, based
exactly in its shape. In the first build only where available a user
defined constant distance , that is useful for a limited range of effects
only. This feature will allow correct shell rendering as someone ask
before, correct volumetrics , and more important, will flatten the road
to volumetrics from particles like the one implemented in Lightwave !!

 The main limitation of the algorithm are  partially overlapped objects,
so I still need to research and improve it (there´s a way to know the
object that a ray hit in blender? with this I will solve this )

 4-implemented also a max distance top dynamically calculated for any
scene for those set up that will required it without manually enter it.


 As asked before the fluid sim where done entirely inside blender, I have
ported and rewrited the simulation in C for blender, I just need to find
a better place for it, Currently the simulator bake its result to a file,
and from there the render code fetch the values. I also need (once I
implement the previous features) to code its UI.

 There´s a lot of thing to do and also by the end of my vacation I will be
some days busy, but basically you now know my schedule for the coming

If I succeed in all of this, then I will go for the second test build :)


Now I have two important questions for the devs in order to keep the

1-As asked up , I need a way to know for a ligth ray intersecting a point
in an object the object that it belongs (it may be are easy, but I still
are unfamiliar with blender code)

2-for the ray travel code, I keep for each ray a global variable that
holds an alternated value of 0 or 1 with each interception (I know, I know
its the worst solution but for rapid prototyping...), but when I use more
than one thread, more that one ray are spawned are the same time and each
modified the variable on its own so the results are inconsistent, one
solution is create a variable for each thread, but since I don't know now
thread programming and where blender handle render threads, I need help in
this issue.

                                                 Thanks in advance
                                                 Regards Farsthary

More information about the Bf-committers mailing list