Jump to content

  • Log In with Google      Sign In   
  • Create Account

RippeR37

Member Since 05 Jun 2011
Offline Last Active Jul 21 2013 04:15 AM

Posts I've Made

In Topic: Managing scene's (level's) geometry - how to do if efficiently

20 July 2013 - 02:52 PM

You can use a distance check to disable whatever is off screen.  if(modelPosX > -5.0 && modelPosX < 5.0){displayArea_1();} helps a lot to manage top view and side view games.  Also if you isolate collision + animation within these screen-sized chunks then you can get really carried away for every discrete area.

But then i guess u mean that every mesh has its own VBO, right?
 

 

when you change rooms it's only vertically or horizontally, then you will never have to display more than two areas at a time which gives you lots of flexibility in how many draw calls, texture and shader swaps can take place.

I plan for it to be outdoor top-down shooter. Something similiar to Left 4 Dead, but top-down, now for PC and maybe in the future for Android(/iOS). Test pic (a lot to do yet): http://i.stack.imgur.com/XC0ga.png S(it had some debugging on so actually rendering time is not even half now)

I thought about making group of objects but it doesnt help me too much, if i put - in example - all trees in one VBO...
 

 

p.s. You mentioned something about creating the required VBO's every frame.  I would say, avoid that.  Even changing them per-frame can stall things, I imagine creating them per-frame will be far worse. My imagination can't be stretched far enough for me to come up with a good reason to do this.

I guess i'll have to update my shadow-map generation so that i'm not creating new texture every frame (for each light) but use same texture and just update it... Luckily its only couple lines...

In the end i still dont know how should i keep it. Group it by position in bigger VBOs and use only 2-4 VBOs per frame looks best, right? But the question is - should i keep it in VRAM or RAM and just send it if i need it? 2nd option would allow me to create very big maps since it holds very little data in vram (and ram is usally much bigger), but seems slower...

Btw. as i asked before - how slow is binding VAOs, binding VBOs, binding Texture, drawing 100 triangles, drawing 100k triangles, drawing 500k triangles, turning of depth test, something else that could be important here too, etc. ? I'd like to know what should i avoid and how hard should i optimize things to use as few as possible. 


PARTNERS