- Home /
Vector Graphics versus Raster Graphics in Unity 2019.3
Now that Unity can import Vector Graphics (like SVG files) instead of just Raster Graphics (like PNG files), which Graphic type is more efficient to use in the software? As in, how to optimize for loading speed without losing art quality.
For example, let's say I want to make a 2D game that has a 'hand-painted' style. But, if one Scene has several different images imported then which Graphics type would be better suited for that game? Or at least in terms of maintaining speed and quality.
I'm wondering how to maximize using high-quality art while optimizing the speed of the engine. Especially optimization to prevent lags and/or over-heating of the physical device when playing the 2D game.
Answer by sacredgeometry · Feb 02, 2020 at 08:55 PM
All graphics need to be rasterised in order to be displayed. Vector graphics are smaller, more convenient for storage, easier to modify, lossless when scaling.
But will incur a conversion cost, that said unless you are using a bitmap format you will probably be incurring some sort of decompression cost anyway.
Vector graphics are also not aesthetically the same as all rasterised graphics so your art style may be a limiting factor.
That said modern computers (let alone gaming computer) are not going to struggle in rendering 90% of 2D applications either way.
Thank you for your response! I'm still a newbie in the game-making and coding sphere.
I'm curious, though, what do you mean by conversion cost for Vector?
Definitely understand the aesthetic differences between vector and bitmap art styles. I know I prefer bitmap programs for their ease and style of use. But I also wondering if it'd be worthwhile to learn Vector art programs in case the loss-less scaling was more beneficial for 2D games.
Another thing I wonder about vector versus bitmap graphics is the size of the image. Since vector is lossless in scaling then the original image size, when drawn in the art program, is irrelevant. But when drawing in bitmap, it's better to draw in a larger file size, right?
So then, how big is too big for big for a bitmap image in a 2D game? Especially if modern computers won't struggle to render most 2D applications like you said?
Again, thank you for your time and response!
Answer by LeFlop2001 · Feb 02, 2020 at 08:51 PM
Unless your making a physics focused game and or you have thousands of spawned entities in a scene performance won’t be an issue for 2d games
Awesome! That's good to know. Thank you for your time and response!