PerPixelPointLight.java  :)

Are there any plans for extending the set of light implemented for Java 3D by including some of the techniques we’ve seen in JCD’s demos.

It’d be awful nice to just be able to dump a light that would generate Per Pixel lighting effects into a scene :slight_smile:

Kev

Well I can write an alternative for point lighting using pixel and vertex shaders (not necessarily phong, I know it’s expensive ;)), it’s up to Yuri to look into my shaders implementation and either decide to adopt them, or tweak them into a better code…

Well I’d be happy with anything tbh (the demos are looking pretty ace btw), but I hoping there’d be a fallback to per pixel lighting without shaders. I’m afraid I’m one them folks who wants to supports old and new cards.

Kev

See per-pixel lighting is accomplished by first translating the light source into the object space, and then get it into the vertex tangent space in order for the lighting to be accurate.
Also there is a need for normal map, or at least height maps with a sobel filter applied to them at textures load time.
I hardly see anyone loading an extra set of texture to accomplish an effect that could be costly performance wise if no VS (no need for PS at this time, check my vertex shaders accelerated perpixel lighting) is used to accelerate the light location transforms…
On the other hand, using PS would provide accurate per-pixel lighting with distance attenuation which shouldn’t require even a primary texture set. As a matter of fact, even a shape with basic appearance could use that lighting technique

http://www.paulsprojects.net/opengl/ppatten/ppatten1.jpg

fwiw, I’ve implemented per pixel lighting a few times never very generically to be honest and never with shaders.

In the past a few games have used per pixel lighting, and this was before shaders so I suppose there’s a tradeoff to be made.

Either way, if shaders arn’t supported something has to be done when a PerPixelPointLight is added, I guess just falling back to normal PointLight would be an option…

Kev

JCD,

I will definitely take a look into your shader implementation, because of I need VPs for my project nearest days. Unfortunately, last two weeks I was quite busy and had no chance to do this earlier - sorry…

Yuri