Blender Git Commit Log
Git Commits -> Revision 8056705
September 28, 2008, 08:00 (GMT) |
* Volumetrics Removed all the old particle rendering code and options I had in there before, in order to make way for... A new procedural texture: 'Point Density' Point Density is a 3d texture that find the density of a group of 'points' in space and returns that in the texture as an intensity value. Right now, its at an early stage and it's only enabled for particles, but it would be cool to extend it later for things like object vertices, or point cache files from disk - i.e. to import point cloud data into Blender for rendering volumetrically. Currently there are just options for an Object and its particle system number, this is the particle system that will get cached before rendering, and then used for the texture's density estimation. It works totally consistent with as any other procedural texture, so previously where I've mapped a clouds texture to volume density to make some of those test renders, now I just map a point density texture to volume density. Here's a version of the same particle smoke test file from before, updated to use the point density texture instead: http://mke3.net/blender/devel/rendering/volumetrics/smoke_test02.blend There are a few cool things about implementing this as a texture: - The one texture (and cache) can be instanced across many different materials: http://mke3.net/blender/devel/rendering/volumetrics/pointdensity_instanced.png This means you can calculate and bake one particle system, but render it multiple times across the scene, with different material settings, at no extra memory cost. Right now, the particles are cached in world space, so you have to map it globally, and if you want it offset, you have to do it in the material (as in the file above). I plan to add an option to bake in local space, so you can just map the texture to local and it just works. - It also works for solid surfaces too, it just gets the density at that particular point on the surface, eg: http://mke3.net/blender/devel/rendering/volumetrics/pointdensity_solid.mov - You can map it to whatever you want, not only density but the various emissions and colours as well. I'd like to investigate using the other outputs in the texture too (like the RGB or normal outputs), perhaps with options to colour by particle age, generating normals for making particle 'dents' in a surface, whatever! |
Commit Details:
Full Hash: 8056705ae9b2467a013f2372c0579687d3723229
SVN Revision: 16779
Parent Commit: c301a05
Lines Changed: +391, -94
2 Added Paths:
/source/blender/render/intern/include/pointdensity.h (+43, -0) (View)
/source/blender/render/intern/source/pointdensity.c (+195, -0) (View)
/source/blender/render/intern/source/pointdensity.c (+195, -0) (View)
14 Modified Paths:
/source/blender/blenkernel/BKE_texture.h (+6, -0) (Diff)
/source/blender/blenkernel/intern/material.c (+0, -2) (Diff)
/source/blender/blenkernel/intern/texture.c (+47, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+5, -2) (Diff)
/source/blender/blenloader/intern/writefile.c (+1, -0) (Diff)
/source/blender/makesdna/DNA_material_types.h (+2, -6) (Diff)
/source/blender/makesdna/DNA_texture_types.h (+30, -0) (Diff)
/source/blender/render/intern/include/renderdatabase.h (+0, -2) (Diff)
/source/blender/render/intern/include/render_types.h (+0, -11) (Diff)
/source/blender/render/intern/source/convertblender.c (+9, -9) (Diff)
/source/blender/render/intern/source/renderdatabase.c (+0, -15) (Diff)
/source/blender/render/intern/source/texture.c (+4, -0) (Diff)
/source/blender/render/intern/source/volumetric.c (+1, -34) (Diff)
/source/blender/src/buttons_shading.c (+48, -13) (Diff)
/source/blender/blenkernel/intern/material.c (+0, -2) (Diff)
/source/blender/blenkernel/intern/texture.c (+47, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+5, -2) (Diff)
/source/blender/blenloader/intern/writefile.c (+1, -0) (Diff)
/source/blender/makesdna/DNA_material_types.h (+2, -6) (Diff)
/source/blender/makesdna/DNA_texture_types.h (+30, -0) (Diff)
/source/blender/render/intern/include/renderdatabase.h (+0, -2) (Diff)
/source/blender/render/intern/include/render_types.h (+0, -11) (Diff)
/source/blender/render/intern/source/convertblender.c (+9, -9) (Diff)
/source/blender/render/intern/source/renderdatabase.c (+0, -15) (Diff)
/source/blender/render/intern/source/texture.c (+4, -0) (Diff)
/source/blender/render/intern/source/volumetric.c (+1, -34) (Diff)
/source/blender/src/buttons_shading.c (+48, -13) (Diff)