Aelx

Hi
I have rendered my model and now wish to apply a bump map to it. Although i have no idea where to start and google has not been helping :-/

I am using C#

-Prey



Re: Game Technologies: DirectX 101 Bump Mapping

The ZMan

http://www.mdxinfo.com/tutorials/normalmapping.php

These days normal maps are better used than bump maps - the difference is subtle but will help your google searches. Also I find that searching for managed directx rather than c# gives much more specific hits.

In addition the more advanced you get the more likely you will have to use C++ samples - its not that hard to read usually and there are good samples in the DIrectX SDK






Re: Game Technologies: DirectX 101 Bump Mapping

Prey

Thank you that helped slightly, but my bumpmap texture is of the format P8 so is theyre code you know of to convert it (i need a runtime converter as i wish to keep it P8)





Re: Game Technologies: DirectX 101 Bump Mapping

Prey

Ah no worries i found how how to take from the predefined palette. Thanks ZMan for the link!





Re: Game Technologies: DirectX 101 Bump Mapping

The ZMan

Sorry no I don't. In fact I'm having a hard time imagining how a bump/normal map can be in P8 format. P8 is indexing into a 256 color map meaning you could only have 256 possible normal.bump vecotrs which seems wrong somehow.

Where are these bump maps coming from.






Re: Game Technologies: DirectX 101 Bump Mapping

Prey

i loop through the predefined palette 256 times, each time storing the a, r, g, b values (each are a byte long) in an array.

I then read the P8 into a byte array. Once done i loop through that byte array and each time take the a, r, g, b of the predefined palette array at ['byte array'[x]] and slot them in one after another in a temp. array - which eventually becomes the normal map.