Monthly Archives: June 2004

Per Pixel Lighting, Normal Mapping and Parallax Mapping

just added tangent-space normal mapping to the small test application, fragment and vertex programs rock! Now I just need to add parallax mapping and show a more interesting object than a plane :).

Update. I just implemented parallax mapping. See if you can figure out, on which of the three screenshots, the effect is enabled. The effect is, due to the nature of parallax, best seen when the camera is moving.

Per pixel lighting in openglNormal mapping in OpenGLParallax mapping in OpenGL


I am now done with two of my three exams this summer, and they went very vell. Today is my first day in many weeks where I do not have any university reading/working/writing scheduled. I will spend the day cleaning my room (badly needed), doing my laundry and I will hopefully find the time and motivation to work some more on my engine. I have been discussing engine architecture with one of my co-workers the past weeks and I have a lot of design ideas I would like to implement. I have a course next semester where we have to write a raytracer using various techniques and I’ll like to rework the design of the scenegraph so that it can be used seamlessly as a framework for it.

Yesterday I went to the Graphical Visionday at the Tecnical University of Denmark which is located in Lyngby, Copenhagen. So I had to take the train around four in the morning. Gorm and I had a lot of troubles with the public transportation system when we finally arrived at Copenhagen Central Station, none of us know Copenhagen well, but we had planned a route which, would take us to the university, in advance. What we did not take into account was a comple halt of all the local train services on a route on which one of our waypoints was located. But after a lot of asking around and waiting for different busses we finally arrived, only half an hour late. The Visionday itself was very successfull with many game develors and graphics researches attending, supplemented by many local students of course, I even got a nice DTU bag with my home, and Gorm won a poster competition displaying his spectrally based global illumination system – the price was a GeForce FX 5650, not bad. A petty they did not give him the Geforce 68000 located in the demo machine Mark Harris from NVIDIA used to show off his demos.

Per-Pixel Ligthing

I havPer pixel lightinge implemented per pixel lighting in tangent space, it was implemeted as a small test project in my engine so I still need to integrate it with the rest of the engine. The plane visible in the screenshot is made up off just two triangles, and all the lighting details are calculated in the shaders. It calculates diffuse light using standard lambertian shading and does phong shading too. The wireframe sphere hovering above the plane is the light. The whole thing is written in ARB_fragment_program and ARB_vertex_program shaders.