View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# [D3D11] Normal Mapping

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

8 replies to this topic

### #1Nicolas Bertoa  GDNet+

Posted 11 February 2013 - 09:01 AM

Hi community. I finished a new demo about normal mapping using DirectX 11.

DESCRIPTION:
When we apply a brick texture to a cone shaped column, the specular
highlights looks unnaturally smooth compared to the bumpiness of the
brick texture. This is because the underlying mesh geometry is smooth,
and we have merely applied the image of bumpy bricks over the smooth
cylindrical surface. However, the lighting calculations are performed
based on the mesh geometry (in particular the interpolated vertex
normals), and not the texture image. Thus the lighting is not completely
consistent with the texture.

The strategy of normal mapping is to texture our polygons with normal
maps. We then have per-pixel normals which capture the fine details of a
surface like bumps, scratches and crevices. We then use these per-pixel
normals from the normal map in our lighting calculations, instead of
the interpolated vertex normal.

A normal map is a texture, but instead of storing RGB data at each texel,
we store a compressed x-coordinate, y-coordinate and z-coordinate in
the red component, green component, and blue component, respectively.
These coordinates define a normal vector, thus a normal map stores a
normal vector at each pixel.

To generate normal maps we can use a NVIDIA Photoshop Plugin or CrazyBump software.

The coordinates of the normals in a normal map are relative to the
texture space coordinate system. Consequently, to do lighting
calculations, we need to transform the normal from the texture space to
the world space so that the lights and normals are in the same
coordinate system. The TBN-bases (Tangent, Bitangent, Normal) built at
each vertex facilitates the transformation from texture space to world
space.

BIBLIOGRAPHY:
Introduction to 3D Game programming using DirectX 11.
Real Time Rendering

VIDEO DEMONSTRATION:

SOURCE CODE:

My Blog

### #2riuthamus  Moderators

Posted 11 February 2013 - 11:04 AM

Are you going to attempt to do tessellation or displacement mapping?

### #3Nicolas Bertoa  GDNet+

Posted 11 February 2013 - 11:41 AM

Hi riuthamus.

Yes! In my next mini project I will apply displacement mapping to this scene.

My Blog

### #4riuthamus  Moderators

Posted 11 February 2013 - 01:48 PM

Def worth checking out than. We are looking at doing this but have 0 ideas on how to mess with tessellation+dx11

### #5Nicolas Bertoa  GDNet+

Posted 11 February 2013 - 02:00 PM

I will send you a private msg when I post that demo.

Currently I am reading Real Time Rendering and Introduction to 3D Game Programming with DirectX 11.

I learned about Tessellation in DirectX11 reading Microsoft Documentation and DirectX SDK.

My Blog

### #6Jason Z  Members

Posted 11 February 2013 - 02:03 PM

@Nikko: it looks great - nice work on the video.  I'm looking forward to seeing the next one!

@riuthamus: There is also a displacement mapping implementation in Hieroglyph 3 - check out the SkinAndBones sample.

Jason Zink :: DirectX MVP

Direct3D 11 engine on CodePlex: Hieroglyph 3

Games: Lunar Rift

### #7riuthamus  Moderators

Posted 11 February 2013 - 02:29 PM

@Nikko: it looks great - nice work on the video.  I'm looking forward to seeing the next one!

@riuthamus: There is also a displacement mapping implementation in Hieroglyph 3 - check out the SkinAndBones sample.

Thanks for the link but we are using our own engine and would need to code that part in ourselves. On top of that our tessellation would need to be utilized with a server physics mesh ( which is another problem we will have to tackle at some point! ) What you linked looks very good though.

### #8Nicolas Bertoa  GDNet+

Posted 11 February 2013 - 02:31 PM

Thanks Jason Z, I think it will be finished for tomorrow

My Blog

### #9Nicolas Bertoa  GDNet+

Posted 12 February 2013 - 08:28 AM

Hi guys. Finally I posted Displacement Mapping project.

http://www.gamedev.net/topic/638668-d3d11-displacement-mapping/

My Blog

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.