Rick Posted July 28, 2010 Share Posted July 28, 2010 I was wondering how I can tell how much light is on some model. Say I want a game where you can use dark areas to hide, but those dark areas are dynamic in that sometimes light shines there and sometimes it doesn't. Is there a way I can tell this using some kind of light information or would I have to use some tricks to get this to work. I would prefer it to be real lighting information. For in the case where there is a round hallway with little side areas and a floating light ball travels around the hallway that shines light on one side of the hallway and then the other side, forcing the player to alternate sides to stay out of the light. There could be many different scenarios so faking this with triggers and such would kind of suck. Quote Link to comment Share on other sites More sharing options...
Canardia Posted July 28, 2010 Share Posted July 28, 2010 I would use some ultra low res buffer, like 32x32, and render the light of each object using a camera which is positioned at the object, then turned away from the player's camera, and then moved back that it's slightly outside the object's mesh's AABB. When the pixel in the center of the buffer is brighter than the current AmbientLight value, then it's hit by a light. If it's darker, the mesh might be black color, but it works then also because the black color eats all light, so even if it's hit by a light, it's not affected by it, so it's the same as not being hit by a light at all. You can do this routine maybe every 600th frame, since reaction time to light is supposed to be realistically delayed (iris adjustment, light speed limit, etc...), so it won't cost any FPS either. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 28, 2010 Share Posted July 28, 2010 Are you going to make a remake of Alan Wake? Quote Link to comment Share on other sites More sharing options...
Rick Posted July 28, 2010 Author Share Posted July 28, 2010 No, just play around with some ideas. Quote Link to comment Share on other sites More sharing options...
Mumbles Posted July 29, 2010 Share Posted July 29, 2010 Are you going to make a remake of Alan Wake? Sounds more like Splinter Cell to me since reaction time to light is supposed to be realistically delayed .. -> .. light speed limit Speed of light. Well, uh... It's pretty fast. "Frame rate" of the human eye is much more of limiting factor. That said, I believe that airline pilots have to demonstrate that they can see upto 220 frames per second Quote LE Version: 2.50 (Eventually) Link to comment Share on other sites More sharing options...
Davaris Posted August 8, 2010 Share Posted August 8, 2010 I love games with sneaking in them. Quote Win 7 Pro 64 bit AMD Phenom II X3 720 2.8GHz GeForce 9800 GTX/9800 GTX+ 4 GB RAM Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.