Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Shlomi Fruchter, posted on September 05, 2001

Image Description, by Shlomi Fruchter

The picture is taken from my demo "Per Pixel Lighing and Bump Mapping". In my Demo I combine two features:
  • A. Per Pixel Lighting: Using GeForce's Register Combiners I calculate the Intensity (= 1 - Attenuation) per pixel, When the attenuation is (distance from light source)^2 / (light source's radius)^2. I calculate this using two textures, and using the Vertex Program in order to set the UV coords. for more info please check nVidia Developers's homepage or email me.

  • B. Per Pixel Bump Mapping: I am using Normal Map in order to get a normal per pixel. I am also using the Vertex Program in order to set the color of the vertex to the light vector. Than I can calculate N' Dot L Per Pixel (Using the GeForce's Register Combiners).
  • If you want the demo, please contact me. Note that the demo will run only on GeForce's Family product, with the latest drivers.

    Shlomi Fruchter.

    Image of the Day Gallery


    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
    Manuel Astudillo

    September 05, 2001, 02:40 PM


    well. A demo would be nice.. since we cant appreciate really well the effect from the screenshot!


    Manuel Astudillo.


    September 05, 2001, 03:03 PM

    very cool. I'm working on something similar. Just a few questions. Does it work with models or just a plane? How many passes does this take for gf1/2 hardware and how many for gf3?

    Luke Hodorowicz

    September 05, 2001, 03:09 PM

    Nice work :)

    Just a few days ago I was doing the same method of attenuation using 2 textures to calculate 1 - Attenuation. For generation of UV coords I used two texture matrices rather than a vertex program. Does anybody have any idea which method is faster? I'm talking when both situations are done on hardware. I'm guessing software fallback on the vertex shader will be lots slower.



    September 05, 2001, 03:15 PM

    looks nice, but i think it would look even nicer if you tune down the opacity of the bumpmap a little. Oh and try to make a scene out of it, this looks rather dull and simple to the not-developer viewers out there i think.
    And don't forget about the non-geforce guys, there are still to many who don't have one of those monstercards yet.

    Keep it up


    September 05, 2001, 04:10 PM

    i dont have it. :(.. but in october it will be mine..

    and then i dont need no upgrade for some time i thik AMD T-birde 1.4G 512M DDR and gf3 would hold out for a few weeks at least..

    but with my luck there will be something new on the marker just when i plug it in..


    the pic looks good if it does what i think. :)..


    September 05, 2001, 04:15 PM

    U should call it:
    "plane of the edge"

    It looks very primitive, though its GENIAL ! (We hope)

    White color - nice background
    Blue letters - nice letters
    Bumpmapped plane - nice plane

    Look at the letters ! They fit nicely in whole plane. The background texture is created from 2 textures, LOOK AT SHADOWS !!!! OH MY GOD !!!

    I like your per-pixel normals + per-pixel mirorring ! This creates incredible white color !!!

    Black plane is flying through the white milk, looks like floating on the water !!!

    I would say that this is the LETTERS OF THE YEAR !!! NO! NO!


    September 05, 2001, 04:20 PM

    You don't need a GF3 for this kinda thing ... Even a GeForce 256 can do this, even vertex shaders (just not in hardware).

    - MK42


    September 05, 2001, 04:25 PM

    what type of values do your 2 textures have?
    x^2+y^2 and z^2 or x+y and z? if first, your distance-attentuation is not perpixel but pertexel, cause during the linear filtering you loose the correct x^2+y^2 and z^2 and you get an interpolated one instead.. if so, try this:
    store x,y in the first texture (0-1-range) and z in the second (0-1-range, too) then calculate this in your combiners: x^2+y^2+z^2
    if the 2d texture is luminance-alpha, and the 1d is luminance,this means combiner0rgb:tex0=tex0*tex0+tex1*tex1, combiner0alpha: tex0=tex0*tex0, combiner1=unsigned_invert(tex0)+invert(tex0.a)

    else, yeah, you though good about what you had to do, great

    anyways, nice job. now do it with a mesh, for example a q3-model or a .3ds-file or whatever..


    September 05, 2001, 04:45 PM

    Although a simple plane might not be a big deal to some people, I can understand the feeling of satisfaction Shlomi must have had once it worked. And I think it is nice to see a 'simple' screenshot as an IOTD ... I mean, we should all remember those little test programs and how excited we were once we got something to work ....

    Keep up the good work,



    September 05, 2001, 05:38 PM

    I wish MC BAXTON would post an IOTD...I'd really love to see his work since he finds problems with everything else. It must be truely amazing.

    I really like that image. I wish I had a GeForce that I could play with. I think those effects are soooo cool.


    Jordan Saunders

    September 05, 2001, 06:10 PM

    Isn't that a bit harsh seing as we have seen nothing you have done, and I saw it as an interesting little program, come on, if you must critisize him, at least make it constructive.

    - Jordan

    Louis Howe

    September 05, 2001, 06:12 PM

    "It looks very primitive, though its GENIAL ! (We hope)"

    Vitriolic, biting sarcasm, yet tastefully unintelligible.

    Louis Howe

    September 05, 2001, 06:13 PM

    Great work! I'm sure you've learned a lot from this project. Keep it up, man.


    September 05, 2001, 06:23 PM

    Biting yet weird, sarcastic yet remarkably stupid comments.

    That's MC_BAXTON. As long as it's obviously humorous, I am okay with it.



    No one has used "BLINK" for a while, annoying isn't it!! :-P


    September 05, 2001, 06:25 PM

    Nice job! However, if you want something REALLY annoying, see if your browser still supports the "BLINK" tag


    If not, be happy.

    Thank you for your patience and attention.

    Who here knows what OpenGL stands for?





    September 05, 2001, 06:42 PM

    nice! really nice


    September 05, 2001, 06:44 PM

    Hope Im not offending anyone. It's not my intention to offend people. I believe in open-mindness, which will let u survive similar comments.
    In fact, letters is not bad, I can repeat it. And overall picture is NOT bad as well. Just can't see bumping ...

    Greg, I like your blink tag and it makes blink all today's iotd. In fact, its blinking with 72 Hz. Thanks :)

    nonsense % is LOW
    freedom % is NORMAL
    html is OFF


    September 05, 2001, 06:57 PM

    Perfect analysis skills ! You probably have a lot of practice in this field. Congrats !

    But look at the whole structure of this sentence. It can be interpreted in many ways. And note that space is not wasted ! In fact, few books could fit into this sentence ! I think that's perfect example of compressed thoughts, and as u see it works far better than crappy zip or rar compression...


    September 05, 2001, 08:52 PM

    ha! I couldn't have said it better myself! =)


    September 05, 2001, 09:20 PM

    ooooh, that pic has boosted my faith in opengl once again. ALL HAIL OPENGL! BOW BEFORE IT!


    September 05, 2001, 10:36 PM

    Looks good!

    Arne Rosenfeldt

    September 06, 2001, 03:56 AM

    How is this related to




    September 06, 2001, 05:05 AM

    "OpenGL" = "Open Graphics Library" of course.

    Hailed Guardian

    September 06, 2001, 05:16 AM

    OpenGL stands for Open Graphics Library

    Peter Mackay

    September 06, 2001, 08:48 AM

    /me stands on the soap box

    I'm pretty annoyed to see people bashing this. Especially those who have yet to post an IOTD themselves.

    I will assume they're currently too busy to post. All their time is being taken up by trying to figure out why their "Hello, World!" program won't compile.

    - Pete


    September 06, 2001, 09:10 AM

    Looks great man, i fine start to something BIIIIIG.
    What kind of performance decrease do you notice using the registry combiners and vertex programs?


    September 06, 2001, 10:20 AM

    I don't think MX Baxton works on anytyhing... anytime he gets something done he just bashes himself for doing it, and points out the obvious errors and discourages himself from working on it farther :o).

    Anyways, I think it's a nice effect.



    September 06, 2001, 12:42 PM

    Well, yes, this screenshot is VERY simple. I just experienced with that technology.

    I am working on a Advanced Per Pixel Lighting Engine [APPLE - fancy name, isn't it? :) ] with some friends of mine. We have almost finished the editor. I am working on a shader editor now, hence the above screenshot. The moment I will finish writing it, I will make a rather complex scene and send it here.


    September 06, 2001, 01:43 PM

    Looks really great man. I like beer.

    - Tim Johnson

    Louis Howe

    September 06, 2001, 03:26 PM

    It really is hard not to laugh.

    This thread contains 32 messages.
    First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.