BF Windows 2006/02/27 : fluid sims updated

User-contributed CVS development builds. Please test and give feedback!

Moderators: jesterKing, stiv

lguillaume
Posts: 0
Joined: Tue Jan 04, 2005 10:25 pm

BF Windows 2006/02/27 : fluid sims updated

Post by lguillaume »

Hello new compilation.

NT has updated his fluid simulator:

Sorry for the big commit, but I've been fixing many of these
issues in parallel... So this commit contains: an update of
the solver (e.g. moving objects), integration of blender IPOs,
improved rendering (motion blur, smoothed normals) and a first particle
test. In more detail:

Solver update:
- Moving objects using a relatively simple model, and not yet fully optimized - ok
for box falling into water, water in a moving glass might cause trouble. Simulation
times are influenced by overall no. of triangles of the mesh, scaling meshes up a lot
might also cause slowdowns.
- Additional obstacle settings: noslip (as before), free slip (move along wall freely)
and part slip (mix of both).
- Obstacle settings also added for domain boundaries now, the six walls of the domain are
obstacles after all as well
- Got rid of templates, should make compiling for e.g. macs more convenient,
for linux there's not much difference. Finally got rid of parser (and some other code
parts), the simulation now uses the internal API to transfer data.
- Some unnecessary file were removed, the GUI now needs 3 settings buttons...
This should still be changed (maybe by adding a new panel for domain objects).

IPOs:
- Animated params: viscosity, time and gravity for domains. In contrast
to normal time IPO for Blender objects, the fluidsim one scales the time
step size - so a constant 1 has no effect, values towards 0 slow it down,
larger ones speed the simulation up (-> longer time steps, more compuations).
The viscosity IPO is also only a factor for the selected viscosity (again, 1=no effect).
- For objects that are enabled for fluidsim, a new IPO type shows up. Inflow
objects can use the velocity channels to animate the inflow. Obstacles, in/outflow
objects can be switched on (Active IPO>0) and off (<0) during the simulation.
- Movement, rotation and scaling of those 3 types is exported from the normal
Blender channels (Loc,dLoc,etc.).

Particles:
- This is still experimental, so it might be deactivated for a
release... It should at some point be used to model smaller splashes,
depending on the the realworld size and the particle generation
settings particles are generated during simulation (stored in _particles_X.gz
files).
- These are loaded by enabling the particle field for an arbitrary object,
which should be given a halo material. For each frame, similar to the mesh
loading, the particle system them loads the simulated particle positions.
- For rendering, I "abused" the part->rt field - I couldnt find any use
for it in the code and it seems to work fine. The fluidsim particles
store their size there.

Rendering:
- The fluidims particles use scaled sizes and alpha values to give a more varied
appearance. In convertblender.c fluidsim particle systems use the p->rt field
to scale up the size and down the alpha of "smaller particles". Setting the
influence fields in the fluidims settings to 0 gives equally sized particles
with same alpha everywhere. Higher values cause larger differences.
- Smoothed normals: for unmodified fluid meshes (e.g. no subdivision) the normals
computed by the solver are used. This is basically done by switching off the
normal recalculation in convertblender.c (the function calc_fluidsimnormals
handles other mesh inits instead of calc_vertexnormals).
This could also be used to e.g. modify mesh normals in a modifier...
- Another change is that fluidsim meshes load the velocities computed
during the simulation for image based motion blur. This is inited in
load_fluidsimspeedvectors for the vector pass (they're loaded during the
normal load in DerivedMesh readBobjgz). Generation and loading can be switched
off in the settings. Vector pass currently loads the fluidism meshes 3 times,
so this should still be optimized.

Examples:
- smoothed normals versus normals from subdividing once:
http://www10.informatik.uni-erlangen.de ... hnorms.png
http://www10.informatik.uni-erlangen.de ... vnorms.png
- fluidsim particles, size/alpha influence 0:
http://www10.informatik.uni-erlangen.de ... esnorm.png
size influence 1:
http://www10.informatik.uni-erlangen.de ... essize.png
size & alpha influence 1:
http://www10.informatik.uni-erlangen.de ... salpha.png
- the standard drop with motion blur and particles:
http://www10.informatik.uni-erlangen.de ... _t2new.mpg
(here's how it looks without
http://www10.informatik.uni-erlangen.de ... _t1old.mpg
- another inflow animation (moving, switched on/off) with a moving obstacle
(and strong mblur :)
http://www10.informatik.uni-erlangen.de ... t3ipos.mpg

Things still to fix:
- rotating & scaling domains causes wrong speed vectors
- get rid of SDL code for threading, use pthreads as well?
- update wiki documentation
- cool effects for rendering would be photon maps for caustics,
and motion blur for particles :)
(<= yes this can be very cool)

