Kaleidoscope on 23/4/2017 at 13:15
I've got my mission set in a kind of town square, a couple hundred units to a side. Now that I've started to fill in things like streetlights, and light spilling out from the houses around the edges I'm getting some noticeable hits to framerate - especially when looking at the house which forms the focus of the mission, and which has a lot of glass windows (as opposed to texture windows).
Through some experimentation I've found that blocking line of sight to that main house from across the square helps a lot here - I guess because the lights inside don't need to be rendered when they can't be seen. But this breaks up the visual flow of the map, and I'd like to avoid it if possible. Are there any "cheats" I can use here? If I alter the properties of the interior lights to reduce their range from infinite to something like 100 will that reduce the load on the engine for the same number of lights?
If it comes down to it I'll scrap the square and set the mission on a narrower street where line of sight can be controlled better and fewer lights are needed for the space. But I'd like to salvage the concept if possible, so any help or advice would be appreciated.
Yandros on 23/4/2017 at 13:29
Well, first of all, you should almost never set any light's radius to infinite, for gameplay reasons as well as performance reasons.
Unna Oertdottir on 23/4/2017 at 13:35
Use dds textures with mipmaps. Set mtls.
Use LODs on objects, even on sfx (or fade them in)
Use a radius on lights
Kaleidoscope on 23/4/2017 at 13:53
All lights spawn with infinite (0) radius by default, right? I've been leaving most everything at default values so far, but good to know I was on the right track with changing that.
john9818a on 23/4/2017 at 20:01
I typically set a radius of 20 on most of my lights. Almost all of the stock lights in the dark.gam or a gamesys derived from dark.gam have a default of 0 or infinite. With lights set a infinity there's no real clear line of where the light shadow stops/starts, so it's as if the player is always in the light unless he/she can get really far away from all of the lights. The game engine has to do a lot more work when a more desired effect can be achieved with limited radii.
nicked on 24/4/2017 at 09:33
DDS textures make the biggest difference in my experience. It's a simple change but can add double digits to your framerate.
gamophyte on 24/4/2017 at 15:48
Quote Posted by nicked
DDS textures make the biggest difference in my experience. It's a simple change but can add double digits to your framerate.
I downloaded a plugin for photoshop and got overwhelmed with the save dialog box having so many options. Is there a recommended setting? At work right now, or I'd show a screenshot of what it looks like.
Unna Oertdottir on 24/4/2017 at 15:58
The recommended setting for dds textures is
always generate mipmaps and DXT1 compression for terrain and object textures
DXT3 or DXT5 compression for transparent object textures
gamophyte on 24/4/2017 at 16:43
Thank you Unna!
ZylonBane on 29/4/2017 at 15:53
Quote Posted by Unna Oertdottir
DXT3 or DXT5 compression for transparent object textures
You mean for textures with an alpha channel. If a texture is only made transparent at the material level or in DromEd, you still use DXT1.