Archived

This topic is now archived and is closed to further replies.

Psyian

Materials/Lighting huh? Dont get it

Recommended Posts

Hello again all, I just need a bit of help if anyone can, ive been looking into materials and lighting to make my scene more realistic, and look more 3D. I want to get rid of textures completly, if i can???? and only use materials but i think im missing something. I want to have several meshes that are different colours. Ive messed around with the materials and light, but can only change the colours of objects by altering the lights parameters. Is there a way of doing this so i have many materials and only one light that effects the scene. I''m not sure but does the material just effect how the light interacts with the object, if this is the case i would have to use textures to give each object a different colour, right?? If anyone can help i''d really appreciate it.. Thanx

Share this post


Link to post
Share on other sites
Yes, materials do affect how light interacts with an object''s surface. However, materials also affect the base color of an object as well. Make sure you''re using D3DFVF_DIFFUSE as part of your FVF definition--that will allow you to use a vertex structure that includes a D3DCOLOR structure.

Don''t expect to get rid of textures. While there are some nifty things that can be done with materials, the real detail on an object comes from the proper use of textures. Without textures, objects would appear very simple and flat.

Share this post


Link to post
Share on other sites
Thanx alot dude, ill go over my FVF structure, would you then have to assign the vertex colour for each vertex or would direct3d use the material diffuse component autimatically.

Thanx again

Share this post


Link to post
Share on other sites