tjheldna Posted January 21, 2015 Share Posted January 21, 2015 Some sort of zoning and portal system to occlude unnecessary entities is well needed in this engine, something like in C4 and I think Unreal use it to for memory. I've created an almost identical scene in the C4 engine which makes very good use of these techniques and I can fit a comfortable 250 (300 but frame rate suffers) house models on screen at once. Even still if house models start to be occluded by zones etc frame rate is fine. I still have the option for LOD and did no texture compression. The same house model and interior in C4 I only get 80 - 90 house models on screen at once, which then crashes Leadwerks. I know we experimented with some dodgy house setups in the past as seen in some other threads, but this has been rectified now. I'm just thinking ahead and all about performance to handle the load as our scene gets bigger. I just don't think onscreen occlusion (whatever it's called) and distance culling is enough. I want to see optimisations that make this engine purr. Don't take this the wrong way as I know mentioning other engines is never popular, but I felt this needed to be said as it's a close to straight comparison as I can get and the vast difference been playing on my mind ever since. Cheers 5 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 21, 2015 Share Posted January 21, 2015 only get 80 - 90 house models on screen at once It's already good in LE3. Unity has same problem and they are just making possible bigger worlds with UT5. It's not a simple , easy task. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
nick.ace Posted January 21, 2015 Share Posted January 21, 2015 Are the house models instanced or are they unique? I'm just curious if it's related to a performance problem I've been having. Quote Link to comment Share on other sites More sharing options...
Guppy Posted January 21, 2015 Share Posted January 21, 2015 Sound like your asking for streaming terrain/maps - which wont really work with the current leadwerks map format I think ( you'd have to chunk up the map + model loading ) Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
gamecreator Posted January 21, 2015 Share Posted January 21, 2015 I think this problem will naturally be solved (likely with LODs) once vegetation painting is implemented. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 21, 2015 Share Posted January 21, 2015 I believe the main issue is via the editor itself. We already do our own optimizations during run-time. It seems that view range does help the editor (and should our game a little but it's a top down view so you don't see much anyway) but you are then limited in your overall view of your map and can't get a really good overview of it. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 21, 2015 Share Posted January 21, 2015 The built-in occlusion culling system makes old-school portal systems redundant and does away with the need for this. The house stuff you guys were doing was ridiculously inefficient, from what I saw...you had hundreds or thousands of entities making up each little patch of floor. You practically had a separate entity for each individual polygon. Quote 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...
Rick Posted January 21, 2015 Share Posted January 21, 2015 The house stuff you guys were doing was ridiculously inefficient, from what I saw I know we experimented with some dodgy house setups in the past as seen in some other threads, but this has been rectified now. Quote Link to comment Share on other sites More sharing options...
tjheldna Posted January 22, 2015 Author Share Posted January 22, 2015 The house stuff you guys were doing was ridiculously inefficient, from what I saw...you had hundreds or thousands of entities making up each little patch of floor. You practically had a separate entity for each individual polygon. I totally agree, like I said the ways of the past have been rectified and each house now is split into 3 entities only now: external walls, internal walls and roof and only have the internal walls + props appearing on a house when the player is within a certain distance from it. I literally tried every possible way of creating the house models to find out what was the most effective way of doing it and what we can get away with for the size of our project so we are not coming to grief when we are too committed and it's too late. I get this probably wont happen, but it's the suggestion box so what the hell. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 22, 2015 Share Posted January 22, 2015 So here is a question. Our interior (1 solid interior model NOT made up of smaller models) of the house is a separate model from the exterior (again this is changed now to be 1 solid model), and a separate roof model. If I'm looking directly down on the house so the camera can't "see" the interior (roof and exterior are in the way) I assume in LE the interior is still drawn because it's bounding box is visible to the camera? In other words, if a bounding box is inside another bounding box, that interior bounding box will be drawn? Quote Link to comment Share on other sites More sharing options...
Josh Posted January 22, 2015 Share Posted January 22, 2015 It doesn't evaluate each individual entity, unless that entity has individual occlusion mode enabled (in which case the AABB is evaluated, not the model itself, because that would be just as slow as just rendering it). Instead the routine discards chunks of the scene. This means it isn't pixel-perfect for each object, but it's much faster this way and eliminates big pieces of occluded scenery. Quote 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...
Naughty Alien Posted January 22, 2015 Share Posted January 22, 2015 ..this sort of things are usually much easier to control and get proper results with scene graph oriented (exposed to a programmer), rather then entity oriented system.. 3 Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 23, 2015 Share Posted January 23, 2015 Is this edit time or runtime? A simple grid system for occlusion usually works great if the default octree ranges aren't good enough. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Rick Posted January 23, 2015 Share Posted January 23, 2015 Edit time Quote Link to comment Share on other sites More sharing options...
tournamentdan Posted January 23, 2015 Share Posted January 23, 2015 How many triangles does one of the exteriors and roof have? Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 23, 2015 Share Posted January 23, 2015 ViewRange Far or Medium doesn't help either? Could you post your prefab/model so we can try it? Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Rick Posted January 23, 2015 Share Posted January 23, 2015 View Range does help. Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 24, 2015 Share Posted January 24, 2015 What I have done is to use different viewrange settings, like all entities with a small aabb uses Near or Medium, works nice for most interiors, chairs, and tables or lamps, weapons doesnt have to render when your not even close. While big items walls etc uses Far or Max. A house from 200m away doesn't really have to show the windows/doors or anything inside it. Mainly just walls and big stuff. Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB Link to comment Share on other sites More sharing options...
Rick Posted January 24, 2015 Share Posted January 24, 2015 Our interiors are prefabs that we load and unload at runtime to save memory and processor time since most things on the inside have scrips on them and we plan on having hundreds of houses in the scene. We precache one of everything at startup so loading unloading is instant and happens when we are in a specific range of a house. We are trying to be efficient with our memory and processor usage since we want large outdoor scene but very detail. Having a top down rts like view helps aid in doing that by dynamically loading and unloading entities as the player walks around. 1 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 24, 2015 Share Posted January 24, 2015 We precache one of everything at startup so loading unloading is instant What do you mean by precache ? a table of unique prefabs and you create new copy of prefab at runtime ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted January 24, 2015 Share Posted January 24, 2015 We preload 1 of every model/texture so during runtime when we load them only instances are created and that's instant. 1 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 24, 2015 Share Posted January 24, 2015 How do you manage when you need instancing ? Some level grid and looking where is the player on that grid ? Or simply is your level linear and you just check distance change ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted January 24, 2015 Share Posted January 24, 2015 Currently I do a bounding box check (ForEachEntityInAABBDo()) around the player once every 2 seconds or so. I cycle through the entities that exist and if it's a house exterior I load it's interior which is defined as a variable in the house exterior script. I track what we have loaded so when the character moves away from the house (their bounding box no longer includes the exterior house entity) we unload the interior (which is a prefab that has all the furniture and stuff). The trick with doing this is that we need AI to still exist and walk around inside houses so each house has it's own interior collision csg that is always visible in the map so the navmesh can be created and AI can move inside the house even though there may not be any interior model. We want our AI to be doing things in the world so even though we may not be near them (and so the interior models won't be loaded) they may still be moving around inside the house as if there were visual models. We are still sort of playing with this aspect though. Things can change with this. 1 Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 24, 2015 Share Posted January 24, 2015 If LE3 has plugin system and you would transform your zone load/unload system into a plugin, i think many of us would have baught it. We want our AI to be doing things in the world so even though we may not be near them (and so the interior models won't be loaded) they may still be moving around inside the house as if there were visual models. I don't think it's important to manage AI when you are far enought from a house, if it's indoor only AI ? How do you manage AI ? Do you activate and manage only nearest AI or do you manage far away ones ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted January 24, 2015 Share Posted January 24, 2015 AI can wonder around. They can go from inside to outside and outside to inside. The AI is the part I'm working on now so it's being shaped currently. 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.