q3map2 lighting method is equivalent to q3map vlight?


(Q.) #1

Hello.
Is q3map2 lighting method is equivalent to q3map vlight?
Did the author simply borrow vlight then add some modification?
Just read a rumor posting saying so at somewhere where I don’t want to mention here.


(Shaderman) #2

What would be wrong if he did?

I only find a few comments like this in the source code:

borrowed from vlight.c

vlight.c seems to be gone and if you run q3map2 with -vlight you get this message:

WARNING: VLight is no longer supported, defaulting to -light -fast instead

I assume that most of the light code is new (and improved).

Shaderman


(SCDS_reyalP) #3

Equivalent in what way ? If you mean, does it use the same technique, no, it doesn’t. -fast and -faster are fast enough that there isn’t much reason to do vertex lighting, but they are far more like the original q3maps standard lighting.


(Q.) #4

@shaderman
Nothing would be wrong but just curious.

@reyalp
Oh, I have no idea about the way they are equivalent.
But as far as my seeing goes, the way shadows are cast looks quite the same.
I hope someone technically brilliant would write an article comparing all the 3 methods, the differences, each advantage and disadvantage.Plus what they do in a simplified way with a simple example lighting situation. For example, there are point light, surface light and supports in a box room. Then describing how they treat this situation and what they have in common and do not. etc…


(obsidian) #5

Vertex lighting for maps looks like crap. It is only really useful for stuff that has very fine subdivisions like mapmodels, playermodels and weaponmodels. For pretty much everything else (brushes/patches), vertex lighting is obsolete. Vertex lighting works by setting colour values to each vertex on a triangle and then a gradient based on those values is created on the surface of the triangle.

Problem is when you have a large surface (like a floor), and something casting a shadow on half of that surface (say, a ledge), vertex lighting cannot create the hard edge that would represent the shadow cast onto the floor by the ledge. Instead, you just get a gradient across the floor going from light to dark - but that doesn’t well represent real life shadows.

That’s why lightmaps are better than vertex lighting for brushes and patches. Lightmaps are just bitmap images generated by the compiler. The lightmap is a relatively low resolution texture that is filtered on top of your normal textures. Advantage, of course, is that it can represent the area that shadows are casted onto other objects much more accurately.

Some of the largest improvements that you see in Q3Map2 has to do with how lightmaps are generated as opposed to its predecesor. First of all, radiosity - surfaces can now bounce light accurately and retain colour information with subsequent bounces. Other stuff like smoothing, filtering, penumbra and many other effects improve the quality of shadows represented by lightmaps. Efficiency has also been greatly improved. Lightmaps can now be generated by Q3Map2 much faster than the old-school Q3Map due to a lot of streamlining and optimizations in the code.

So in short, vertex lighting and lightmaps are two completely different lighting methods just like how per-pixel dynamic lighting in Doom3/Quake 4 are completely different than lightmaps that you find on Q3.


(SCDS_reyalP) #6

Well, that just goes to show how foggy my memory is, -vlight isn’t vertex light. I apologize for any confusion.


(Q.) #7

@obsidian
Thank you for your detailed online lecture.
It rose my percentage of understanding from 99.999% to 99.9999% at least!
BTW vlight seems to support bouncing but I have no luck to activate it.
Do you know any clue?

@SCDS_reyalP
IIRC vlight stands for voodoo light.


(obsidian) #8

Why are you trying to use vlight anyway?


(Q.) #9

Because now most people use q3map2 and its author says that vlight had gone.
Alos there are no documents or tutorials about vlight.


(SCDS_reyalP) #10

You can see the original vlight code in the original q3map source (included with quake3 engine source release). From what I could tell from a very brief look, the similarity to -fast is that they both try to limit the number of lights that go into lighting a particular area. However, the actual techniques are fairly different.

From what I remember, -vlight tended to be subject to ugly artifacts, and was so different from normal light that it really wasn’t useful as a quick test compile. -light -fast is fairly similar to the old -light, allthough it tends to be darker and more contrasty.


(Q.) #11

Thank you SCDS_reyalP for your answer.
But it does not help me very much.
What matters is whether vlight can generate unique lightmap compared to normal light(q3map -light or q3map2 -light -fast) and it can be useful or worthy using or not.
In other words weather q3map2 can be superior in all aspects to vlight or not.
As it were, can vlight be orange in contrast to apple which is vanilla q3map and q3map2 in this case?
Or is it simply an old rotten apple?
Noone can answer this question, I think.


(EB) #12

Seems there is an influx of rhetoricals lately…I am just surprised that ‘Twisted’ didn’t ask first.
The best place for a question like this would be here or www.map-center.com (IMO) in the general discussion section as so it will be seen.
-There are a few people that venture there that could fill you in on specifics…


(Q.) #13

@EB
I’m quite unsure why you suggest map-center. :???:
By the way shaderlab.com has a sub-directory named map-center.
It’s been a while since I found it and wondered their relationship because the author of q3map2 rarely seen at map-center.
I suspected that the author of q3map2 hated map-center and so on.
Anyway your post makes me guess that some member at map-center previously asked some vlight question to q3map2 author through irc as such and got some info from him, so asking there might help, right?


(EB) #14

1 name >
Paul Jaquays
He is an infamous game developer that still talks with the public, he frequents Map-Center.com.
If you knew about him and his role in Q3 development, you would have no argument about asking there.

ALSO>>
There are several other people with a wealth of knowledge in this area as most of them still use Q3map and Q3map2.
Take the suggestion and go ask…ok ?

Just remember that relaxing and asking nicely will always get you more help. :wink:


(SCDS_reyalP) #15

You could answer that question for your self. All you have to do is take the two q3map versions, compare the output, and draw your own conclusions.

I wouldn’t waste my time doing that, but if it is important to you, have at it!