New feature: "Stress" texture input channel
authorTon Roosendaal <ton@blender.org>
Thu, 8 Dec 2005 22:05:42 +0000 (22:05 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 8 Dec 2005 22:05:42 +0000 (22:05 +0000)
commitc492729b3a0d52ae01ee67e5ad92bdb02f6585df
tree4e83439d1aed0a943c0abe44ceaf8d9b72f8f7e2
parent13d638c8b8975db9faccb50774e68b84cd0d132b
New feature: "Stress" texture input channel

(As usual movies disappears after while)

Face example showing stress values on a blend. White is stretch, black
is squeeze
http://www.blender.org/bf/0001_0014.avi

Quick test with softbody stretch
http://www.blender.org/bf/0001_0100.avi

Based on the difference of the "Orco" (original undeformed coordinate)
and the actual render coordinate, a stress value is computed to make
textures react to stretching or wrinking skin.

The texture coordinate is neutral (0) on relaxed state. -1 is squeezed
to zero, +1 is stretched to infinity.
Note that scaling (object itself or parent) also will result in
stress values.

The reason for the huge commit is a cleanup in allocating memory for
the vertices. These were growing too large with new options, so now it
allocates the optional coordinates dynamically.
Saves about 20 MB memory per 1M vertices already. But best of all is that
I now can add much more fun... so tangents, here we come!
14 files changed:
source/blender/blenkernel/intern/material.c
source/blender/makesdna/DNA_material_types.h
source/blender/radiosity/intern/source/radrender.c
source/blender/render/extern/include/render.h
source/blender/render/extern/include/render_types.h
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/renderHelp.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/texture.c
source/blender/render/intern/source/zbuf.c
source/blender/renderconverter/intern/convertBlenderScene.c
source/blender/src/buttons_shading.c