Downloads
7zip(2.21MB)
zip(2.96MB)
Last edited by lguillaume on Wed Mar 08, 2006 6:53 pm, edited 1 time in total.

womball
Posts: 0
Joined: Sat Nov 26, 2005 8:19 pm

Post by womball »

Are they actually considering adding photon maps? That would be sweet!
YAR!!!!

n_t
Posts: 0
Joined: Tue Jun 28, 2005 2:07 pm

Post by n_t »

womball: sorry, that was just me dreaming :) - for realisitic pictures, it would certainly be important, but it's not really easy to integrate a proper photon map support into the Blender raytracer... For the rest, it should be possible to render pretty cool fluids now with the hdr support, motion blur etc.

lguillaume
Posts: 0
Joined: Tue Jan 04, 2005 10:25 pm

Post by lguillaume »

N_T, thanks for fluids, it's great.
Now I view that you made some research in raytracing, photon, ... if there is another Google Summer of Code, have you thinking about integrating or making all thing you do in your research about raytracing?

Thanks for your project.

sahngwoo
Posts: 0
Joined: Thu Mar 02, 2006 8:23 am

"Sticky texures" is broken in this build...

Post by sahngwoo »

If I click on the "make sticky" button it doesn't "stick". The button text switches to "delete" from "make" in 2.4 but does nothing in blender20060227.exe.

And, If I open a .blend file that already has sticky textures set with 2.4 in blender20060227.exe, the "make sticky" button reads "delete" but the object does not render right. When I render it's quite obvious the sticky textures are all over the place.

Does anyone know if this is a known issue with the CVS version?

kmaro
Posts: 0
Joined: Thu Mar 02, 2006 7:00 am
Location: mauritius

Post by kmaro »

Compare your built with the one post by n-t jan 12,06, an animated obstacle
in your built take longer time to simulate and even a simple uv sphere falling in a cube (convert to fluid). And everytime I do a fluid simulation I got this error in the console:
Using Python version 2.4
/\: Invalid argument
And sometime when I render , it appear like this:

http://img208.imageshack.us/img208/9961/12mn.jpg

http://img208.imageshack.us/img208/4432/24qp1.jpg

*edited for fat-ass images - don't do that anymore, it kills machines*
1234567890

Caronte
Posts: 76
Joined: Wed Oct 16, 2002 12:53 am
Location: Valencia-Spain-Europe

Post by Caronte »

Please can you post a bigger image? :evil:
Caronte.
"Some Day, All Will Be Digital"
http://www.nicodigital.com

Bellorum
Posts: 0
Joined: Wed Jan 21, 2004 3:27 pm

Post by Bellorum »

Crashed Firefox for me! :evil:
There's no such thing as democracy. There's only the tyranny of one, and the tyranny of many.

poutsa
Posts: 0
Joined: Sat Jan 03, 2004 4:49 pm
Location: Munich (Germany)

Post by poutsa »

Kmaro.....Great Images!
But we must go to a Cinema Theatre to see your Exaple Images!!!
seeyA
:P

zupermonkey
Posts: 0
Joined: Tue Jul 06, 2004 1:13 pm

Post by zupermonkey »

kmaro wrote:I got this error
I can understand why you got an error.

kmaro
Posts: 0
Joined: Thu Mar 02, 2006 7:00 am
Location: mauritius

Post by kmaro »

Here is another one :?: :twisted:
Image
1234567890

lucky3
Posts: 12
Joined: Thu Oct 17, 2002 6:08 pm

Post by lucky3 »

Kmaro, i've also got these troubles with fluidsim. It seems it depends on the obstacle settings: try to enable 'Free' instead of 'Noslip'...

womball
Posts: 0
Joined: Sat Nov 26, 2005 8:19 pm

Post by womball »

How bout HDR images? Are they now supported in the blender internal renderer now? If so how do you add them and tweak the settings? I just learned how use HDRI in Maya, seems you have to use very light color gain to get it to blend in with the normal lighting.
YAR!!!!

lucky3
Posts: 12
Joined: Thu Oct 17, 2002 6:08 pm

Post by lucky3 »

I don't advise you to use HDRI so far, i get lots of render bugs when using OSA with transparent material. Anyway if you want to test it, just load an HDRI into the World Textures and enable Real and AngMap in the World settings.

n_t
Posts: 0
Joined: Tue Jun 28, 2005 2:07 pm

Post by n_t »

lucky3,kmaro: so you get fluid meshes that look like that, when you set the domain boundary to "noslip"? That looks really strange...

kmaro: did you compare 2.41 and test build bake times? how much is it slower? It shouldnt be any slower from what I changed...

lguillaume: no plans for next summer of code yet, but I might be busy finishing my phd around that time :)

Post Reply