xtom Posted January 9, 2015 Share Posted January 9, 2015 When I place 9 or more buildings in my scene I get the one of the following errors.. Failed to set shadowmap texture. Failed to set clipmap color texture. The buildings aren't too complex, all brushes with 3 light entities in each. My system specs are.. AMD APU A10 5800K 3.8Ghz Integrated Graphics Radeon HD 7660D 8GB 1600 Ram Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
xtom Posted January 9, 2015 Author Share Posted January 9, 2015 I ran another test this time with 60+ buildings but only 3 of them with lights - no error messages. Must be because of too many lights? Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Josh Posted January 9, 2015 Share Posted January 9, 2015 Try calling World:SetLightQuality(0) and see if that makes a difference. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
xtom Posted January 9, 2015 Author Share Posted January 9, 2015 World:SetLightQuality(0) with 24 buildings(72 lights) and the game runs with no error messages. Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Josh Posted January 9, 2015 Share Posted January 9, 2015 I think the APU just can't handle as much VRAM. Can you tell me the line of your program log that gives the name of the graphics card? I could make the engine automatically use low-res lighting when an APU is detected, since this is the same as Intel integrated graphics. Syncing Workshop Items...Initializing... Initializing OpenGL4 graphics driver... OpenGL version 440 GLSL version 440 Device: GeForce GTX 780/PCIe/SSE2 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
xtom Posted January 9, 2015 Author Share Posted January 9, 2015 I have dedicated 1GB of ram to vram to help ensure games run well, really this should be enough for the scene I have with just 9 lit buildings. My system is not high end but it can run the likes of Arma3, Battlefield 3 pretty well on average settings. In general I run all my games with high texture settings because video memory was never a bottleneck. Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Josh Posted January 9, 2015 Share Posted January 9, 2015 The only other recommendation I have is to update your graphics driver. http://support.amd.com/en-us/download/desktop/previous/detail?os=Windows%208.1%20-%2064&rev=14.9 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
xtom Posted January 9, 2015 Author Share Posted January 9, 2015 I found out something good. I had 3 ceiling lights in the building and they overlapped each other. If I remove the middle light and now none of the lights overlap I can place lots of buildings with no error message! Tested with 40 buildings (80 lights) and no error message. Tip of the day: Don't overlap your lights! Probably some memory intensive goings on when the lights overlap. Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Josh Posted January 9, 2015 Share Posted January 9, 2015 That doesn't make any sense to me. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted January 9, 2015 Share Posted January 9, 2015 I had 3 ceiling lights in the building and they overlapped each other You can overlap lights as many as you want, it's just pure rendering. Tested with 40 buildings (80 lights) It's too much real time lights, something i would avoid in any real time game. Stop toying and make games Link to comment Share on other sites More sharing options...
xtom Posted January 9, 2015 Author Share Posted January 9, 2015 Ok that's not what it is then because I went back to getting the message again with just nine buildings again somehow. However I have started again and right now I'm up to 20 buildings and it's running fine. I'm going to mess around it with it more to see if I can figure out why it limits to 9 sometimes and other times I can get more in there. There must be some reason for this. Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Josh Posted January 9, 2015 Share Posted January 9, 2015 Each point light is 6 1024x1024 four-byte shadow maps, so that equals 24 mb at high resolution. If they are double-buffered, that makes 48 mb per light. With 80 lights, that equals almost four gigs of VRAM. So yeah, don't use the highest quality light setting. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
xtom Posted January 9, 2015 Author Share Posted January 9, 2015 I have 30 working again now (somehow) so thats 60 lights. Wow so that's a lot of memory. I was thinking of making a game with terrain and a few small towns, and in those towns would be some buildings with lights. Is this feasible? If they are far enough apart is memory freed up for other lights as you get further away/closer to them? Or is it a total amount of memory that is consumed from the start to end? I won't have 60 lights too close to each other at one time like in this test, but there could be more spread across a big game. Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Thirsty Panther Posted January 9, 2015 Share Posted January 9, 2015 Don't know how to do this myself but you can use sprites as lights. I'm not sure of memory usage of the sprite solution but it may solve your problem. http://www.leadwerks.com/werkspace/topic/9876-sprites/ Link to comment Share on other sites More sharing options...
xtom Posted January 9, 2015 Author Share Posted January 9, 2015 Thanks, that looks interesting Thirsty, at the moment I'm just experimenting with what is possible with the default tools but I'll check that out too. So I tested the different light settings 0 - 2 on my current 30 building test map and it runs on all settings without the Failed.. error messages so I'm not sure why it sometimes fails. Low quality looks fine though and will probably suit a terrain/town game so I don't mind using that if I have to. High qulaity ran too (very laggy) but it still ran, at least this time! Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Josh Posted January 9, 2015 Share Posted January 9, 2015 I'm actually going to half the default resolution of the spot and point lights, based on this. That will reduce the memory usage by 75%. You can also switch the lights' shadow modes to static+dynamic, and that will cut the memory usage by a further 50%. So we can get your mem usage down to 12.5% what it would be otherwise. 2 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
xtom Posted January 9, 2015 Author Share Posted January 9, 2015 Wow that will be a massive memory saving! I will will try out the static+dynamic option, thanks for the advice. Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Josh Posted January 9, 2015 Share Posted January 9, 2015 The new build is available on the beta branch now. I am going to close this thread. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts