Extracting RGB components from a texture

Blitz3D Forums/Blitz3D Programming/Extracting RGB components from a texture

PaulJG(Posted 2003) [#1]
I'm having a great deal of difficulty doing this.

Basically, I want to load my heightmap into a texture or image - then go through it, pixel by pixel - reading off the colour values, before calculating the height for my mesh.

I've tried doing it with 2d commands, and had no luck. (see the 2d graphics forum !). So now I've deleted that bit of code and starting again. Can any kind soul out there give me some tips ? or even a head start.


Rob Farley(Posted 2003) [#2]
http://www.blitzbasic.com/codearcs/codearcs.php?code=346


PaulJG(Posted 2003) [#3]
Thanks Rob, but its the actual 'grabbing' the colours from the pixels in the texture thats causing me problems


PaulJG(Posted 2003) [#4]
Actually.. Floyd's just posted up some help on doing it in 2d (with the imagebuffer commands) - Thanks to you both :)

I can go back to living in peace and harmony... till I get stuck again ;)