Skip to main content
gamedev.net
🔒 Locked

Vector Textures

Started by MSW 3 replies 2.1k views
Original Post
MSW
MSW
Altho my concern is primarily about 2D shareware games...but 3D ones could possably benefit as well... has anyone tried to store thier textures as vector images?... er... sorta like FLASH vector images...but "vectorized" from bitmap sources...then at runtime the vector image is rendered out to system memory at a resolution dependent on screen resolution...this way those running higher resolutions can enjoy more texture detail (and mip-maps can be generated from the same vector image source. As I said this mainly concerns 2D games...my idea was to allow different screen resolutions, but maintain the actual game screen dimentions for my game....so a 32 by 32 tile for a 640 X 480 screen increases in size to 64 by 64 if the player has selected to run the game at 1280 X 960 (of course the original bitmap could have been 256 by 256 or some such, so as the screen size increases the detail increases as well). Just wondering if anyone has experimented with this?
MrScruff
MrScruff
Hmm.. What you''re talking about is interesting, and is in fact a special case of data compression and reconstruction. Current texture maps are created as a set of pixels, which can be compressed as images using DirectX texture compression or similar. This is fine as the hardware to decompress the images is built into most current gen graphics chips. (PS2 has to do things a bit differently)

However, you are suggesting representing textures as a set of vectors, from which arbitrarily sized reconstructions are possible. This is an excellent idea for some textures, especially those with geometric patterns, but would be bad for more "random" textures. Currently there is no hardware dedicated to reconstructing images from vector compression, but I suppose it could be done using shaders (I would have to think about it for a minute though!)

To push the concept further it could be useful to have a number of different compression techniques on hand to suit specific textures. Vector based techniques would deal well with geometric simple images, and fractal techniques would allow similarly scalable "natural" images. Textures composed of harmonics of simple shapes would be well suited to Fourier analysis, or wavelet techniques if unperiodic but similar shapes are needed. Perhaps there is a case for developing a library of shaders to make this possible...

MrScruff
MrScruff
Just had a think, it''d be easy to do as a pixel shader. Don''t know if it''d give much in the way of benefits, it''d depend on AGP bandwidth versus reconstruction time. Memory saving for simple large geometric textures could be worth it though...
bishop_pass
bishop_pass
It''s basically a texture created on demand. An example might be a sign rendered into a texture using fonts and geometric figures. It''s not really a new concept - it''s just less likely to actually get implemented before all of the other stuff.
_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.