Wallpaper Engine

Wallpaper Engine

View Stats:
Bruhsty Mar 26, 2021 @ 5:13am
Vector graphics
Vector graphics support? Or is it not possible, because of the way scenes work?
Last edited by Bruhsty; Mar 26, 2021 @ 6:11am
Originally posted by Biohazard:
They can't be hardware accelerated so I don't think we'd add anything like that. We'd have to rasterize them to a texture anyway but if you want to scale them dynamically or modify/animate them it wouldn't work without constantly rasterizing them again.

Fonts are basically like that and when you change the font size, the whole font atlas needs to be rasterized again.
< >
Showing 1-6 of 6 comments
The author of this thread has indicated that this post answers the original topic.
Biohazard  [developer] Mar 26, 2021 @ 6:52am 
They can't be hardware accelerated so I don't think we'd add anything like that. We'd have to rasterize them to a texture anyway but if you want to scale them dynamically or modify/animate them it wouldn't work without constantly rasterizing them again.

Fonts are basically like that and when you change the font size, the whole font atlas needs to be rasterized again.
Last edited by Biohazard; Mar 26, 2021 @ 6:53am
OMGparticles Mar 26, 2021 @ 12:56pm 
3D graphics are technically vector graphics which are rasterized every frame as well. In that case the geometry is predefined however, as opposed to procedural shapes one generally attributes to vector art. I suppose a geometry shader could handle something like that. Never messed with them myself.

Another option for scalable graphics is Distance functions[iquilezles.org] which can be fun to play around with. I've yet to find a decent visual editor for them (outside of the game Dreams on PS4, which is more complex than simple 2D or 3D SDFs).
Last edited by OMGparticles; Mar 26, 2021 @ 12:57pm
Biohazard  [developer] Mar 26, 2021 @ 1:28pm 
Importing a 3D model could be an alternative right now, yeah. But I'm not sure whether you mean we could go that route to support vector graphics natively.

I feel like it'd still be a huge effort to support all kinds of vector graphics features and not super useful, considering the effect system and masks are not vector based and cannot dynamically change resolution. Might as well rasterize the image beforehand.

I would also expect distance functions to perform poorly in comparison, i.e. ShaderToy has certainly some amazing content based on distance functions but for a wallpaper situation it'd be pointless when even a high end system can barely run such shaders at 30 FPS.

r33v01v3 has a lot of wallpapers based on distance functions and some can be pretty heavy on the GPU:
https://steamcommunity.com/profiles/76561197970456223/myworkshopfiles/?appid=431960
OMGparticles Mar 26, 2021 @ 3:15pm 
Originally posted by Biohazard:
Importing a 3D model could be an alternative right now, yeah. But I'm not sure whether you mean we could go that route to support vector graphics natively.
I only meant that in a way vector graphics are hardware accelerated being that graphics cards are dedicated to rasterizing vectors. I see your point about using them with existing effects though. Re-rasterizing is already an issue, for instance with composition layers where background quality is lost if the resolution isn't increased.

Originally posted by Biohazard:
I feel like it'd still be a huge effort to support all kinds of vector graphics features and not super useful, considering the effect system and masks are not vector based and cannot dynamically change resolution. Might as well rasterize the image beforehand.
True, you just lose the ability to animate the vector properties over time. But seeing as 3D animation isn't supported yet either, I'd focus on that first before adding in vector art and animation support.

Originally posted by Biohazard:
I would also expect distance functions to perform poorly in comparison, i.e. ShaderToy has certainly some amazing content based on distance functions but for a wallpaper situation it'd be pointless when even a high end system can barely run such shaders at 30 FPS.

r33v01v3 has a lot of wallpapers based on distance functions and some can be pretty heavy on the GPU:
https://steamcommunity.com/profiles/76561197970456223/myworkshopfiles/?appid=431960
I know 3D distance functions can be really performance heavy due to being volumetric and requiring raymarching. 2D functions should only require one pass per pixel, so are probably not as heavy. But looking at even 2D examples on Shadertoy, they mostly seem to run pretty slow, so you're probably right.
Last edited by OMGparticles; Mar 26, 2021 @ 3:17pm
Biohazard  [developer] Mar 26, 2021 @ 4:25pm 
Originally posted by OMGparticles:
I only meant that in a way vector graphics are hardware accelerated being that graphics cards are dedicated to rasterizing vectors. I see your point about using them with existing effects though. Re-rasterizing is already an issue, for instance with composition layers where background quality is lost if the resolution isn't increased.

Yeah that's fair. I basically jump to imagining how people would use a new feature like this and considering full fledged vector graphics as a worst case I dread the performance/compatibility problems right away. A very simple graphic would be "no problem" to draw efficiently on the other hand, but not worth implementing since it wouldn't satisfy most peoples expectations when trying to use this feature.

Originally posted by Biohazard:
I know 3D distance functions can be really performance heavy due to being volumetric and requiring raymarching. 2D functions should only require one pass per pixel, so are probably not as heavy. But looking at even 2D examples on Shadertoy, they mostly seem to run pretty slow, so you're probably right.

Even if it's just a simple line, each pixel has to calculate it, so that's why I'd probably avoid them in Wallpaper Engine generally.
OMGparticles Mar 26, 2021 @ 5:54pm 
Turns out my browser had hardware acceleration temporarily disabled by something. 2D functions actually seem to run quite fast. Still, creating a proper visual editor would be a lot of work, and likely very few users would take advantage of it. It seems like it could make for some interesting audio-responsive effects though.

We already have custom shader support anyway, so technically SDFs are already supported in WPE like you mentioned above. An external SDF editor would be practically as useful as one built into WPE. I may just have to experiment with making one myself someday if I can't find one.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Mar 26, 2021 @ 5:13am
Posts: 6