Results 1 to 9 of 9

Thread: strange lighting problem cant say more .....

  1. #1
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    France
    Posts
    112

    strange lighting problem cant say more .....

    hey I have a really uncool strange problem with my program; when i compile it and execut it in VC++, it run slow, and it looks perfect;
    when i run the .exe, things are different: really fast but two stuff appear:
    little black points appear on my planet's surface (just on one of them)
    when i go back, a horrible black crown appears on the objects;

    as what i'm saying seems really unclear, i posted 3 screenshots:
    go at http://www.ece.fr:8000/~miffre/S-RTS/
    bad1.jpg shows the black points, bad2 & bad3 the black crown...
    i can't say much, i really don't understand the problem =)
    thx for any answer

    wizzo
    You snooze, you loose

  2. #2
    Guest

    Re: strange lighting problem cant say more .....

    shouldn't be happening. Vc++ executes the executable when you are inside the program and hit the ! . This shouldn't be any different then double clicking the exe.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    France
    Posts
    112

    Re: strange lighting problem cant say more .....

    that is so true !!! but it's happeing =((
    You snooze, you loose

  4. #4
    Junior Member Newbie
    Join Date
    Apr 2003
    Location
    UK
    Posts
    21

    Re: strange lighting problem cant say more .....

    When you run it in VC, are you running the debug or release version?
    Are you sure that when you run it outside VC you're running the correct version of the .exe, and not maybe some older broken one?

    Or, could you have some conditionally compiled code which makes the release version differ slightly from the debug version?

    Do the black dots line up with the edges of triangle strips or anything like?

  5. #5
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    France
    Posts
    112

    Re: strange lighting problem cant say more .....

    hum.... you're right ! i was in debug mode and i changed it in release mode; so now, it is quick and ugly even when i'm running it in vc++ =D
    any idea on how to make it look better ?
    You snooze, you loose

  6. #6
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    France
    Posts
    112

    Re: strange lighting problem cant say more .....

    sorry i forgot to tell you about the black dots..... well it's hard to tell, cuz the dots keep on blinking, but i'd say that:
    - the dots doesn't seem to line up with the triangle strops
    - they are irregulary placed, but it seems that they are like shadow, on the edge of the sphere, where there would be shadows..
    You snooze, you loose

  7. #7
    Senior Member OpenGL Guru Relic's Avatar
    Join Date
    Apr 2000
    Posts
    2,450

    Re: strange lighting problem cant say more .....

    - Are you using a multipass algorithm where the passes might not be position invariant? (=> depth buffer invariances?)
    - Do you use a shadow map algorithm and have polygon offset not tweaked good enough?
    - Do you overclock your board? (=> video or texture memory corrupted? But that should produce colored dots, too.)

  8. #8
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    France
    Posts
    112

    Re: strange lighting problem cant say more .....

    no i'm not using any multi pass stuff; i don't use any shadow map
    about the last point i can't tell you, because i don't really understand what you mean, sorry

    i added:
    glEnable(GL_CULL_FACE);
    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);
    and the strange shadow has disapear;
    the dots are still there, but i saw sth else: there are not all black ones: on the planet, they are black (maybe cause the texture behind is black ?)but when i put the camera in a certain angle, the torus around the planet is full of ......"holes", so i can see through it; however, these holes are not exactly dots, they are bigger than that..

    i posted another screenshot so you can make yourself an idea: http://www.ece.fr:8000/~miffre/S-RTS/bad4.jpg
    You snooze, you loose

  9. #9
    Senior Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    595

    Re: strange lighting problem cant say more .....

    looks like z-fighting.. using z-near/z-far = 0.1/100000 or something?

Similar Threads

  1. strange lighting
    By ugluk in forum OpenGL: GLSL
    Replies: 7
    Last Post: 06-04-2010, 06:05 AM
  2. Strange lighting
    By mrbell in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 05-04-2005, 12:37 PM
  3. strange lighting behavior
    By hideo in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-04-2004, 03:28 PM
  4. Strange lighting problem with negative scaling
    By zoldar256 in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-26-2003, 12:55 AM
  5. Strange Lighting
    By AtheistGod in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 08-04-2001, 05:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean