Per pixel lighting

I see people mention this stuff all the time on some 3d websites… usually with D3D. Does OpenGL has something like this?? Vertex lighting isn’t that good, and heavy tesselating is a performance hit… are there any extensions on this? maybe from nvidia? what’s the story?

Hello Patricia, that is a good question… OpenGL can do the same thing, its just your basic dot product lighting…

Which can be mixed into openGL… but if you ask me, vertex lighting dosn’t quite make it up to scratch these days…

One of the major problem, is ambient lighting… Why ?? because ambient light reflects off walls and stuff, and adds extra light from that… Normal vertex lighting dosn’t add this into consideration, and it also treats different light sources as seperate ( eg. The lights do not mix at all )… This produces poor lighting…

The new games these days are comming out with Radiosity lighting… ( Quake3 - just an example )…

and this:
http://www.ompac.net.au/~troyfa/wipeout.jpg

Take a good look at the lighting in that picture… it uses Radiosity to build the lightmaps…

OpenGL has a better solution … 3D texture mapping… What is it ??
Um don’t use it for normal texture mapping it’s useless for that… So what is it good for ??

Hmmmmm - lighting !!!

Why ??

Games normally use lightmaps… and the’re pretty good for that… but you have to have friggen heaps of lightmaps… and with limited amout of video ram, you could end up of running out of ram for you textures, and lightmaps… You see, every wall must have it’s own lightmap… Thus adding to the lack of video ram…

Those 5,000 or so lightmaps, can be replaced with one 3D lightmap… No matter what the lighting conditions ( Even dynamic lighting and shadows - is what John Carmack was going on about ), yup all done with 3D Lightmaps… It’s all done on the fly too …

Shadows, lighting everything… Learn all you can about 3D Lightmaps, it’s the newest technology… and don’t waste your time with old crap…

Olá Patricia.
vc por acaso é brasileira ???

Originally posted by warlordQ:
[b]Take a good look at the lighting in that picture… it uses Radiosity to build the lightmaps…

Shadows, lighting everything… Learn all you can about 3D Lightmaps, it’s the newest technology… and don’t waste your time with old crap…[/b]

where can I find stuff about radiosity?
I’ve know a little about lightmaps… I think from flipcode. I see it in games a lot! 3D Lightmaps sound very cool, where can I find info on them? I also agree that learning too much old stuff can be a waste of time.

