Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on August 25, 2011, 03:11:23 pm

Title: crazy thought, SVG textures
Post by: Bobboau on August 25, 2011, 03:11:23 pm
discuss.
Title: Re: crazy thought, SVG textures
Post by: pecenipicek on August 25, 2011, 03:14:26 pm
you crazy mon. you just crazy.


[edit]
in short, no i dont think it would work in any way, shape or form. Vectors are just not well suited for the type of graphics FSO needs. Except in the cases of mods which might be trying to pull of the good old "cel-shaded" look, but even then, i dont think it'd be all that useful.
Title: Re: crazy thought, SVG textures
Post by: JGZinv on August 25, 2011, 03:25:37 pm
As a modder, what he ^ said...
Title: Re: crazy thought, SVG textures
Post by: Talon 1024 on August 25, 2011, 03:36:25 pm
Yeah, but once FSO gets a 'real' material system and more advanced image processing, maybe SVGs can be used to generate simple high-res normal maps...
Title: Re: crazy thought, SVG textures
Post by: Bobboau on August 25, 2011, 03:46:11 pm
you can embed raster elements, and you can do filtering operations, basically you can save PSD files as SVG and not lose anything.

obviusly they would need to be rendered to a raster image before being used in game, but this could provide a mechanism for arbitrarily good looking textures.
Title: Re: crazy thought, SVG textures
Post by: MatthTheGeek on August 25, 2011, 03:50:48 pm
From a coder point of view, that probably depends a lot on what libraries are available with compatible licenses.
Title: Re: crazy thought, SVG textures
Post by: Nuke on August 25, 2011, 04:07:57 pm
svgs could save memory, but at the expense of more gpu time at rasterisation. you could also use memory and pre-rasterize them for use as textures, but at that point you might as well do that in your graphics software. given that memory usage is less you can do large animated textures, either frame by frame or as a transformation of elements within the image (like gauges and dials on a control panel). you could do some cool stuff but i dont think there are any games doing this yet.
Title: Re: crazy thought, SVG textures
Post by: Bobboau on August 25, 2011, 04:33:27 pm
it would have to be done the second way, there is no possible way to actually use them as textures in a graphics API sort of sense. the advantage would be in future proofing, there could be a texture detail scaler in the command line that allowed you to set the displayed texture size as high as you wanted.
Title: Re: crazy thought, SVG textures
Post by: DaBrain on August 28, 2011, 03:50:59 am
Sounds like this would be a perfect choice for interface graphics.
They really need to scale well to any resolution the user can set. The 1024*768 artworks are really not enough anymore.
Title: Re: crazy thought, SVG textures
Post by: Mongoose on August 28, 2011, 04:04:20 am
They are if you run in 1280x960, but I think I'm decidedly in the minority there. :p
Title: Re: crazy thought, SVG textures
Post by: The E on August 28, 2011, 04:32:37 am
Sounds like this would be a perfect choice for interface graphics.
They really need to scale well to any resolution the user can set. The 1024*768 artworks are really not enough anymore.

Agreed, svg as an interface graphics format makes much more sense.
Title: Re: crazy thought, SVG textures
Post by: Nuke on August 28, 2011, 03:11:19 pm
theoretically you could take a vector image and render them to texture to generate appropriate resolution interface textures at runtime. you could even cache the outputs for later loading. opengl is just as good at rendering 2d stuff as it is 3d stuff. that said you would still need to have a built in svg renderer to make this work. if you could output mipped and compressed images you could also use them ingame at no additional cost. i could see these used as material elements for example.
Title: Re: crazy thought, SVG textures
Post by: Bobboau on August 28, 2011, 10:52:58 pm
theoretically you could take a vector image and render them to texture to generate appropriate resolution interface textures at runtime. you could even cache the outputs for later loading. opengl is just as good at rendering 2d stuff as it is 3d stuff. that said you would still need to have a built in svg renderer to make this work. if you could output mipped and compressed images you could also use them ingame at no additional cost. i could see these used as material elements for example.

this was exactly what I was thinking when I started this thread.