Problems with proper Lightning!

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
roland
Posts: 13
Joined: Sat Feb 11, 2006 9:11 pm

Problems with proper Lightning!

Post by roland »

Since you guys helped me a lot before I am trying to give it a shot once more..

I am having troubles with the lightning. I am pretty new to the whole 3D programming so maybe somebody could shed some light on it?

I have the following Scene (Screenshot from 3ds MAX)

Image

I have a little Exporter for 3d Max that exports selected meshes to the needed format...

On PSP, I am using the following GU Commands:

Code: Select all

	vec[0].x = 2.143f;
	vec[0].y = -9.339;
	vec[0].z = 0.485;
	

	sceGuLightColor(0, GU_DIFFUSE, 0xffc0c0c0);
	sceGuLightColor(0, GU_SPECULAR, 0xffffffff);
	sceGuSpecular(12.0f);
	sceGuAmbient(0xffc0c0c0);

	sceGuLight( 0, GU_DIRECTIONAL, GU_DIFFUSE_AND_SPECULAR, &vec[0]);
	sceGuEnable(GU_LIGHTING);
	sceGuEnable(GU_LIGHT0);
	sceGuColor(0xffffff);
	sceGumDrawArray(GU_TRIANGLES, 
				GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_INDEX_16BIT|GU_TRANSFORM_3D,
				BOL_NUMFACES*3, (void *)BOL_idx, (void *)BOL_vtx);

	sceGumDrawArray(GU_TRIANGLES, 
				GU_NORMAL_32BITF|GU_VERTEX_32BITF|GU_INDEX_16BIT|GU_TRANSFORM_3D,
				DOME_NUMFACES*3, (void *)DOME_idx, (void *)DOME_vtx);
....
This is basically a Sphere with other objects in it.. I took the Coords for the Spotlight from 3d Max but when I display the OUTER Sphere the whole scene is black and when I leave that one out, I can at least see something but nothing that looks remotely like the screen..

Any help would be greatly appreciated!
Post Reply