Normal Map Displayed As RGB Values

9 visualizaciones (últimos 30 días)
Gilles
Gilles el 19 de Nov. de 2013
Editada: Debanga el 11 de En. de 2014
I would like to build a normal map displayed as RGB Values like this example Normal Maps. How can I create Normal Maps with Matlab ?
Thanks.
Kind regards.
Gilles
  1 comentario
Debanga
Debanga el 11 de En. de 2014
Editada: Debanga el 11 de En. de 2014
% Try this example
[X,Y] = meshgrid(1:.1:100,1:.1:100);
R = sin(Y/1) + eps;
Z = R;
[nx,ny,nz] = surfnorm(X,Y,Z);
b = reshape([nx ny nz], size(nx,1), size(nx,2),3);
b = ((b+1)./2).*255;
imshow(uint8(b));
-DRN

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by