Light & Shadows
Light & Shadows
Hi,
I'm looking for some qualified feedback on enhancing the 'Tron' feeling of <gasp>GLtron</gasp>. Where's a better place to gather that than the forum of the *other* tron game? Here's the story:
Since I recently got a nice new model from someone who demanded I implement doom3 style shadow volumes, I did just that.
Now I need to some input on how to actually light the *shadowed* side of the bicycle. I can see three ways:
Pitch black shadows:
http://www.gltron.org/images/black-shadows.png
Plain self-shadowing, but add some ambient or camera light, to keep the dark side from going black:
http://www.gltron.org/images/self-shadowing.png
Or, what I added today (just a quick hack, so there's still some aliasing): Highlight the edges of the cycle, and combine that with black shadows:
http://www.gltron.org/images/edge-highlight.png
- Andreas
I'm looking for some qualified feedback on enhancing the 'Tron' feeling of <gasp>GLtron</gasp>. Where's a better place to gather that than the forum of the *other* tron game? Here's the story:
Since I recently got a nice new model from someone who demanded I implement doom3 style shadow volumes, I did just that.
Now I need to some input on how to actually light the *shadowed* side of the bicycle. I can see three ways:
Pitch black shadows:
http://www.gltron.org/images/black-shadows.png
Plain self-shadowing, but add some ambient or camera light, to keep the dark side from going black:
http://www.gltron.org/images/self-shadowing.png
Or, what I added today (just a quick hack, so there's still some aliasing): Highlight the edges of the cycle, and combine that with black shadows:
http://www.gltron.org/images/edge-highlight.png
- Andreas
- Lucifer
- Project Developer
- Posts: 8641
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
The irony, of course, is that we get people all the time saying "Why don't you make it look more like GLTron?"
Other than that, sorry, I'm a GLNoob, but there are some good GLGuys here who will probably be along shortly to help.
Edit: On rereading your post and realizing what you were actually asking, I think I like the third one the best.
Other than that, sorry, I'm a GLNoob, but there are some good GLGuys here who will probably be along shortly to help.
Edit: On rereading your post and realizing what you were actually asking, I think I like the third one the best.
- Tank Program
- Forum & Project Admin, PhD
- Posts: 6711
- Joined: Thu Dec 18, 2003 7:03 pm
Highlighting
Thanks for the nice warm welcome (I had expected torches and pitchforks).
About the highlighting, it's really quite simple:
- Foreach triangle, I get the face normal of all neighboring triangles. If the dot product between the normals is smaller than a certain threshold (currently .eight), I store the two indices of the edge vertices in a list (that's later drawn using the mesh vb and a single glDrawElements(GL_LINES, ...) call.
- No, it's not using polygonoffset (that's why the lines are so aliased)
- Right now, the lines also appear on the lit side, but that can be fixed. E.g. just re-use the stencil shadow volumes.
About the highlighting, it's really quite simple:
- Foreach triangle, I get the face normal of all neighboring triangles. If the dot product between the normals is smaller than a certain threshold (currently .eight), I store the two indices of the edge vertices in a list (that's later drawn using the mesh vb and a single glDrawElements(GL_LINES, ...) call.
- No, it's not using polygonoffset (that's why the lines are so aliased)
- Right now, the lines also appear on the lit side, but that can be fixed. E.g. just re-use the stencil shadow volumes.
- Lucifer
- Project Developer
- Posts: 8641
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
Re: Highlighting
Your first response was from Lucifer, so I guess you got the torches and pitchforks.andi75 wrote:Thanks for the nice warm welcome (I had expected torches and pitchforks).
I'd like to direct you here:
http://forums.armagetronad.net/viewtopi ... 4139#34139
Curious what your response to that thread might be.
I could only glance at the thread so far, kid's been screaming bloody murder instead of going to sleep peacefully.
The thread raises some instresting questions, about what gives a game the 'proper tron feeling' or what makes it look better.
I don't want to comment on the technical side of things yet, I'd have to have a look at the current state of AA first.
Also, which version of my code were you looking at? The 'latest released source' (0.70), now two years old? CVS repository at sourceforge? (at which moment?) SVN repository at berlios (which revision number?)
- Andreas (now going to get some dinner, then start preparing for class tomorrow - and it's already past 9 p.m. I just hope the kid sleeps through the night...)
The thread raises some instresting questions, about what gives a game the 'proper tron feeling' or what makes it look better.
I don't want to comment on the technical side of things yet, I'd have to have a look at the current state of AA first.
Also, which version of my code were you looking at? The 'latest released source' (0.70), now two years old? CVS repository at sourceforge? (at which moment?) SVN repository at berlios (which revision number?)
- Andreas (now going to get some dinner, then start preparing for class tomorrow - and it's already past 9 p.m. I just hope the kid sleeps through the night...)
IRC?
On a unrelated note: who's hanging out on IRC? Which server/channel (there's always #gltron@irc.freenode.net
- Lucifer
- Project Developer
- Posts: 8641
- Joined: Sun Aug 15, 2004 3:32 pm
- Location: Republic of Texas
- Contact:
I looked at your latest released code at the time. z-man mentions later in the thread that some of the stuff that AA compared favorably were actually in development in GLTron (maps).
I'll tell you what would be neat. If GLTron were to be able to connect as a client to AA servers. That way, whenever people say "Make it more like GLTron" we could just tell them to run GLTron instead.
(understand about the kids, I've got 3 of my own. Wonderful kids, but I just broke up two fights while I was reading/posting)
I'll tell you what would be neat. If GLTron were to be able to connect as a client to AA servers. That way, whenever people say "Make it more like GLTron" we could just tell them to run GLTron instead.
(understand about the kids, I've got 3 of my own. Wonderful kids, but I just broke up two fights while I was reading/posting)
- Jonathan
- A Brave Victim
- Posts: 3391
- Joined: Thu Feb 03, 2005 12:50 am
- Location: Not really lurking anymore
Re: Light & Shadows
Welcome.
This is certainly the best, IMHO of course.andi75 wrote:Plain self-shadowing, but add some ambient or camera light, to keep the dark side from going black:
http://www.gltron.org/images/self-shadowing.png
ˌɑrməˈɡɛˌtrɑn
- philippeqc
- Long Poster - Project Developer - Sage
- Posts: 1526
- Joined: Mon Jul 12, 2004 8:55 am
- Location: Stockholm
- Contact:
That's how the movie looks like
If you're wondering where I came up with the idea of drawing the cycle's outlines, here's a screen-grab from the movie scene someone sent me:
http://www.gltron.org/images/movie_capture.jpg
http://www.gltron.org/images/movie_capture.jpg
GLtron vs. Armagetron comparision
As for the promised reply to Lucifer's post (and reference to the 'some crazy ideas' thread), I haven't made any progress today. Kid's keeping me busy when I'm at home, and when it's asleep, I'm working on a some-hundreds-of lines perl script to insert & correlate data from a dozen different excel files into a pretty complicated SQL database (new web based management software for the swiss chess team championship).
But hey, at least I downloaded the current beta, and I'm grabbing the source through cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/armagetronad co -r b0b_2_8 armagetronad
You guys should have a look at subversion!
To keep this thread on the graphics track, I'll open a new thread in the Development forum, but of course, I'll post a link here too.
But hey, at least I downloaded the current beta, and I'm grabbing the source through cvs -z3 -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/armagetronad co -r b0b_2_8 armagetronad
You guys should have a look at subversion!
To keep this thread on the graphics track, I'll open a new thread in the Development forum, but of course, I'll post a link here too.