Your comparison makes no practical sense. There's no such thing as a PNG sprite with "tens of thousands of objects."ĭo you know what size a sprite is? They're like 32x32 pixels. PNG performance would stay the same no matter how detailed you want to make your image All of the advantages you think you're getting go away as soon as you just look at the way this is actually done. The typical way to handle that is to materialize it to a bitmap at the time. The typical SVG game sprite is ~12-30 geometric objects. They gave a clear context: 2d animal crossing. Yes, it's possible to invent a toxic example, by pretending that individual sprites in a game might be more complex than entire pieces of fine art. You want a megabyte of SVG for a throwaway game sprite? Either you've never done SVG, or you've never done game sprites (or both) I've never seen an SVG with tens of thousands of objects. I mean like, wouldn't SVGs get slower if you make a super detailed image with tens of thousands of objects? Go back and re-read what I said as if this was my original point, then try to figure out what I was actually saying. In practice regardless of whether the artist sends over a PNG or SVG you're probably going to rasterize and feed it to the GPU in a separate format anyways. You might as well say "don't ship MP3s because it has to be wav by the time it gets to the headphones." You completely missed what I was saying. Vectors are just a scale-invariant source of raster textures, which ship storage, wire, and render cheaper. You just render the vector before you start. With a vector format you must perform some non-zero cost intermediate step Raster images are shipped in GPU-friendly formats (DXT, ASTC, etc.)īut then in your need to teach, you went on to lecture about things that aren't even slightly related to what I actually said. You even sort of quasi-admit that I'm right, by saying That has nothing to do with the protest that I actually made - that PNG is a ridiculous format for computer graphics, because it's too time intensive to decode it Yeah, you've basically just skipped over my specific criticism of the PNG format, and substituted raster formats, which don't suffer any of my criticismsĬonsider a simple operation like texturing That being said, in general debate between raster and vector, raster formats do have benefits over vector formats. There's also smaller wins like the ability to anti-alias your raster images offline, though there's nothing worth altering your asset pipeline. rasterizing your vector image before you use it, either offline or at runtime). With a vector format you must perform some non-zero cost intermediate step (e.g. Consider a simple operation like texturing - your fragment shader wants to operate pixel by pixel and it's trivial to do when sampling each pixel directly from a rasterized texture. I have never seen PNG used in production, raster images are shipped in GPU-friendly formats (DXT, ASTC, etc.) so the optimization of the source format has no impact on the final game. If you can think of a time when PNG is "more optimized" than SVG, and you feel that what you say isn't going to get the response "that has nothing to do with optimization," please tell me what that time is.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |