Generating Bump-Map Textures for PVR

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 576
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

Generating Bump-Map Textures for PVR

Post by PH3NOM »

Mainly directed towrads BlueCrab, but anyone feel free to add your input.
There is a KOS example pvr/bumpmap/ showing how to use the Bump-Map feature of the PVR ( thanks BlueCrab for adding that ).

My question is how do we generate the Bump-Map textures from the base texture?
It seems to be a greyscale version of the base texture, but I am not quite able to get the same results by playing with the base texture in Photoshop.

Thanks in advance.
-Josh
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5666
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Generating Bump-Map Textures for PVR

Post by BlueCrab »

The image used for the bumpmap is not just a greyscale version of the input texture. It is more a representation of the change in surface normals for the input texture. The best suggestion I can give is to take a look at the dcbumpgen code in the utilities. I didn't actually write that code, nor did I create the images used as the example data. They were both submitted to the KOS mailing list more than 10 years ago!

The texture that dcbumpgen generates (and that is fed into the hardware) represents the surface normals for the texture. Specifically, it represents the S (elevation angle of the surface normal 0-90°) and R (rotation angle of the normal 0-360°). The patent document for the bumpmapping hardware is also somewhat useful to look at here, and I've attached it to this post.

Also, for reference, this is the original post on the KOS mailing list where the information was posted.
Attachments
BumpmapPatent.pdf
(531.72 KiB) Downloaded 83 times
User avatar
Dev
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 19
Joined: Mon Dec 21, 2015 7:35 am
Location: Cyberspace
Has thanked: 0
Been thanked: 0

Re: Generating Bump-Map Textures for PVR

Post by Dev »

User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Generating Bump-Map Textures for PVR

Post by bogglez »

Isn't the input just a heightmap? In blender you can put the base texture on a quad, turn the quad into a grid of the appropriate resolution, change the height of vertices and export the geometry as a heightmap which you can then use as input for dcbumpgen I think
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Post Reply