Odd lighting problem?

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Shanira
Posts: 4
Joined: Mon Aug 28, 2006 12:32 am

Odd lighting problem?

Post by Shanira »

Image

Kinda speaks for itself. It's a 3ds file that I loaded (exported from wings) into a scene with grey ambient lighting and a directional light coming from behind and to the left.

Code: Select all

            AnimatedMeshSceneNode tower = scene.AddAnimatedMeshSceneNode(scene.GetMesh("crookedtower.3ds"));
            tower.SetMaterialTexture(0, driver.GetTexture("cylinder.bmp"));
            tower.Scale = new Vector3D(5, 5, 5);
            tower.Position = new Vector3D(0, 0, 0);
Tried setting various material flags and the like (lighting, gouraud, normalizenormals) but no luck. Any ideas?

Also tried an obj file but that just comes out black.

EDIT: Well I tried an obj file from silo the 3d modeller sent me (the maya one had the strangest clipping issues) and that works as long as I use normalize normals, but seems to ignore the ambient lighting value I set for the scene. So it lights properly for the directional light but is otherwise completely unlit. Oi vey!

Even tried:

Code: Select all

            Material tmat = tower.GetMaterial(0);
            tmat.AmbientColor = new Color(255, 127, 127, 127);
Which doesn't do anything either.
Locked