필터 지우기
필터 지우기

Normal Map Displayed As RGB Values

조회 수: 3 (최근 30일)
Gilles
Gilles 2013년 11월 19일
편집: Debanga 2014년 1월 11일
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
Debanga
Debanga 2014년 1월 11일
편집: Debanga 2014년 1월 11일
% 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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by