basic lighting and colors question with .3ds file

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
cuatro
Posts: 11
Joined: Tue May 08, 2007 2:29 am

basic lighting and colors question with .3ds file

Post by cuatro »

keep in mind im a 3D Studio Newb and i am just starting to learn to use irrlicht but am a very advanced in c++. I have a very simple 3ds file of a "tree". its basically a green cone with a brown cylinder on the bottom.

im loading it up and displaying it just fine but if I have lighting enabled its all white where the light is shining on it and black elsewhere (makes sense as it is a light and i have no textures on it). when i turn off lighting it shows the green and brown colors i set up in 3d Studio.

my question is how would i go about enabling the lighting, but keep the colors I setup in 3d Studio? Basically it would be where there is no light shining on it its black but everywhere else its the correct green/brown color.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

There could multiples issues:

- 3DS issues:
Check if your shininess of your surface is more than 0%. Try with 0% first. At high value, it will show as you said. The shiny part of your object will show all the light and the rest will be shaded.

Also remember to "tripple" all your polygons before saving. 3DS and other 3D software could save the geometry with polygons of more than 3 vertices, but it's better that each polygon is made of only 3 vertices.

- Irrlicht:
Check what type of material rendering your using. Are you using a shader or it's the defaults value?

A good place to test would be to load your mesh in IrrEdit to see how it look.

Regards,
Christian Clavet
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Just reread your post. In case it woulnt work...

I forgot to mention that you also need to put some kind of texture on your mesh.

3D engine expect to find texture on object. It's not required but seem to be expected.

You could do a simple "flat" green picture and put it on your pine cone.
Then a brown picture for your cylinder. You can use PLANAR IMAGE MAP on your tree then using 3DS.

Regards,
Christian Clavet
Post Reply