Adding a Gradient Scale property to Shapes

Avatar
  • updated
  • Under Consideration

1.It'd be super useful to be able to scale a linear or radial gradient on a shape in order to create some varied styles.

Image 24

Image 25


2. It'd also be brilliant to have the option to offset the position of that gradient inside the shape

Image 26

3. Also possibly have a rotation option too (I can create separate requests for this if need be!)

Image 27

Let me know if you think that'd be possible, I think it'd be a great feature to add for extra customising.

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Avatar
Freya Holmér creator
  • Under Consideration

I think a gradient start/end value would be useful, which would solve both 1 and 2! it would also secondarily allow you to fade things in spatially across the shape

As for 3, this kinda opens up the expectation that all shapes should have arbitrary angular, radial and linear gradients, which, is possible! I'd just have to carefully consider how I deal with this, as there's quite a lot to design needed to get these things right, not only for components but also in how this would be defined in immediate mode.

It would also be nice to have scene view handles for these things, to reposition the gradient or change radius of a radial gradient, but, this is something Shapes is lacking in general that I'd have to add!

Anyhow, after the dashed lines and URP update I'll look into this more!

Avatar
Philip Askins

Ah handles would actually be a great idea, might be something nice to add down the road possibly! But yes a start/end value would be a much more elegant solution for gradients in the meantime!

Avatar
Andy M

I was actually a bit confused that the quad, for example, had just per vertex colors for gradient (and you have to toggle the mode) because it means you are very limited in gradients. I know this not a vector art package but being able to apply a world-scale/positioned gradient with angle and/or radial type etc. would be a lot more free.

But this is part of my wanting to do complex polygons with simply-defined gradients for art-generating uses

Avatar
Freya Holmér creator
Quote from Andy M

I was actually a bit confused that the quad, for example, had just per vertex colors for gradient (and you have to toggle the mode) because it means you are very limited in gradients. I know this not a vector art package but being able to apply a world-scale/positioned gradient with angle and/or radial type etc. would be a lot more free.

But this is part of my wanting to do complex polygons with simply-defined gradients for art-generating uses

Since there's a polygon component in Shapes now (coming in the next update), you'll both be able to do polygons without stitching together quads, as well as specifying linear and radial gradients

Avatar
Freya Holmér creator

a little update!
polygons now have linear and radial gradients implemented, along with scene view handles to edit the gradients!

I've yet to add this to other shapes - I'll consider this topic to be about having a global gradient fill like this, and not just for polygons, so I'll keep it open

Avatar
Philip Askins

Amazing! Great stuff thanks Freya!

Avatar
vincent borcard
Quote from Freya Holmér

a little update!
polygons now have linear and radial gradients implemented, along with scene view handles to edit the gradients!

I've yet to add this to other shapes - I'll consider this topic to be about having a global gradient fill like this, and not just for polygons, so I'll keep it open

The Start/End points would be super useful for Disc Shapes too.

Best,