Will pay for cone light implementation

Hi!

I dont got tons of cash lying around, but I’m willing to pay a resonable amount of cash to get the ability

to have conelight and create such effects found in l4d:

http://www.youtube.com/watch?v=UF1HVlcXBmA


At 2:36 - 2:45 is about what I need.

Shadows on wall. And textured fence shadow.

I’v heard these things are connected and that there’s some kind of Material or something that needs to be imported…



I’m not really sure how to do it, I havnt learned matrix calculations nor quaternions yet and because of that I might not be able

to do this myself.

So I’m asking some kind soul to do it and I’ll pay.

I’d say I can pay around 20-30$, not currently tho but soon.



Can I do this by myself, if so how? Or are you willing to implement it?

prerendered video, ok let the user wait 6 hours for 1 frame = 3 years for 1 min of ingame time.

Yeah, don’t expect this kind of visual using live rendering… Still a cone light should be possible, its not much different from the current lighting really, you could already move a point light with a small radius across walls to achieve a similar result I guess. Looking at how it works out just tweak the lighting shader so that it works the way you want it.

1 Like

Has anyone seen this game yet?



http://www.youtube.com/watch?v=-syxOHFqN0k



Everytime I hear people talking about cone lighting I think about this, but then I realize they probably want the first person version of it which is easier to fake :p

~FlaH

Ahh thats brilliant norman!

If I shoot a ray, Then I place the light at the location of the first collision and set the light radius to be simulating

the intensity of the light.

It’s too bad I cant just set the intensity of the light, THAT should really be implemented.



Ohwell, GREAT idea norman, Ill get right to work trying to achive that :slight_smile:

It will look so much cooler!

Also working on a new, better looking zombie, when I got light and realistic zombie It will be pure awsome :smiley:

“Intensity” of light = Brightness of its color

1 Like

LOL how stupid I was :smiley:



I was thinking of that, but all i’v used before is the ColorRGBAs static colors.

Riiight I can make my own :stuck_out_tongue:



Theanks :slight_smile:

It didnt work as good as I tought it would.

Heres a video showing one of the major flaws with using this technique:

http://www.youtube.com/watch?v=ZxKMESMXd-8



As you can see here, the light will be close to the first ray hit in rootNode.
Problem is that if you go around a corner with the light, or an edge, then the light will go inside the house and suddenly all light has disappeard from the outside of the house. It also doesnt look too good on the pavement, doesnt seem to really hit it..
Even if I were to use more than one pointlight and divde them equally over the distance, I would have to have
unresonably many lights to reduce the light around corner problem.

How about dividing multiple lights over the screen instead? shoot a few rays around and put lights there instead along a single line, may just help you faking the cone of light effect

I could do that, but still, would take 50 or more lights per conelight to create that effect.

It would lag too much and still dont achive the real effect…

Actually i guess this would be possible with a postprocessor.



get the depthbuffer, so you knwo the distance, then use the formular to define the cone and test that way wich fragments are in the cone and brighten them.

@Addez

What you could do to resolve the issue with the corners, is to put a limit on the distance that the pointlight will be placed at. Also, I couldn’t tell really from the video whether you were varying the size (radius) of the pointlight based on distance from the player or not, but that might also make a difference when trying to go for realism.



I have been trying to work on a spotlight/conelight implementation for the engine, but recently had to take on a new project for my business and haven’t had much time. Also, delving into the lighting shader is no simple task. It’s not coded in an apparent way imho.



@normen

Were you involved in the lighting shader, or do you at least have a good handle of how it works? It’s not making much sense to me at the moment and I could use a little guidance.



-Feen

Great!

I can help if needed maybe. Im not sure what to do but I could try if you need a hand :slight_smile:

SpotLights should be a core feature, and achieved through the lighting shader. It’s planned, there is already a SpotLight entry in the light type enum.



@Addez 50 lights will kill your frame rate, remember the scene is rendered once per light.

EmpirePhoenix said:
Actually i guess this would be possible with a postprocessor.

get the depthbuffer, so you knwo the distance, then use the formular to define the cone and test that way wich fragments are in the cone and brighten them.

I was thinking about the same thing before I got to sleep yesterday hehe. For a little more advanced user, it might be an idea to even use techniques alike the lightscatter filter perhaps? I wonder what one can obtain by turning the thing around, casting lightscatter rays from the camera's point into the scene :P

Well I though more like a inverse shadow, that casts light instead of shadows. However this is fa over my level of shader understanding at the moment so i’m not sure if thats possible.

As for only a simple flashlight, can’t I extend/modd lighting.jm3d by changing the frag file

so that it will set the brightness of each pixel according to the brightness of a given images pixel.



So forexample my window is 400x300

so I have a black image with a white circle in the middle. The image size is 400x300.

In the frag then it checks the projectionspace image and use the whitecircle image as a sort of glow map on that one?



It would do for my flashlight actually, but is it that “simple”?

Not quite, what you mean was the “post processor” approach outlined some posts before. Since you also have the depth information of every pixel, you can make it even more exact. You don’t need to change the lighting material for this, just let the post processor light up the areas in question (or darken the others).

Okej.

So I make a new filer, add that to a filterpostprocessor then add the filterpostprocessor to the viewport?

If so, any filter you would recommend that I extend or should I just start from scratch?

The fog post processor is simple and uses depth information. I’d go with that and add a texture that acts the way the light looks (as you know most flash lights don’t have a perfect circular brightness pattern) and its intensity is calculated using the depth bufffer. Simple enough :stuck_out_tongue: