forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with proper Lightning!

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
roland



Joined: 11 Feb 2006
Posts: 13

PostPosted: Sun Feb 19, 2006 9:54 am    Post subject: Problems with proper Lightning! Reply with quote

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)

[img]
http://212.41.237.42/sony/3dview.jpg
[/img]

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:

   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!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group