Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 23 Jul 2014
Offline Last Active Oct 15 2014 09:25 AM

Posts I've Made

In Topic: Rendering engine design

14 October 2014 - 12:29 AM

For code reviews, go here:  http://fabiensanglard.net/


A small but complete open source rendering engine that has easy to read code.  I don't think that can exist.  A production engine will be hard to read.  But if you find one, please post!


I would however, recommend these books:


Physically Based Rendering, Second Edition: From Theory To Implementation 

by Matt Pharr et al. 

Link: http://amzn.com/0123750792


Game Engine Architecture, Second Edition 

by Jason Gregory 

Link: http://amzn.com/1466560010


Thanks! I have ordered for now the Game Engine architecture book and have put in my list the PBR one :) 



Do you know some open source (preferably using OpenGL) rendering engines that are reasonably small (to read the code easily), but good enough to take as example to start with?


Check out Horde3D (OpenGL). It's a small and easy to read open source rendering engine (supports both forward and deferred rendering and uses a (limited) data-driven architecture). So it should be a good starting point.


I'm also releasing my small open source engine in a couple of weeks cool.png


Thank you! I'll have a closer look to Horde. Can't wait to see yours as well! 

In Topic: Solid angle in lat-long

19 August 2014 - 09:28 AM

I have better intuitions about geometry on the sphere if I imagine it's the Earth. Let's see how much land is covered by a little "rectangle" of latitude and longitude. Near the equator, a 1 degree x 1 degree region is roughly 111 Km x 111 Km. Latitude is well behaved, with 1 degree corresponding to 111 Km everywhere. But if you move North to New York (latitude 40.7 degrees), 1 degree of longitude only covers about 84 Km.

In order to compute how much "shrinkage" happens as you move away from the equator, you can look at the length of the parallels. As you move closer to a pole, parallels get smaller and smaller, following the formula

parallel_length = 40000 Km * cos(latitude)

Is that enough of an explanation?


Intuitively yes, thanks!

As I'm actually scaling pixel intensity values I should scale them by the absolute value of the cosine right? Otherwise as the latitude varies between 0 and pi I may end up with negative values.