Jump to content

  • Log In with Google      Sign In   
  • Create Account


japro

Member Since 25 Aug 2009
Offline Last Active Oct 02 2013 05:18 AM
*****

Posts I've Made

In Topic: How to tell if a context has been created?

09 July 2013 - 03:25 AM

Wasn't checking if "glGetString(GL_VERSION)" returns null the way to do that? (null meaning there is no context...)


In Topic: Support OpenGL 4.0

23 June 2013 - 06:49 AM

Wasn't OSX 10.9 announced to have OpengL 4.1? On current versions you can create 3.2 core contexts at best.


In Topic: Simulating a console program?

18 June 2013 - 06:51 AM

Actual console APIs (curses?) tend to be very restrictive and not very portable depending on your requirements (color...). As a result a lot of "ascii games" like roguelikes or Dwarf Fortress actually run their own console emulation in OpenGL. Also its most likely faster. I can run a full screen "console" in OpenGL on my crappy netbook (GMA3150) at a cost of less than a millisecond per frame while doing the same in a console API is significantly slower.

 

btw. modern style dx/ogl are really just general purpose graphics APIs and using them for non 3D isn't overkill at all.


In Topic: Simulating a console program?

17 June 2013 - 11:17 AM

For a monospaced console font just use a "spritesheet" Its fairly easy to then create a console by either instancing those or doing it via clever texture lookups on a fullscreen quad (see how libtcod does it for example).


In Topic: Distance squared light falloff

31 May 2013 - 09:45 AM

...but I've read over and over that it's provable that a point light has 1/d2 falloff, and this formula doesn't work when the radius of the emitter is zero, so I'm still left puzzled about how to reconcile point emitters with spherical emitters.

Yes, an actual 1/d^2 falloff for arbitrarily low d would be unphysical... but so is the concept of a point light source ;). Now if you have a spherical light source you can integrate the 1/d^2 over the sphere surface and will find that it is equivalent to having a point light source at the center of the sphere as long as you are observing from outside the sphere (edit: to clarify i think you have to integrate over the whole sphere surface, so this would be a "transparent" light emitter). Also notice that while moving arbitrarily close to a theoretical point light source the energy doesn't go to infinity, the energy density does...

Generally when we speak of point light sources we mean that the radius of the light source is a lot smaller than the distance we observe from. If for example you had a linear light source then you will find a 1/d falloff and and if you have a light emitting plane there is no falloff at all (assuming the plane/line is infinite, or we are so close to it that we can consider it infinite for practical purposes)

 

One measures the distance as being 2 feet, and calculates a falloff factor of 1/4.
The other measures the distance as being 0.6096m, and calculates a falloff factor of 2.69.

Here you are mixing up relative and absolute measurements. You quoted "doubling the distance cuts the intensity by four"... now how do you go from doubling the distance to "2 feet"? Or more specifically, which distance did you double?

Doubling the distance would mean to go from 1 foot to 2 or from 0.3m to 0.6m in both cases you doubled the distance and quartered the intensity...


PARTNERS