[Bf-committers] Re: [Bf-blender-cvs] CVS commit: blender/source/blender/render/intern/source texture.c
Ton Roosendaal
bf-committers@blender.org
Sat, 10 Jan 2004 16:57:34 +0100
Hi,
Uhh, I really tried to be very down to earth! :)
The old normal code, just used the 'intensity' value coming from the
texture (1 number) and rotated the normal a bit around with that.
Pretty fake results, but it's something.
Now it takes 4 samples in the texture, with small offsets, and uses
these samples to calculate a normal:
n[0]= sample1 - sample0;
n[1]= sample2 - sample0;
n[2]= sample3 - sample0;
Much more scientific, but slower...
The small offsets (in 3d space) is called a nabla vector. Is used in
particles too, to define 3d motion for particles through texture space.
Trick is to find the right size for the nabla, which here is just
choosen constant.
-Ton-
On Saturday, Jan 10, 2004, at 15:19 Europe/Amsterdam, Alexander Ewering
wrote:
>
> On Sat, 10 Jan 2004, Ton Roosendaal wrote:
>
>> ton (Ton Roosendaal) 2004/01/10 13:41:47 CET
>>
>> Modified files:
>> blender/source/blender/render/intern/source texture.c
>>
>> Log:
>> Improved method to calculate normals for procedural textures such as
>> Marble, wood, clouds. Instead of the retarded (but faster :) old
>> method
>> it now derives the normal based on displacement of a 'nabla' vector;
>> sampling the texture additionally with three little offsets in x, y
>> and z.
>
> What is the actual advantage of this modification in clear
> words understandable to a non-physician like me? :)
>
> | alexander ewering instinctive new media
> | ae[@]instinctive[.]de http://www[.]instinctive[.]de
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton@blender.org
http://www.blender.org