Light & Shadows

For developmental things relating to the graphics of the game.
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

Light & Shadows

Post by andi75 »

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
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

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. ;)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Welcome here, Andreas.

To me, the second one with the ambient lights looks best. It looks quite solid. The edge highlighting may look cooler in motion, though.

I'm curious, how does the highlighting work? Thick wireframe rendering with a polygon offset so the lines that are not edges get z-culled?
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

My two cents: I like the seconds one best.

And welcome :).
Image
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

Highlighting

Post by andi75 »

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.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Re: Highlighting

Post by Lucifer »

andi75 wrote:Thanks for the nice warm welcome (I had expected torches and pitchforks).
Your first response was from Lucifer, so I guess you got the 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.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

Post by andi75 »

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...)
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

IRC?

Post by andi75 »

On a unrelated note: who's hanging out on IRC? Which server/channel (there's always #[email protected] :-)
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

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)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Re: Light & Shadows

Post by Jonathan »

Welcome. :)
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
This is certainly the best, IMHO of course.
ˌɑrməˈɡɛˌtrɑn
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Hi Andreas

I also think the second one is more Tron-ish. The last one *might* have a cartoonish feeling to it with the edge highlights, but it is quite difficult to judge accuratly.

It is really great that you actually tested of 3 ways to do shadows!

-ph
Canis meus id comedit.
User avatar
iceman
Reverse Adjust Outside Corner Grinder
Posts: 2448
Joined: Fri Jan 09, 2004 9:54 am
Location: Yorkshire, England. Quote: Its the fumes, they make one want to play
Contact:

Post by iceman »

I like this one best
Image
Image He who laughs last, probably has a back-up
Image
Image
sorry about the large animated gif
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

That's how the movie looks like

Post by andi75 »

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
User avatar
andi75
On Lightcycle Grid
Posts: 44
Joined: Mon Dec 19, 2005 4:57 pm
Contact:

GLtron vs. Armagetron comparision

Post by andi75 »

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:[email protected]:/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.
User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

i'ld go with the second one

EDIT-

for the second one against the third one pics
Attachments
copyj cap (1).jpg
copyj cap (3).jpg
Post Reply