i always had a material showing the vertexnormals of an object (since max4)
looks like this in the render

but i cant fine one for 3dsmax9 (64) bit
these things ere very usefull for rendering normalmaps from the viewports (for walls and stuff for example)
so, does anyone know how to get one of these materials for max9?
Replies
Ben Cloward has a HLSL shader in here.
float4x4 wvp : WorldViewProjection < string UIWidget = "None"; >; float4x4 World : World < string UIWidget = "None"; >; struct app2vertex { float4 position : POSITION; float3 normala : NORMAL; }; struct vertex2pixel { float4 position : POSITION; float3 normala : TEXCOORD01; }; vertex2pixel vertex(app2vertex In) { vertex2pixel Out = (vertex2pixel)0; Out.position = mul(In.position, wvp); // transform vert position to homogeneous clip space Out.normala = mul(In.normala,World); return Out; } float4 pixel(vertex2pixel In) : COLOR { float3 N = ((normalize(In.normala)) +1)/2 ; return float4(N,1); } technique WithCulling { pass simple { VertexShader = compile vs_1_1 vertex(); ZEnable = true; ZWriteEnable = true; CullMode = cw; AlphaBlendEnable = false; PixelShader = compile ps_1_1 pixel(); } } technique NoCulling { pass simple { VertexShader = compile vs_1_1 vertex(); ZEnable = true; ZWriteEnable = true; CullMode = none; AlphaBlendEnable = false; PixelShader = compile ps_1_1 pixel(); } }copy this in a text file and name it something .fx and then open it from max as a
"DirectX Shader"
C:\Program Files (x86)\Autodesk\3ds Max 9\maps\fx\normals.fx(26): error X4532: cannot map expression to pixel shader instruction set
C:\Program Files (x86)\Autodesk\3ds Max 9\maps\fx\normals.fx(51): ID3DXEffectCompiler::CompileEffect: There was an error compiling expression
ID3DXEffectCompiler: Compilation failed
float4x4 wvp : WorldViewProjection < string UIWidget = "None"; >; float4x4 World : World < string UIWidget = "None"; >; struct app2vertex { float4 position : POSITION; float3 normala : NORMAL; }; struct vertex2pixel { float4 position : POSITION; float3 normala : TEXCOORD0; }; vertex2pixel vertex(app2vertex In) { vertex2pixel Out = (vertex2pixel)0; Out.position = mul(In.position, wvp); // transform vert position to homogeneous clip space Out.normala = mul(In.normala,World); return Out; } float4 pixel(vertex2pixel In) : COLOR { float3 N = ((normalize(In.normala)) +1)/2 ; return float4(N,1); } technique WithCulling { pass simple { VertexShader = compile vs_1_1 vertex(); ZEnable = true; ZWriteEnable = true; CullMode = cw; AlphaBlendEnable = false; PixelShader = compile ps_2_0 pixel(); } } technique NoCulling { pass simple { VertexShader = compile vs_1_1 vertex(); ZEnable = true; ZWriteEnable = true; CullMode = none; AlphaBlendEnable = false; PixelShader = compile ps_2_0 pixel(); } }Have anything that will actually render?
Or ideally, draw in viewport AND render?