Gadgetory


All Cool Mind-blowing Gadgets You Love in One Place

Chris Roberts on Engineering Star Citizen & Zone Optimization

2015-10-02
hey everyone I'm Steve from gamers Nexis dotnet and I'm back presenting the second half of our recent interview with star citizens chris Roberts the first half talks about some of the recent developments in the game but primarily looks at DirectX 12 both in an AP is in this part of the interview we talked about CryEngine and its architecture we talked about the methodology and approach to development of star citizen zoning and instancing system which is pretty critical to game and we've spoken about that in depth with Chris in the past so check the channel for instancing and you will find that if you search the channel for instancing and then finally huge thanks to all of you for the tremendously positive response we've received on these interviews lately if you want to help us figure out who to interview next or if you have questions for specific people star citizen or otherwise please tweet them out at us at gamers Nexus and I'll check those personally see what we can do and we'll set up more of these going forward because they seem to be well liked so that is all for the intro on this one hit the patreon link as always if you want to help us out in producing more of this content and remaining fairly independent from the traditional models of the Internet and enjoy the interview with Chris I'll see you all next time can you educate me on like a sort of canonical view of the render pipeline when you're drawing something like say character model or a ship or something like that what what does it look like a cry engine or to the GPU what are the sort of step-by-step processes when you're rendering something well essentially stuff gets pushed on to the red so what happens is in the sort of accumulation of the main thread render gets called and render basically on the matrix night just starts pushing the objects like you know the basically in branch and the core render objects and they get pushed on through sort of the render key and it gets pushed on with the information about the object including its location in 3d space because it's going to threaded so you can't depend on the stuff for sitting the main thread so just basically you know pumps all this stuff onto the render thread and then the main loop goes about doing its stuff again Wow the render thread carries on doing stuff so basically the rendering and the main loop that sort of happening concurrently all the time and just at the very end of the main loop that's a bit where there the work the main loop is done gets pushed off to the render thread and the render thread goes about the work of actually transforming at rendering anything on the rest of the stuff and you know then at that side on the 3d engine side it sort of does the various things it needs to do like you know the passes to the decks buffer and shadow Maps and all the stencils and stuff that you need for all kind of stuff and yeah blast it out you know it's the CryEngine rent beside itself you know it's a pretty tricky complicated piece so that's one that I would be personally like excited about replastering you have people here that actually wrote much of it so you know luckily they they they're all working they know it better than me because it's you know it's I would say that it's it was written back in the day where it was less modularize and less sort of object-oriented or based so there's a lot of sort of interdependent codes and checks on flags that have passed down through various levels and render that probably you wouldn't necessarily do today as well and so those are kind of things that very part of the idea is to sort of refactor the plumbing is sort of like you're gonna house it looks really pretty it's a really nice house but some of the Plumbing's a bit old and you know you don't want quite have to go in and redo the plumbing okay you may not necessarily realize that the Plumbing's got some of the issues that have after it the hot water will flow better hey yeah but you've got the you've heard on some of the cry tech people yeah yeah we have quite a few of the original car engine team so we we know we've got I think three of the original farcry team carried on doing some of the I'm from there and there and and then there's quite a few that have been from crisis one onwards from the engine team so we have a decent we don't have them all there's plenty of other ones that are also there's a big companies lots of stuff but you know we've got people that helped you know basically build the engine design architected so they know a free inside-out so so that's that's very beneficial for us it's usually if you're a licensee you wouldn't have that knowledge which is useful for us because we're trying to do something very different than you would normally use CryEngine funding and they must be honest what we're doing is different than doesn't matter whether it be unreal or unity or CryEngine we would a lot of the refactoring we we've been having to do we have to do yeah especially the 64-bit stuff 64 bits the thing also just kind of approaching spatialization and sort of kind of data passing differently because of the vast scale we have and scope and the fact that we can have a high density of like information and data but then also vast areas of nothing so you know more traditional sort of spatialization techniques like octrees and stuff aren't particularly useful for what we do so we need things a little bit more dynamic and a bit more slowly so that's that's something you've mentioned a few times with me now the octrees what what is that okay well basically it's just sort of like stuff dividing it's like I take a cube ah right and then I can get inside this cube and say just about to be subdividing into 4 more cubes okay now when you go into one of those tubes you can subdivide it into four cubes so it's just it's a it's a it's a way to sort of parse out essentially areas of data for like figuring out whether you're included or not included or whether you'd be visible at the camera fairly efficiently without having time it's flat like a flat list I was like it's one thing you could use up a flat list of objects and you could just check them against the view frustum whether they will be in the camera not the camera right but then you know if you have 10,000 objects in the scene you check against 10,000 now doing something like this you could say oh well you know you could you could basically take the view frustum you know and essentially figure out against country and then figure out what sort of containers essentially would be visible and then you would deal with the object size and so you move rent typically in the engines you move the the writer objects around these around an octree structure and it's just sort of an efficient way to kind of get to and pass and figure out what objects on what area pretty quick right but it's you know it's sort of more it's more rigid right it's sort of like you start with a certain size and subdivides down about that so it's not it's not quite as flexible or movable because we have issues like you know like this is what the zone system does is you know imagine having a planet right and this planet has City and other people on it right well there's own system and you know really what we call his own container holds all that now if that planet is orbiting right moving through our space right what would happen in an up tree because a nut tree has no a nut trees fixed that would mean that there the planet and the objects on it would all actually be transitioning from one part one area or the artery to another area tree you'd have to be moving them around you'd be sorting them inside your artery all the time right you're sorting thousands of objects but with us that's not the case because we have these zones with zone containers to do it the way you want to think of them and the seven containers contain their own a frame of reference and so we basically it's you know like a Russian doll you can take things to them things at the very top level we move the very top level around you don't have to move anything inside that top level they're all still relative to each other perfectly right so and so it allows us to do things like planetary orbits or ships flying around with lots of stuff inside and not worry so much about you know like moving around and moving them around a fixed spatial data structure so it's much more much more suitable for our uses it's not a typical use in a 3d game because usually in a 3d game the the structure itself is like you're walking around a map well that's fixed right right so you know the plants and the buildings they aren't moving so that's fine they can all be because the autry then allows you to sort of determine which plants are what part of building you see really quickly and the only things are really moving through them with things like your character or a bullet or something like that sure and so a typical shooter things like how most engines use and untreated for sort of its its kind of render like pipeline basically relative but you'll see what you won't see everything else but for us obviously it's not that suitable we'll be doing a bunch of work that we'd rather not be doing and and you you know and even though our trees are fairly efficient in sorting data and moving data around because you're just generally moving pointers around when it's a big enough space and a big enough data you know it does actually take an appreciable time so what we do allows for sort of the moving of because like you can always think of a big spaceship as a mini FPS level on a planet as many FPS level or something like that so it allows for the movement of these things without having to you know have the challenges of you know a fixed spatial data structure right we can and we can sort of scale the data structure inside each one of the zones to be appropriate for the data we have inside it that's this is why I love talking to devs who are more familiar with like the engineering side of things because we as you know we look at a lot of hardware mostly and to understand the hardware properly it really helps to understand some of the software driving it writes that's where my knowledge fool is really shallow so it definitely a huge help you get the walkthrough much appreciated on that and grow it all
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.