Hi!

As this is my first mail to this mailing list, I'd first like to 
introduce myself: My name is Jörg Müller, I'm studying telematics at the 
Graz University of Technology and I'm this years Google Summer of Code 
student for the shadow rendering of solar system bodies [1].

I started the development of the volumetric (stencil) shadows in a very 
simple framework I built to easily test everything outside of 
stellarium, before I port the code to stellarium. However I got stuck at 
a very strange problem, which seems to be an OpenGL state issue, but 
which I cannot resolve, no matter what I try out. So I hope someone 
reading this mail is proficient with OpenGL and able to help me!

Meanwhile I also started a blog [2], where I'd like to write down my 
progress.

I've created a branch at launchpad, where you can check out the code 
[3]. If you run the application you should see a black window with the 
shadow volumes painted in blue (that shouldn't happen).

1. You can comment out the shadowing code for example by commenting out 
the #else in Renderer.cpp:170, keeping the corresponding #if 0 on line 
116. If you run the application then you'll just get two (lit) red spheres.

2. With this #if you can control which implementation of the stencil 
shadow algorithm should be executed, the upper one is from a tutorial 
[4] and the lower one is mine, which doesn't differ from the upper a lot 
anymore, after many things I've tried to change.

3. To use the "depth fail" method also known as "Carmack's reverse" you 
can use the #define on line 180. Unfortunately this one isn't working 
100 % here, so comment it out to get the "depth pass" method which is 
also implemented in the tutorial and should definitely work. If you run 
the program without any changes the output should look like this 
screenshot [5], where the red spheres are rendered normally and some of 
the triangles get painted blue (the shadowed ones, for "depth fail" some 
more are blue).

4. Why it seems to be a state issue? I got the screenshot by running the 
same code with SDL instead of Qt as framework and only rendering one 
frame. Starting with the second frame it looks the same as with this Qt 
application.

I hope you can help me with this problem, I'm stuck here!

Another thing I wanted to ask is, if you have any 
tipps/recommendations/proposals for adding the code to stellarium from a 
code design point of view? I'd especially like to see an answer from 
Ferdinand Majerech who's working on the OpenGL code refactor project 
about this.

Regards,
Jörg

[1] http://www.google-melange.com/gsoc/project/google/gsoc2012/nexyon/76002
[2] http://nexyon.blogspot.com/
[3] https://code.launchpad.net/~nexyon/+junk/qtshadows
[4] http://nehe.gamedev.net/tutorial/shadows/16010/
[5] http://imagebin.org/213569


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Stellarium-pubdevel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel

Reply via email to