DGL
https://delphigl.com/forum/

bummapping
https://delphigl.com/forum/viewtopic.php?f=19&t=2450
Seite 1 von 1

Autor:  noeska [ Fr Jan 30, 2004 19:37 ]
Betreff des Beitrags:  bummapping

I found this tutorial on bumpmapping: http://www.paulsprojects.net/tutorials/ ... ebump.html

It also shows how to use your existing opengl lights (only one)

Autor:  Sascha Willems [ So Feb 01, 2004 12:11 ]
Betreff des Beitrags: 

I've discovered that tutorial some months ago and already implemented that bumpmap-technique both on the torus that's shown in that tutorial and on MD3-Models. If there is interest, I'm going to release the source.
But it's no competition for bumpmapping with a shader, since you have to do at least two passes or even three when you also want specular highlight. But the advantage is the fact that it also runs on older hardware.

Autor:  noeska [ So Feb 01, 2004 17:48 ]
Betreff des Beitrags: 

Please do it. All i get is a black thingy, but no bumpmapping...

Autor:  Sascha Willems [ So Feb 01, 2004 18:22 ]
Betreff des Beitrags: 

Here you go : simplebump.zip (~600K, Bin+Source+Texture)

I've just cleaned up the code and removed all unnecessary libraries, so that it should compile just fine. If you're using Delphi 6 or lower, remove Variants form the uses-clausel. Don't know why Delphi 7 always wants to include that, even if you don't use it...

Edit : I noticed that I made a small fault. Please replace the following line (no.182) :
Code:
  1. LoadTexture('stone_nmap.tga', NormalMap, False, GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, False);

with this :
Code:
  1. LoadTexture('stone_nmap.tga', NormalMap, False, GL_LINEAR, GL_LINEAR, False);

Normalmaps shouldn't be mipmapped, and you would notice that if moving in and out of a scene.

Autor:  noeska [ Mo Feb 02, 2004 19:25 ]
Betreff des Beitrags: 

Thanks i have a look at it. Also i managed to make my version to work.

Autor:  noeska [ Mi Feb 04, 2004 19:26 ]
Betreff des Beitrags: 

i looked at your code and it seems some units are missing.

where can i find the command glmult3f?

Autor:  Sascha Willems [ Mi Feb 04, 2004 19:30 ]
Betreff des Beitrags: 

Sorry, I forgot to include a unit from my basecode-folder. I've attached it. It contains some needed functions from my math library (like glMult3f) and also the functions to create the torus (+tangents and normals).

Dateianhänge:
glPrimitives.zip [1.94 KiB]
309-mal heruntergeladen

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/