Real-time, dynamic, striplighting in Blitz3D
Community Forums/Showcase/Real-time, dynamic, striplighting in Blitz3D
| ||
![]() I've not seen this done before in Blitz3D. Although, I take into account it is not that hard to achieve. The striplight pictured is irrelevent as it is not the actual striplight mesh/model. I just made the light mesh out of 2 spheres connected by cylinders to demonstrate it. It is the light being cast on the surface that is important. I have dropped the light close to a surface to show it is a striplight and is lighting as such. Obviously, as with a real striplight, if it is not near a surface then you cannot see it is a striplight casting the light. The light can be moved and rotated dynamically over a surface, or multiple, surfaces and continue to real-time striplight a surface, or multiple surfaces. This is real-time lighting. Of course, you can have whatever colour you want. It doesn't have to be a striplight - this technique can create a square light, or a zig-zag light - even a "Mickey Mouse"-shaped light. It can also create multicoloured lights - ie imagine a neon sign which uses more than one tube colour. Personally, I find it very exciting; however, I will understand if people deem it useless and boring. EDIT: I should have pointed out that no hardware (DX lights) are used. |
| ||
Nice work! |
| ||
Pretty neat, I can imagine a neon-encrusted game world. |
| ||
Its only exciting if its fast. Show us a demo or video in a real scene :) |
| ||
Pretty fast. You can switch on and off the 'light-cells' in the tube, so you can control just how many are lighting a mesh - ie you can just enable every other cell of projected light or skip two, use one, skip 2, use one, etc. Bare in mind you would only light very near services with the 'striplight' method. Other that that it is a glorified, stretched, point light. |
| ||
Dr.Puki, do you mind to show your magic trick? |
| ||
It is part of the pLS - '"puki" Lighting System'. I showed a picture of it in my first post. |
| ||
You using vertex colour, EFPS (that was used in Hunted) now uses vertex lighting and sees what vertices the light can see and what the light will reach and in what intensity the good thing about that is I can have as many lights as I want and they dont slow the engine down a jot and work on old hardware. |
| ||
![]() This is an example with 3 striplights with every other light-cell deactivated. EDIT: The red tube is pitching into the ground. The other two (red and blue) are just rotating flat. |
| ||
would be nice to see a demo of this |
| ||
Stripey light (with a crude physical light mesh of cylinders and spheres):![]() EDIT: The cylinders and spheres are scaled to .03,.03,.03 |
| ||
Cool. Now strap it on top of cop car and make them spin around in real time, with the light bouncing off some walls :) |
| ||
Yeh, you can do that - they can light multiple surfaces/meshes. It is just a case of projecting the transformation per surface or mesh. The lighting is unique per surface/mesh, so you can alter lighting density/strength and position uniquely, per surface/mesh. |
| ||
Do you just loop through every vertex, then calculate how much light that vertex has from angle and distance, then apply that to vertex color? |
| ||
Looping through vertices is far too costly. There is no form of picking going on either - that also would be too costly. |
| ||
Great ;) |
| ||
Well, puki, why don't you describe your technique or release some sources? Otherwise this thread is quite pointless. |
| ||
No nawi, it isn't, as this is the Showcase threat, not the code archives. This is fun to watch develop. Add more stuff as you go along Puki! |
| ||
Looks cool. Why would he have to share the "recipee", can you not admire the tasty cookies infront of you? Would be interesting to see a little youtube video! It kinda looks like it is proecting blob sprites onto the floor... |
| ||
No blob sprites - this is real-time, dynamic, lighting. |
| ||
Looks like a nice effect, well done! |
| ||
I uploaded a video to YouTube: http://www.youtube.com/watch?v=qkLSi31v2F8 The footage seems choppy at the beginning - that is due to me moving the camera closer to the tube. EDIT: Having to convert and compress the footage didn't help the quality or fluidity, but you will get the idea of it. |
| ||
thats pretty cool looking puki. i agree with Uncle in that you should attach it to a cop car, and have it go around a fake neibourhood block, that would deffinately be cool to see. or maybe have a soda machine in a corner casting a randomly flickering light (multiple colors for the effect of the light shining through the plastic front cover.) |
| ||
Yeah the video looks very slugish from start to finish. Should have had fraps running to show fps. I was curious about the light range as well, all the shots and your vid have a fairly small range, is this just your choice for show, or a limitation of the system ? |
| ||
Range is not a factor. The example shows micro-lighting. If you pull the striplight away from a surface it will eventually blend the light, as it would do in real-life. The whole point of the video was to keep the light close to the surface. I was just proving the fact that it is real-time and that it can move and light at the same time. |
| ||
Anyway, this whole striplighting thing is just an offshoot of my lighting system. I'm just toying with it at the moment. The main basis of the system is to put light on a leash. I was fed up of light passing through surfaces, so I decided to create my own real-time lighting system. So, if a wall is in the way of a light, it won't shine through, etc. |
| ||
How fast is it? did you analyse the performance on extreme situations? |
| ||
Fast enough for me - I'm using high poly meshes. You lot should make some striplights and test the performance. I don't like the fake, textured, striplights on the doors/walls in Doom 3: ![]() I wanted proper ones - so I went ahead and developed them. They work. |
| ||
well doesnt look like you want to spill the beans :) so i took a crack at it.. about 15 minutes worth. This could easily expand into somthing better, but I only did this while waiting on my dinner. Wich should be about ready now :). EDIT.. updated I had a small typo in there , I also added a global light so that it wasnt two lights in complete darkness |
| ||
So how close is this puki ? Not close enough. |
| ||
Not close enough. Close enough for ? if theres a prize, it has to be over 500.00 USD, 15 minutes is all you get for free :) |
| ||
Why did you use LightMesh? Remember that puki posted a vertex lighting thread a while ago, so I think he's lighting manually the vertices, based on the distance from lights and stuff like that, simple occlusion verification using linepicks, etc. |
| ||
Why did you use LightMesh? Because lightmesh is faster than manually running through the verts and checking anything. Remember that puki posted a vertex lighting thread a while ago, so I think he's lighting manually the verticesLooping through vertices is far too ...hm :) puki (Posted 1 day ago) #15 Looping through vertices is far too costly. There is no form of picking going on either - that also would be too costly.. im pretty sure hes breaking the meshes apart to small peices and doing close to what i have posted there, but only he can clarify that, and I think hes enjoying the attention too much to let it go just yet :) |
| ||
You're probably right :D |
| ||
Looks cool however it is being done :) |
| ||
And my simple example :) |
| ||
I guess you really need a subdivided quad on the ground to show this. I hope you dont mind MikhailV, I added createsquare to my example too :) Only I made a small array of squares so the light will not illuminate those sections not visible to each light entity. |
| ||
@RifRaf: This is a simplest example, made for 5 minutes :) I think Puki too uses LightMesh function. |
| ||
Very nice puki! You seem to be pretty good at doing lights, because this isn't the first time you've shown off your lights in the show case :) I think it looks very cool. (Although a cop car would look even cooler) WALNUT |
| ||
I have unlocked puki's secret! in this image ![]() (I hope you dont mind me borrowing it puki) look at the white light... does it not look like the white "strip" light is in reality 4 point lights? just pointing out the obvious... |
| ||
does it not look like the white "strip" light is in reality 4 point I thought this was out in the open from the start :) This is an example with 3 striplights with every other light-cell deactivated. |
| ||
3 striplights with every other light-cell deactivated. oh my bad.. so whats that supposed to mean? |
| ||
It means the mesh is split up into a number of "light-cells", with every other light-cell deactivated. |
| ||
oh ok so puki do you have shadow effects with this pLS (puki lighting system)? or no? |
| ||
Isnt it just a projected mesh for each "light" with a gradient texture on it? |
| ||
Here, have a free book (worth £45.99/ $59.99): http://http.developer.nvidia.com/GPUGems/gpugems_copyrightpg.html "puki" clutches his Blitz3D teddy bear and scampers off in search of sweeties. |
| ||
Isnt it just a projected mesh for each "light" with a gradient texture on it? no that would be way too slow. Im sure MikhailV hit the nail on the head with his example. |
| ||
It certainly is an interesting way to do it. although i can see it not working any better than a dx light unless the mesh is split up appropriately. Nice stuff though. |
| ||
i can see it not working any better than a dx light unless the mesh is split up appropriately Ah, but standard DX lights (unless 'hacked' not to) will pass through surfaces which will destroy the intended precision/micro-lighting effect. Clinical, precision, dynamic, real-time lighting is the future of everything. You have to open your mind to what else can be achieved. How can you avoid multiple TFormPoint calls for multiple lights and multiple surfaces - all of which are dynamic and can be moving? "puki" knows. |
| ||
haha puki I am determined to crack your secret... but first show us an example of multible lights and cubes/spheres casting shadows.. ;) this is the showcase after all |
| ||
I patch my shadows through FastExtension. I'm sure "MikhailV" will figure it out and steal it. |
| ||
Mmm, all of the images in the thread have died (not just mine). |
| ||
No they haven't, at least I can see them. |
| ||
I patch my shadows through FastExtension thats cheating... well if you plan to release pLS that is you will have to require all users with pLS to have fast extension. |