PDA

View Full Version : NeHe Lesson23



matthew
11-04-2007, 09:40
NeHe Lesson23 will allow you to toggle between Four different Shapes, toggle the lighting and Texture Quality and show you how to use SphereMapping in your Programmes.

Keyboard Controls...

'L' - Toggle Lighting
'F' - Toggle Filter (Quality of Texture)

SpaceBar - Toggle Between Shapes

Shapes - Cylinder, Sphere, Cone and Cube.

Cursor Key Up - Rotate Up
Cursor Key Down - Rotate Down
Cursor Key Left - Rotate Left
Cursor Key Right - Rotate Right

'PgUp' - Zoom In
'PgDn' - Zoom Out

ErosOlmi
11-04-2007, 13:14
Matthew,

thanks a lot for your nice, clean, well commented code.

Eros

Petr Schreiber
11-04-2007, 13:19
Hi Matthew,

this is one of most interesting NeHe lessons,
thanks for bringing it to thinBASIC!

Interesting is to watch how is it casted to for example on:


tbgl_Torus 2.5,3.5


... or models :)
If you add blending it looks like from glass...
I think TopDown will use fragments of this lesson ;)


Bye

matthew
11-04-2007, 17:15
@Eros - Thanks for the comment. :)

@Psch - That Human Model looks really good. :)

kryton9
12-04-2007, 06:09
Mathew another superb lesson. Thanks looks awesome!!

matthew
12-04-2007, 19:02
@kryton9 - Thanks :)

Petr Schreiber
22-04-2007, 13:08
Hi,

I like this lesson a lot, here is little script using the spherical mapping shown in Mathews code.
It is quick try to create water like surface. Although it does not look like real water, I think it is better than just wawing surface with static texture. It handles up to 3 wave generators at time, more is possible, but quite slow.

Just click-click-click :)


Bye,
Petr

matthew
22-04-2007, 13:45
I've just tried your programme and it looked like a very realistic water effect. :)

Michael Hartlef
22-04-2007, 16:04
Looks great here.

Petr Schreiber
22-04-2007, 17:53
Thank you :)


Petr

kryton9
22-04-2007, 22:38
HE he he he, now I understand the just click click click line :)

The first time I ran it and didn't read the instructions, I was like, well nice, but not much like water.

Then I ran it again and read the instructions and clicked, clicked, clicked. Amazing.

There is a downside too all of these marvels that keep appearing as scripts in these forums, my c++ studies have pretty much come to a halt. What is bad is thinBasic is only available on Windows systems. And when I eventually get a smarthphone I will be going nuts not having its niceness to program with :)