Results 1 to 3 of 3

Thread: Understanding how fog owrks

  1. #1
    Senior Member Regular Contributor
    Join Date
    Apr 2000
    Location
    Portugal
    Posts
    237

    Understanding how fog owrks

    Hi

    I'm tryng to implement some fog in my world, but i'm getting strange results.
    When i'm standing in the middle of the fog, he behaves weirdly, like if it disapears when i rotate the camera in some ways.
    How is the Startfog,Endfog works ?
    Is it in relation to the camera position, or in relation the the polygon that i'm drawing?

    thanks

    Bruno

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: Understanding how fog owrks

    It sounds like you are transforming the projection matrix to change the view. You should pretty much leave the projection matrix alone once you have it set (except if you are doing variable fov). Do all translations and rotations on the modelview matrix. Fog uses eye space, not world space, as I understand it.

    [This message has been edited by DFrey (edited 01-19-2001).]

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Dec 2007
    Posts
    1,077

    Re: Understanding how fog owrks

    There's also the problem that fog is calculated with distance from the near plane, which results is smaller distance at the edges of the screen than in the center for the same object. There is a nVidia extension which fixes that.

Similar Threads

  1. Am I understanding this right?
    By Klamath in forum COLLADA
    Replies: 3
    Last Post: 12-01-2016, 03:15 AM
  2. Help understanding glSampleID
    By imported_tonyo_au in forum OpenGL: GLSL
    Replies: 2
    Last Post: 03-21-2012, 08:49 PM
  3. Understanding glDrawElements()
    By maximus-dev in forum OpenGL ES
    Replies: 5
    Last Post: 11-25-2009, 01:59 PM
  4. Understanding the camera
    By MMMovania in forum OpenGL: General
    Replies: 8
    Last Post: 05-21-2005, 09:29 PM
  5. understanding help 24/32 Bit mode
    By sam-morgenfeld in forum OpenGL: User Software
    Replies: 3
    Last Post: 02-22-2005, 02:11 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