Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Issue with Edges and Light

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD User Game Projects
View previous topic :: View next topic  
Author Message
John
DeleD PRO user


Joined: 22 Dec 2008
Posts: 182
Location: Houston, TX

PostPosted: Tue May 17, 2011 2:32 am    Post subject: Issue with Edges and Light Reply with quote

I've been trying to make the geometry and apply textures in DeleD, import into Ultimate Unwrap in MS3D, then export to B3D for use in Blitz 3D. I'm not really sure where the problem is, but it seems whenever I use a spotlight on an area where a lot of edges meet I get this problem:



http://i295.photobucket.com/albums/mm151/coffeeaddict21/testshot.jpg

Any ideas? I made this post here because I'm not sure where in the tool chain things are getting screwed up.

Here is the B3D code I'm using for those who are familiar with it:
Code:
Include "key_scancodes.bb"

If GfxMode3DExists(800,600,32)=False
   RuntimeError "Error: Unable to launch graphics at 800x600x32."
   End
End If

Graphics3D 800,600,32
SetBuffer BackBuffer()

AppTitle "Render To Texture Tool"

camera=CreateCamera()
PositionEntity camera,0,125,125
CameraRange camera,1,3000
CameraClsColor camera,255,255,255

rendermesh=LoadMesh("controlroom.b3d")

AmbientLight 0,0,0
light = CreateLight(3,camera)
LightRange light,400
LightColor light,250,250,210
LightConeAngles light,0,90

While(KeyDown(key_esc)<>True)
   If KeyDown(key_P) Then SaveBuffer(FrontBuffer(),"sshot.bmp")
   If KeyDown(key_up)
      If KeyDown(key_leftshift)=False Then TurnEntity camera,1,0,0 Else MoveEntity camera,0,0,1
   End If
   If KeyDown(key_down)
      If KeyDown(key_leftshift)=False Then TurnEntity camera,-1,0,0 Else MoveEntity camera,0,0,-1
   End If
   If KeyDown(key_left) Then TurnEntity camera,0,1,0
   If KeyDown(key_right) Then TurnEntity camera,0,-1,0
   UpdateWorld
   RenderWorld
   Text 300,300,EntityX(camera)+", "+EntityY(camera)+", "+EntityZ(camera),True,True
   Flip
Wend
End


I would appreciate any help.
Back to top
View user's profile Send private message
chronozphere
DeleD PRO user


Joined: 20 Jun 2006
Posts: 1010
Location: Netherlands

PostPosted: Fri May 20, 2011 8:52 am    Post subject: Reply with quote

Can you show us a wireframe of your model?

This seems like a clear case of "vertex lighting gone wrong". You could either solve this by adding more triangles, or switching to per-pixel lighting, which requires a shader. Smile
Back to top
View user's profile Send private message
John
DeleD PRO user


Joined: 22 Dec 2008
Posts: 182
Location: Houston, TX

PostPosted: Tue May 24, 2011 1:18 pm    Post subject: Reply with quote

Here is the same corner in wireframe:


http://i295.photobucket.com/albums/mm151/coffeeaddict21/corner.jpg
Back to top
View user's profile Send private message
chronozphere
DeleD PRO user


Joined: 20 Jun 2006
Posts: 1010
Location: Netherlands

PostPosted: Tue Jun 07, 2011 4:21 pm    Post subject: Reply with quote

As you see the triangles are quite big. Try splitting them into multiple smaller ones. Perhaps you can use "quads" (Are squares that consist of 2 triangles). That should be a dirty fix for your problem.

It's better to use per-pixel lighting if you know how to get that working. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD User Game Projects All times are GMT
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