And Gelero, no, I was born in US… have no clue what you said. =( Sorry

I can’t imagine having ‘one 3d lightmap’ to calculate the lighting on a typical Quake map. The storage requirements would be huge.

Lightmaps are good for some things, but they can’t do dynamic light without increasing video memory requirements even higher and some visual trickery so use them wisely.

I would really like to see this so called 3d lightmap stuff. I don’t think you can call it a lightmap and have it be really dynamic. Is it some sort of device used with per pixel lighting? I’ve been thinking that if you had a 3d texture for lighting diffusion perposes (and other stuff) you could get some incredible lighting effects. This wouldn’t be lightmapping though. So if you can further explain you’re self or point me in a general direction as to where to look it would be greatly appricatiated.

With all that said I wouldn’t say this is a way to reduce video memory requirements. If you think about it a fairly small 128^3 texture with 4 channels of unsighed chars would require over 8 megs all by itself. If you went up to 256^3 this texture alown wouldn’t fit on one of the leading edge 64mb cards consumer cards. Of course going to float percision on each channel only makes it worse. I suppose though some of these lighting effects could be done with smaller textures in the beginning at least maybe 64x64x32 or something.

One last thing. In my opinion perpixel lighting is the future since it is totaly dynamic without any tricks. Nvidia has tons of info about this stuff. Most of the stuff on their website that talks about register combiners is about perpixel lighting.
http://www.nvidia.com/Developer

[This message has been edited by ribblem (edited 08-10-2000).]

is this per pixel lighting stuff available on different video cards? or just nvidia and their geforces

ATI has it on there new cards too, but that uses different extensions. A lot of workstation cards also have it via per pixel textures. But that’s it as far as I know.

http://www.opengl.org/News/Special/oimupdate/perpixel.html

, don’t need no geforce!! but if you have one… there is a binary in the .zip file for that too!!

umm… i hate to mention this to you, but i don’t think a single card out there supports 3d texture maps outside of software. the framerate is aweful…
as for perpixel lighting, one thing you could have seen (for instance on a sphere) is a environment (spherical) map with a circular white spot that was added to the image (multipass) or similar tecniqe.

-mike

btw patricia,
i’ve come up with, imho, is an excellent hardware acceled method of generating radiosity lightmaps.
my icq# is:
51439946

i don’t yet know c/c++ and therfore cannot implement it (radiosity method) into opengl yet .
pls tell me if you’re interested.

-mike

[This message has been edited by Thr33d (edited 08-11-2000).]

The advantage of lightmaps compared to 3d textures is that lightmaps can also be used for static soft shadows. I see no way to have shadows with 3d textures…

Thr33d, care to share with us your method to generate hardware accelerated lightmaps ?

Y.

acually i wanted to try it out first, it’s a method that may need much tweaking, i’m sure not enough to make it slower than software, but i was speaking of just the radiosity, not the shadow casting.
if i can get one (1) person to try my idea, then i might share it on gamedev articles or maybe my web site (not yet completed)

-mike

btw like i said, i don’t know c/c++ well at all, thats why i ask, i’ve only taken 1 year hs vb, and read several programming books when i was younger (never completly understood them )

err, what you’re talking about here is not radiosity…

In my experiance, rendering a single frame of animation on a network of 50 or so SGi’s using radiosity takes weeks.

I’d of thought that Ray-tracing would be the first to be implimented, but I think we’re a little way off that yet!

To change the topic slightly…

Have you ever thought of not using textures?

is it possible to get the Geforce to use just its register combiners?

Theoretically this would allow the creation of some simple surface shaders (mathematical equations that determines a surfaces property). This is the long run is what realtime computer graphics needs, in order to start getting image quality up to the standard of jurrasic park etc.

If Anyone has done any shaders, I’d love to know.

[This message has been edited by Rob The Bloke (edited 08-12-2000).]

yes rob, this is a form of radiosity, and i’d like to point out a game that also uses radiosity -
quake 2

in my spare time i’ve created several levels for my personal use. the lighting was computed in arghrad. one level was very large in size, open space wise, and took 89 min. to compute lighting. this is what drove me to think up a new way of doing radiosity.
i don’t really want to tell the world how i believe it could be done until i’ve done it myself or someone has worked on it with me and made a program demonstrating it.

-mike

btw, anyone can get ahold of me on icq (i prefer icq, instant messages)

[This message has been edited by Thr33d (edited 08-12-2000).]

Hit me if I am Wrong but I thought radiosity was not a rendering trick but add objects to the scene before rendering. Therefore if you really have a lot of time to waste you could set up your scene, calculate your radiosity and then render using Ray-tracing.

Hit me again if I am wrong, isn’t blender using vertex lightninig to calculate the radiosity ? Isn’t anyone else also ?
I thought radiosity consisted in fading and spreading lights infos. If it is the case it is much easier to do with vertex than with other light sources no ?

Just Wondering
Kha

Check this out. It uses radiosity to set the lighting properties of the meshes (I think - haven’t looked at it much). Pretty nifty.
http://www.cix.co.uk/~colbeck/glutrad.htm

The link to this page came from opengl.org.

Folks,

Just to clear some things up – Quake 2 uses radiosity, but Quake 3 uses just ray casting to generate the lightmaps. For those of you unfamiliar with this stuff, keep in mind that – yes – this is a huge pre-processing step to make up for the fact that currently consumer video hardware is in no shape to compute radiosity/raycasting effects in real time.

Also, the lightmaps do not incur a huge texture memory penalty b/c they tend to be low resolution. (Ever seen the zigzag between light and dark areas when staring at a texture with a lightmap applied? That’s why …)

Cheers,
Eric

Ok, i’m not sure i made myself clear, but in quake 2 the radiosity was precomputed (thats why it took 89 min. it would be crazy to wait 89 min. a frame!) here’s how i see radiosity:

…true radiosity is not just “smoother” than gouard or
phong lighting but calculates it completly differently.
Whereas diffuse lighting calculates the amount of light by how
perpendicular any given face is to the light source. Specular
or “reflective” lighting takes it a step further and checks the
viewers angle, the faces’ angle and the light source to the face.

Radiosity calculates the light diffusion/deflection off of not
only the light to face angle to viewer (diffusion) but calculates
the diffused light coming from the light source, hitting the
faces in the scene and diffusing light from those faces onto
other faces then to the viewer.

a real life ™ example of this would be to take a colored piece of paper, put it in the bright sunlight then put your hand above it and slightly to the side, so not to block all the sunlight, face the paper towards your hand and you will see the paper color diffused/reflected upon your hand. If you look even closer it is not just a reflection
but a diffusion of the light onto your hand, by moving your viewing point and not your hand you will see the lighting doesn’t change as it does with a reflective surface.

if anyone has anything to add to this discription, or sees any problems, errors or i didn’t explain myself well at all, pls correct me.

-mike

[This message has been edited by Thr33d (edited 08-15-2000).]

i just looked at the pic WarlordQ posted and i never noticed a hint of radiosity in the entire image, are you sure you aren’t mistaking ray traced shadows for radiosity?

-mike