3D vs 2D which is better for Factorio?
3D vs 2D which is better for Factorio?
Being someone who likes to learn more about game development. As I would like to start trying to make my own (small and simple) game for fun. (Who doesn't?). I've coded a few mods for games in C/C++ and did a bit of modding with LUA a few years ago. Anyways. I was curious after scanning through all the files downloaded for the game. (I tend to do that with most programs). The game is obviously in 2D. Just looking at all the sprites including the different angles, and the animations. It has to be a lot of work for the artist. Under contact on the main website. I seen you had only one artist Albert. Which is amazing if you're reading this Albert you've done a hell of a job.
Which brings me to my question. Would it be better to render things in 3D? It seems like it would make the life of the artist easier to make new assets. Instead of needing to create new sprites for every possible angle. You would just create a 3D model and load it into the game world. It would require initially probably a lot of code just to rework it but in the long run it would be better. You would still have that isometric camera angle so it would still be the same game. I guess that's why they call it 2.5D? Kinda like Diablo 3, Starcraft 2, and a lot of others (I can't think of more off the top of my head). The more and more assets that are added to the game it would become more difficult to make sprites.
It would also enable future potential. For example if you wanted to do underground mining. Or to dig into a mountain to setup a tunnel, or make a base. The possibilities could be endless. However this is all guess work which is why I created this thread. What would be the pro's / con's of rendering the game in 3D vs 2D? Is it too late in the development process to switch over? Require too much development time? Wouldn't actually be beneficial to the current game or vision of where the game is heading?
Thanks for reading. Keep up the good work! Loving the game.
Which brings me to my question. Would it be better to render things in 3D? It seems like it would make the life of the artist easier to make new assets. Instead of needing to create new sprites for every possible angle. You would just create a 3D model and load it into the game world. It would require initially probably a lot of code just to rework it but in the long run it would be better. You would still have that isometric camera angle so it would still be the same game. I guess that's why they call it 2.5D? Kinda like Diablo 3, Starcraft 2, and a lot of others (I can't think of more off the top of my head). The more and more assets that are added to the game it would become more difficult to make sprites.
It would also enable future potential. For example if you wanted to do underground mining. Or to dig into a mountain to setup a tunnel, or make a base. The possibilities could be endless. However this is all guess work which is why I created this thread. What would be the pro's / con's of rendering the game in 3D vs 2D? Is it too late in the development process to switch over? Require too much development time? Wouldn't actually be beneficial to the current game or vision of where the game is heading?
Thanks for reading. Keep up the good work! Loving the game.
Re: 3D vs 2D which is better for Factorio?
Ok, this is a bit of new aspect into this ongoing discussion about 3D.
Just to have an overview:
https://forums.factorio.com/forum/vie ... 4&hilit=3d
https://forums.factorio.com/forum/vie ... 5&hilit=3d
Which points to this:
http://gamedev.stackexchange.com/questi ... in-2d-game
https://forums.factorio.com/forum/vie ... =3d#p17012
Just to have an overview:
https://forums.factorio.com/forum/vie ... 4&hilit=3d
https://forums.factorio.com/forum/vie ... 5&hilit=3d
Which points to this:
http://gamedev.stackexchange.com/questi ... in-2d-game
https://forums.factorio.com/forum/vie ... =3d#p17012
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: 3D vs 2D which is better for Factorio?
Reading that thread, a lot of the participants strike me as having little to no experience in the subject. I'm no game developer myself, but as a programmer, I have no doubt whatsoever that a switch to 3D rendering would resolve all the memory and fidelity problems. The only issue is the difficulty of implementation.
Re: 3D vs 2D which is better for Factorio?
The main issue is the performance. If everything was 3d, we would have 20 000+ 3d objects on screen instead of 20 000 sprites, i doubt it is possible to have it these days. The other way around would be to allow the zoomout levels drastically, but I personally hate it.
Re: 3D vs 2D which is better for Factorio?
what about keeping items\belts as sprites and rest as 3D?
Re: 3D vs 2D which is better for Factorio?
I think that for belts and things on belts you'd use objects with single surfaces, which are basically the 3D-engine equivalent of sprites. I have no idea of how well this would perform but they would be about as simple as 3D objects can be and still be useful.Garm wrote:what about keeping items\belts as sprites and rest as 3D?
Re: 3D vs 2D which is better for Factorio?
Like I've said I don't know much about graphics programming. I'm curious as to what the performance issue would be in particular. I'm trying to intellectually do guess work which is not easy lol. The 3 dimensional object is still projected as a picture (2D) which is essentially a sprite. The engine would need to determine where the camera is located which is isometric and you can zoom in and out and determine which parts of the 3D model to draw and just draw that. With a sprite let's say only half the sprite is in view. Does the engine render the entire sprite or only half the sprite? I don't know if that's done or even possible to essentially slice the sprite and render the slice(s) of it that are visible. If that's not the case wouldn't a 3D object in that respect have better performance?kovarex wrote:The main issue is the performance. If everything was 3d, we would have 20 000+ 3d objects on screen instead of 20 000 sprites, i doubt it is possible to have it these days. The other way around would be to allow the zoomout levels drastically, but I personally hate it.
Even so it's hard to imagine 20,000 3d objects over 20,000 sprites would have a huge impact on performance. If the game had a lot of moving objects. Most of the objects in factorio are static. Mostly because that's just the nature of the game. The only problem is the aliens. Even then if an alien moves you have to redraw the entire alien. With a 3D object you only render the parts of the object that are changing. Pretty much any part of the alien that isn't animated. You would have more control of what's being drawn. However I probably sound like an idiot by now.
It would be cool if there was a easy way to test the differences.
Re: 3D vs 2D which is better for Factorio?
You've described that you're hitting a wall in VRAM due to the sheer number of sprites the game requires. Going 3D is just a way to avoid that wall. Instead of a 16x12 grid of 32x32px sprites per tier of belt, each tier could have a single static 64x64 image of a belt drawn on a plane, animated by modifying the UVs each frame. Items can just be simple billboard sprites, and buildings would naturally be full models. Models would be encouraged to share textures, but at this point, you've bought yourself enough breathing room to put that out of your mind..
Again, I'm not suggesting that this is a change you should make at this point. Just food for thought.
This is where level of detail comes in. As the player zooms out, the buildings and critters can swap to a low resolution model with choppier animations, or even get replaced with very low resolution 2D sprites once their screen real estate drops to a handful of pixels.kovarex wrote:The main issue is the performance. If everything was 3d, we would have 20 000+ 3d objects on screen instead of 20 000 sprites, i doubt it is possible to have it these days. The other way around would be to allow the zoomout levels drastically, but I personally hate it.
Again, I'm not suggesting that this is a change you should make at this point. Just food for thought.
-
- Inserter
- Posts: 30
- Joined: Thu Feb 20, 2014 8:59 pm
- Contact:
Re: 3D vs 2D which is better for Factorio?
You can think of a sprite as being a single polygon, but the 3d models in the game would consist of dozens or hundreds of polygons that would make rendering, well, dozens or hundreds of times slower. Of course there are shortcuts, but sprites are just fast and simple.Drexir wrote: ...
Even so it's hard to imagine 20,000 3d objects over 20,000 sprites would have a huge impact on performance. If the game had a lot of moving objects. Most of the objects in factorio are static. Mostly because that's just the nature of the game. The only problem is the aliens. Even then if an alien moves you have to redraw the entire alien. With a 3D object you only render the parts of the object that are changing. Pretty much any part of the alien that isn't animated. You would have more control of what's being drawn. However I probably sound like an idiot by now.
It would be cool if there was a easy way to test the differences.
If you want to see a game rendered in 3d with a lot of repetition, take a look Cities in Motion 2. It can display quite a few buildings onscreen at once, but not quite the density needed for factorio I think.
Re: 3D vs 2D which is better for Factorio?
Factorio could be fairly easily and efficiently rendered in 3D. There is a lot of object repetition in the game, which means you can apply model batching on the GPU. It would work fairly well.
However there are always trade-offs. The key one would be that you wouldn't be able to get anywhere near the kind of intricate complexity the Factorio sprites have in its various machinery. You would loose the 'complexity' art-style it currently has.
I think 2D could work, however its fairly clear to me that its currently not using the best methods for rendering 2D games. Sadly I get the feeling that they'd need to rewrite much of their underlying engine framework. Might be better to move to a commercial engine at this point. However I'm merely an developer looking in from the outside and have no idea what is truly built under the hood.
However there are always trade-offs. The key one would be that you wouldn't be able to get anywhere near the kind of intricate complexity the Factorio sprites have in its various machinery. You would loose the 'complexity' art-style it currently has.
I think 2D could work, however its fairly clear to me that its currently not using the best methods for rendering 2D games. Sadly I get the feeling that they'd need to rewrite much of their underlying engine framework. Might be better to move to a commercial engine at this point. However I'm merely an developer looking in from the outside and have no idea what is truly built under the hood.
Re: 3D vs 2D which is better for Factorio?
what would be "lovely" is a 3d game where you build all the stuff... but have a way to go into a 2d view for a big picture of things... (throne room style)...
it's kinda the thing that i'm missing in minecraft last few months... applied energistics there has "taken everything over" and I miss having huge machines with pipes all over my base, sending stuff around and sorting and requesting and all that jazz...
but let's leave that for factorio 2 ;P
it's kinda the thing that i'm missing in minecraft last few months... applied energistics there has "taken everything over" and I miss having huge machines with pipes all over my base, sending stuff around and sorting and requesting and all that jazz...
but let's leave that for factorio 2 ;P
-
- Long Handed Inserter
- Posts: 52
- Joined: Wed May 07, 2014 11:05 am
- Contact:
Re: 3D vs 2D which is better for Factorio?
Hey, new player checking in. I personally love the 2d graphics. Not only are they visually pleasing and contain a certain old-school charm to them, but it enables me to play the game on weaker computer systems. From what I hear, a lot of people are impressed by how well Factorio is able to handle so many little things going at once.
A game like Banished (a 3d village/city simulator) starts to slow down for me when I reach a certain number of inhabitants. Meanwhile in Factorio I've built immense bases spanning several screens filled to the brim with assemblers, chemical plants, full transport belts and my 6 year old laptop can handle it all quite easily.
A game like Banished (a 3d village/city simulator) starts to slow down for me when I reach a certain number of inhabitants. Meanwhile in Factorio I've built immense bases spanning several screens filled to the brim with assemblers, chemical plants, full transport belts and my 6 year old laptop can handle it all quite easily.
Re: 3D vs 2D which is better for Factorio?
2D is best, 2d is way more detailed than 3d will ever be. 2d last longer because it looks better and has more detail.
3d is more demanding, and a game like this with 3d objects would lag even the worlds best pc to death, when you suddenly have 100.000 objects moving around. There is just no getting around this.
Its important to keep a game simple.
i have no doubt that going to 3d would be a huge mistake. This is a niche game.
Its still funny and sad to think about us who where kids back when the whole 2d vs 3d battle raged, 3D the new superior render to 2d. How many good games were ruined because of going 3d. Adventure games like grim fandango. Worms. you name it.
Some games find a sweet spot like 2.5d thats really wonderful for platformers. Think Trine 2 and Giana Sisters twisted dream are the most amazing most beautiful platformers ive ever seen.
People had this whole discussion btw over at Openttd, which is a open source transport tycoon port, which is about mainly building trains, you dont have that many trains 1-2000 will kill most pc's even if 2d. Some people tried with 3d, but again, it takes so much more effort and work, to make it look barely as good and often way less detailed, and again no pc could run it.
I feel like people often underestimate how demanding moving objects in 3d really are.
3d is more demanding, and a game like this with 3d objects would lag even the worlds best pc to death, when you suddenly have 100.000 objects moving around. There is just no getting around this.
Its important to keep a game simple.
i have no doubt that going to 3d would be a huge mistake. This is a niche game.
Its still funny and sad to think about us who where kids back when the whole 2d vs 3d battle raged, 3D the new superior render to 2d. How many good games were ruined because of going 3d. Adventure games like grim fandango. Worms. you name it.
Some games find a sweet spot like 2.5d thats really wonderful for platformers. Think Trine 2 and Giana Sisters twisted dream are the most amazing most beautiful platformers ive ever seen.
People had this whole discussion btw over at Openttd, which is a open source transport tycoon port, which is about mainly building trains, you dont have that many trains 1-2000 will kill most pc's even if 2d. Some people tried with 3d, but again, it takes so much more effort and work, to make it look barely as good and often way less detailed, and again no pc could run it.
I feel like people often underestimate how demanding moving objects in 3d really are.
Re: 3D vs 2D which is better for Factorio?
Factorio will not move to 3D. That would be too much of an overhaul. We did consider rendering some entities as 3D models (trains for examples) to save the video memory but even that would cause a lot of headaches, because they wouldn't look consistent with the rest of graphics.
Re: 3D vs 2D which is better for Factorio?
I think if you had the chance to start again going 3D with animated textures would have been the most beneficial both technically and visually. It would be a fine balancing act but if you blocked out every object in 3D and applied very similar animated textures you'd have very likely been able to apply a lot more texture batching than you do currently.slpwnd wrote:Factorio will not move to 3D. That would be too much of an overhaul. We did consider rendering some entities as 3D models (trains for examples) to save the video memory but even that would cause a lot of headaches, because they wouldn't look consistent with the rest of graphics.
But certainly not at this stage in development. I think once you guys rewrite your engine to support LoD and texture streaming it'll be fine.
-
- Burner Inserter
- Posts: 7
- Joined: Tue May 13, 2014 12:59 am
- Contact:
Re: 3D vs 2D which is better for Factorio?
Perhaps you might consider speaking to The Indie Stone (TIS) guys - the developers of Project Zomboid. (http://www.projectzomboid.com)
If you don't know the game, it's an (originally) alpha-funded zombie RPG. They use a 2D isometric engine, and they were running into similar memory issues. They've recently converted to using 3D character models (which also allows for better animations) and orthographic (ie flat) textures that are mapped onto polys and translated into iso projection, as opposed to having the textures drawn in iso view (this has had the added advantage of allowing them some nifty 3D lighting effects to boot.)
Now I have noted that you mentioned that it would be a huge overhaul to transition to 3D, and that's well granted - I personally would much rather see you guys focusing on expanding gameplay elements too - but perhaps you can speak to TIS (they've have had a very open development process, interacting closely with their community. I'm sure they'd be open to a dialog with you!) about a few of these techniques to help your optimization, after all, the smoother the game runs, the more content you can jam into it .
Good luck, and keep up the amazing work guys, I'm off to start day 6 of my Factorio binge.
(EDIT: added a couple of points.)
If you don't know the game, it's an (originally) alpha-funded zombie RPG. They use a 2D isometric engine, and they were running into similar memory issues. They've recently converted to using 3D character models (which also allows for better animations) and orthographic (ie flat) textures that are mapped onto polys and translated into iso projection, as opposed to having the textures drawn in iso view (this has had the added advantage of allowing them some nifty 3D lighting effects to boot.)
Now I have noted that you mentioned that it would be a huge overhaul to transition to 3D, and that's well granted - I personally would much rather see you guys focusing on expanding gameplay elements too - but perhaps you can speak to TIS (they've have had a very open development process, interacting closely with their community. I'm sure they'd be open to a dialog with you!) about a few of these techniques to help your optimization, after all, the smoother the game runs, the more content you can jam into it .
Good luck, and keep up the amazing work guys, I'm off to start day 6 of my Factorio binge.
(EDIT: added a couple of points.)
Re: 3D vs 2D which is better for Factorio?
How so? I'm not into graphics programming, but don't sprites generally cost very little? Hence them being used for ages while 3D is a relatively new phenomenon.YotaXP wrote:Reading that thread, a lot of the participants strike me as having little to no experience in the subject. I'm no game developer myself, but as a programmer, I have no doubt whatsoever that a switch to 3D rendering would resolve all the memory and fidelity problems. The only issue is the difficulty of implementation.
窮屈そうに身を屈めても今じゃ誰もがそうしてる 天井の無いECHO ROOMに誰かが僕を放り込む
君のSPEEDでもって 同じPHRASEを弾いて 冷たい時に寄り添って
君のSPEEDでもって 同じPHRASEを弾いて 冷たい時に寄り添って
Re: 3D vs 2D which is better for Factorio?
Well he is wrong, for a start. Switching to 3D will in of itself do nothing to fix the existing issues. Its just that 3D engines these days will do the job much better than a homebrewed 2D or 3D engine will do, so a side effect of making the switch would very likely fix all the core problems.robhol wrote:How so? I'm not into graphics programming, but don't sprites generally cost very little? Hence them being used for ages while 3D is a relatively new phenomenon.YotaXP wrote:Reading that thread, a lot of the participants strike me as having little to no experience in the subject. I'm no game developer myself, but as a programmer, I have no doubt whatsoever that a switch to 3D rendering would resolve all the memory and fidelity problems. The only issue is the difficulty of implementation.
From what I can see the art style of Factorio would not work in a 3D game - The main bottleneck would be the animations. Factorio seems to have extremely complex texture animations for all of its parts and you wouldn't be able to replicate that with 3D animation without loosing either the complexity (Its art style) or a huge knock to performance.
The user ScatterLogical above really said it best - You can go 3D and keep the sprite animations. That would be best case IMO. But it'd require a couple of months' work for the devs I would guess. Its a big move.
Re: 3D vs 2D which is better for Factorio?
I am just think that computers would not be able to handle the graphics.
Re: 3D vs 2D which is better for Factorio?
Pretty sure you can though. If you aim at 300 000 verts per frame, the close up view can use high detail models, about 2-4k per model if there's only a handful of them on screen. As you zoom out you can use lower detail model, e.g. 128 verts models, this way you'll still be able to meet your verts budget. When you're completely zoomed out you can go as low as few polygons per model, e.g. a box would only take 8. For some models you can simply use a flat sheet, effectively using a sprite. For static models you can render their image to a framebuffer and use resulting sprite for every instance of that object on-screen. So using low poly count you can circumvent having to draw huge number of models. And of course 300 000 verts per frame isn't very large number, modern GPUs can do billions of vertices per second, so at 60 fps target framerate you still have multiple million of vertices budget, if you can get GPU to render you stuff without stalling i.e. waiting on CPU to issue another draw call.kovarex wrote:The main issue is the performance. If everything was 3d, we would have 20 000+ 3d objects on screen instead of 20 000 sprites, i doubt it is possible to have it these days. The other way around would be to allow the zoomout levels drastically, but I personally hate it.
It's also worth mentioning that clever use of vertexbuffers will be necessary, as number of draw calls is a bottleneck in current GPU APIs (not nearly as much in Vulkan). When using very large number of models, you will have to use simpler animations or use same animated mesh for each object of the same type e.g. assembly machine, to save on 3d animating computational complexity. Chances are such approach will not even look off on far zoomed out models because you can't exactly see what's going on anyway, you can only tell if it's "runing" or "stopped", so if you were to start animation in other place where you stopped it, people will probably not notice. Same with replacing "full" inserter animation with simple Z-axis rotation for very far zoomed out image.
Additionally, if you're using 3d models, you will then automatically be able to use different camera angle. Even though completely flat terrain wouldn't look nice, still, ability to orbit the camera around the player would come handy, even if at a fixed angle. You would also be able to get rid of the whole "non-square squares" thing, which plagues trains especially badly.
As for "too big an overhaul", I don't really think so. Sure it would take generating models with multiple LOD levels out of high-poly artwork meshes, and then doing some adjustments to that they look good, but other than that - not so much. They already have all models and textures and animations. The only thing I could tell would require design from scratch is inserter model and animation, because there isn't really a model nor animation for inserter, only a bunch of disjoint pieces that are then programmatically animated in run-time.