Glossy max models in DirectX

Started by
1 comment, last by robert_s 20 years, 6 months ago
Hi. I created a model in Studio Max. I''ve set the Specular na glossines to over 50 so the model is quite shiny. Now I displayed the model in DirectX and it doesnt look as nice as in max. I''ve set teh Specular render state to true. Additionally I ''ve set the D3DLIGHT_POINT light specular to 0.8 which is almost max. Is there anyting else I have to set? I am not trying to implement environment mapping. I simply want my model to have glossy parts. How do I set glossines in DirectX? Thanks.
Advertisement
quote:Now I displayed the model in DirectX and it doesnt look as nice as in max.


As nice as a picture rendered in Max?
That level is impossible with vertex lighting.
However, i assume as in Max viewport:

Try to set the D3DRS_LOCALVIEWER render state to TRUE.
It enables a more correct way of calculating the half-angle needed for specular lighting.

-Nik

Niko Suni

Per vertex specular looks really bad. Two solutions are...

Create a vertex shader/pixel shader pair to handle per pixel specular. I''ve tried this, but never gotten ideal results... then again, I really like the look of my second method, and it requires less per-pixel work, and runs on more hardware.

Create a vertex shader that sets put texture coordinates for a specular reflection map. It''s similar to calculating the reflection vector. Since the per-pixel part is now just a standard texture lookup, you don''t need a pixel shader... This opens up the use of this method to pre-shader cards when doing software shader emulation. I''m not going to post the math I use, as I''m sure it''s not mathematically correct... does look nice though. Two or three level toon shading with specular reflection map looks especially yummy, and is easily doable on some pretty old hardware.

This topic is closed to new replies.

Advertisement