Rick Posted October 15, 2010 Share Posted October 15, 2010 Is the light calculated on the current 3D world data or the buffer that the 3D world was drawn on? So for example, if I draw the world, then change the world, then draw the lights, would the lights be done on my altered world and not was draw to the buffer before I altered it? I'm assuming that's how it works. I assume the rendering of the lights doesn't use the buffer as information, but just to draw to and it gets it's info from the current world geometry. Quote Link to comment Share on other sites More sharing options...
Canardia Posted October 15, 2010 Share Posted October 15, 2010 Yeah, it has to be that way, since you need 3D models to light something, not just a simple picture. 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...
Rick Posted October 15, 2010 Author Share Posted October 15, 2010 That's what I figured, I just wanted to make sure before I take on this adventure to code all of this demo around that idea. Quote Link to comment Share on other sites More sharing options...
Rick Posted October 16, 2010 Author Share Posted October 16, 2010 This doesn't seem to be the case. I have the following and I still get the directional light affecting the inside of the building, which if the lighting took into consideration the world geometry and not what was drawn onto the buffer wouldn't be the case. SetBuffer(buffer); TriggerShowHide::Hide(); // This would hide the roof RenderWorld(); SetBuffer(BackBuffer()); TriggerShowHide::ShowAll(); // this would show the roof RenderLights(buffer); // Send to screen Flip(0); Apparently this is impossible with LE *sigh*. Man, every time I get a concept for a game it gets slowed or killed by LE making it such a pain to get working. So frustrating. Quote Link to comment Share on other sites More sharing options...
Masterxilo Posted October 17, 2010 Share Posted October 17, 2010 The lighting just lights what was rendered onto the buffer on SetBuffer(buffer); RenderWorld(); , it doesn't take any changes you make to the world after rendering it into account. You can easily make an object invisible yet still cast a shadow (meaning what is below won't be affted by the light making it cast a shadow), I think Josh already showed how to in your other thread. The idea is to use a material that doesn't render anything with it's normal "shader", yet has a "shadowshader" that renders the object solid. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Rick Posted October 17, 2010 Author Share Posted October 17, 2010 Nothing has given the correct results so far. I tried what Josh had and it didn't seem to work. I tried some other variations and still wasn't able to get it to work. The closest I've come is getting the roof transparent but the lights I have inside the building weren't being drawn. Quote 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.