Ahiru Posted September 5, 2015 Share Posted September 5, 2015 Hi, maybe I have an old computer (2009 Mac), but since I want to use Babylon.js also for Smartphone users I can't expect my target user to have a high-end Desktop PC. That's why an effective rendering would be important for me. With the examples I've seen so far (I especially noted here: http://www.imajun.eu/imajun_content/index.php?is=4) I noticed that there are a lot more draw-calls than actually would be necessary. So my question is if it would be possible (or maybe it exists and I missed it?) to integrate a occlusion culling function to a camera? Quote Link to comment Share on other sites More sharing options...
reddozen Posted September 5, 2015 Share Posted September 5, 2015 There is no way to do this that I know of sadly. I'm going to be doing this somewhat manually based on assigning objects max view ranges, and doing distances to invisible bounding boxes based on the need to render objects inside buildings etc, or adjoining "regions" that you could reasonable get to between scene visibility updates. So I think you're only option currently is a kind of manual process. In the link you provided, it looks like they're kind of taking a manual process approach too, but giving you a tool to make it less painful. Quote Link to comment Share on other sites More sharing options...
Ahiru Posted September 5, 2015 Author Share Posted September 5, 2015 How do you set the view ranges? Are you calculating the distance to the camera in each "beforeRender"? Isn't that pricy, too? Or do you call a function every x render-times? Maybe you can provide a small playground-example? Quote Link to comment Share on other sites More sharing options...
reddozen Posted September 5, 2015 Share Posted September 5, 2015 You can do it through the LOD engine, by setting a max distance for LOD.var viewDistance = 100;mesh.addLODLevel(viewDistance, null); BeanstalkBlue 1 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.