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.
basic lighting and colors question with .3ds file
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
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
- 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
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
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
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