[Bf-committers] cloud/marble/wood bump patch

car bf-committers@blender.org
Sat, 10 Jan 2004 18:26:02 -0500

All of this. Is it the method to create Normal mapping ? Or something 
close ?
All I know of is that bump mapping does it's thing in the z axis, so at 
the corners of the mesh the bump detail falls off and loses it's charm. 
While Normal mapping does it's thing on all axis's x,y,z,

And this part I was told to do in the source.

In source/blender/blenkernel/intern/image.c,

if (tex->nor) return 3;
else return 1;



return 1;

at line 711 and line 1485.
This will of course, make all .blends that use bumpmaps render 
incorrect - you have to set No RGB in material buttons to get back to 
bump maps.

But I do not have a good normal map to test yet.

I had thought that during the displacement render that the displaced 
mesh could then have it's detail extracted and made into a normal map.  
So then whatever Ton and eeshlo are doing here could be used for the 
extra fine details into blender.

Or would Blenders renderer need a re-justment ?

On Jan 10, 2004, at 1:09 PM, bf-committers-request@blender.org wrote:

> Message: 1
> Date: Sat, 10 Jan 2004 13:37:21 +0100
> Subject: Re: [Bf-committers] cloud/marble/wood bump patch
> From: Ton Roosendaal <ton@blender.org>
> To: bf-committers@blender.org
> Reply-To: bf-committers@blender.org
> Hi,
> Excellent work. This is the correct way, to derive the 'nabla' for
> displacement. :)
> It's OK to provide such a patch here, this is code I like to keep track
> of anyway. I will commit it with one little change, and that is
> changing the #define b_ofs to uppercase, as defines usually are in
> Blender code.
> Another note; what kind of text editor you use for code? The patch
> contains noise... your editor seems to replace emtpy lines with
> something else. Do you have your editor by default on UNIX end-of-line
> style?
> Thanks,
> -Ton-
> On Saturday, Jan 10, 2004, at 00:25 Europe/Amsterdam, Alfredo de Greef
> wrote:
>> Here is a small patch to be able to do correct(?)
>> bumpmapping for the cloud/marble and wood textures.
>> This breaks or at least changes displacement
>> behaviour, so if this is going to be included, this
>> should be looked after. Anyway, nothing major, but I
>> was told that some might still find this useful.
>> I don't know if I have commit rights for this or for
>> that matter still don't even know how to commit
>> (without causing 'disasters') so I just send it as a
>> patch.
>> Alfredo
>> __________________________________
>> Do you Yahoo!?
>> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
>> http://hotjobs.sweepstakes.yahoo.com/signingbonusIndex:
>> ./source/blender/render/intern/source/texture.c
>> ===================================================================
>> RCS file:
>> /cvsroot/bf-blender/blender/source/blender/render/intern/source/
>> texture.c,v
>> retrieving revision 1.7
>> diff -u -r1.7 texture.c
>> --- ./source/blender/render/intern/source/texture.c	7 Jan 2004
>> 20:29:21 -0000	1.7
>> +++ ./source/blender/render/intern/source/texture.c	9 Jan 2004
>> 23:16:38 -0000
>> @@ -173,7 +173,7 @@
>>  void end_render_texture(Tex *tex)