Filter löschen
Filter löschen

Normal Map Displayed As RGB Values

3 Ansichten (letzte 30 Tage)
Gilles
Gilles am 19 Nov. 2013
Bearbeitet: Debanga am 11 Jan. 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 Kommentar
Debanga
Debanga am 11 Jan. 2014
Bearbeitet: Debanga am 11 Jan. 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by