Josh Posted January 24, 2015 Share Posted January 24, 2015 From what I have seen, I think you guys are going to degrade your performance by trying to hack on an extra culling system. 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 24, 2015 Share Posted January 24, 2015 We are playing around with the view range and that might be the ticket, but we plan on having a fairly large town (we have some ways to repeat some geometry but still make it seem unique). So having all the thousands of entities that the interiors require to be loaded at once will be a test that we try to see how much memory is taken up and how the editor responds. This is a constant learning process on tweaking things to meet our game requirements. We are getting there. Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 24, 2015 Share Posted January 24, 2015 This works pretty well, just need one parse in the start() (saves you from setting viewrange manually) --optimize scene place objects in viewrange based on their aabb radius. for i=0,world:CountEntities()-1 do if world:GetEntity(i):GetClass()==Object.ModelClass then local aabb=world:GetEntity(i):GetAABB(Entity.GlobalAABB) if aabb and aabb.radius < .1 then world:GetEntity(i):SetViewRange(0) elseif aabb and aabb.radius < 1 then world:GetEntity(i):SetViewRange(1) elseif aabb and aabb.radius < 10 then world:GetEntity(i):SetViewRange(2) elseif aabb and aabb.radius < 20 then world:GetEntity(i):SetViewRange(3) else world:GetEntity(i):SetViewRange(4) end end end 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 As we're finding out with this much detail we need to set the view range in the editor or the editor gives us issues and crashes. I assume setting in code at run-time doesn't hold over to design time. Quote Link to comment Share on other sites More sharing options...
shadmar Posted January 24, 2015 Share Posted January 24, 2015 That was just for runtime. 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 I see. The thing is we have to set the models view range manually when we place them (have to check if that field holds through prefabs) or else the editor will choke out and crash given the number of things we have when we are designing our town. Design time is more of an issue for us than run-time at this point since we are pointing the camera all over the place to move around freely. Since our camera is a top/down camera at run-time there isn't much visible by the camera, at one time anyway, and the FPS is fairly good when this is the case. The dynamic loading/unloading process at run-time we do is more about memory/entity count management than anything else. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 25, 2015 Share Posted January 25, 2015 The thing is we have to set the models view range manually when we place them (have to check if that field holds through prefabs) or else the editor will choke out and crash given the number of things we have when we are designing our town This could be an interesting suggestion topic : Optionnal View range field in model properties on the editor --optimize scene place objects in viewrange based on their aabb radius. for i=0,world:CountEntities()-1 do if world:GetEntity(i):GetClass()==Object.ModelClass then local aabb=world:GetEntity(i):GetAABB(Entity.GlobalAABB) if aabb and aabb.radius < .1 then world:GetEntity(i):SetViewRange(0) elseif aabb and aabb.radius < 1 then world:GetEntity(i):SetViewRange(1) elseif aabb and aabb.radius < 10 then world:GetEntity(i):SetViewRange(2) elseif aabb and aabb.radius < 20 then world:GetEntity(i):SetViewRange(3) else world:GetEntity(i):SetViewRange(4) end end end Thanks for the tip. Quote Stop toying and make games 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.