I'm depicting a first-person scene with stylistically exaggerated perspective. I'm using a lot of multiplicative lighting effects, mostly just built off of your basic radial 100% -> 0% alpha gradient fill applied to circular paths. Works well enough for flat walls.
To depict lighting on the floor area, I want to use that same approach, but with the radial gradient distorted. For reference, I've attached a "circle" version, and a "perspective" version to illustrate the desired shape. My beef with the "perspective" version is that it doesn't depict a whole radial gradient, but instead cuts off at the edges.
Of course, using the Perspective/Envelope path effect on an ellipse doesn't achieve what I'm after here - it distorts the ellipse perfectly, but doesn't impact the gradient fill, which still leaves you with just a plain ellipse.
I can't seem to get the perspective extension working here - not entirely sure why, I've used it fine before, but it just doesn't appear to do anything when I try using it here. Regardless, I'm guessing it would share the issue of not impacting the fill?
So... any tricks? Any neat filters or effects that I'm overlooking? Thanks in advance!
My first thought would be to try to create the effect with a blur. In the example, I took a simple white circle, applied perspective distortion to it, then set a blur of 50 and transparency of 70. It just an example, so you can adjust the values to your expectations. This is not a general solution, just the way I would do it. In addition, it becomes complicated to manage it with a multicolor transition, but in this specific case when you just need a monochrome light spot, I think it does the trick.
If you want to construct a good reference, you can recreate the circular radial gradient using interpolation between two circles, then distort the group with the perspective envelope.
If that brings you problems you can interpolate after the perspective deformation too.
After that, coming to the conclusion: when radial gradients are distorted, they still end up radial gradients, sort of.
Not a 100% match but can get close looking results by setting the handles to the nodes of the reference objects, and make it asymmetric.
manual
A radial Gradient can be made asymmetric by dragging the center handle (diamond) while holding down the Shift key. A cross will appear where the center of the Gradient is located. The cross can be dragged to make further adjustments.
Thanks all! Making radial gradients asymmetric is a trick that wasn't on my radar, and running that over a perspective-distorted ellipse creates a perfectly workable version of what I'm after.
I'm depicting a first-person scene with stylistically exaggerated perspective. I'm using a lot of multiplicative lighting effects, mostly just built off of your basic radial 100% -> 0% alpha gradient fill applied to circular paths. Works well enough for flat walls.
To depict lighting on the floor area, I want to use that same approach, but with the radial gradient distorted. For reference, I've attached a "circle" version, and a "perspective" version to illustrate the desired shape. My beef with the "perspective" version is that it doesn't depict a whole radial gradient, but instead cuts off at the edges.
Of course, using the Perspective/Envelope path effect on an ellipse doesn't achieve what I'm after here - it distorts the ellipse perfectly, but doesn't impact the gradient fill, which still leaves you with just a plain ellipse.
I can't seem to get the perspective extension working here - not entirely sure why, I've used it fine before, but it just doesn't appear to do anything when I try using it here. Regardless, I'm guessing it would share the issue of not impacting the fill?
So... any tricks? Any neat filters or effects that I'm overlooking? Thanks in advance!
My first thought would be to try to create the effect with a blur. In the example, I took a simple white circle, applied perspective distortion to it, then set a blur of 50 and transparency of 70. It just an example, so you can adjust the values to your expectations. This is not a general solution, just the way I would do it. In addition, it becomes complicated to manage it with a multicolor transition, but in this specific case when you just need a monochrome light spot, I think it does the trick.
The other solution is to use a gradient mesh. It's mutch more complicated, but you can fully control all elements of the color transition.
I got sidetracked when working on my example.
The perspective distorts circles into ellipses in that context. (It'd be a whole different if the light was hitting the wall. -> https://www.askmattrab.com/notes/662-Conic-Section-Introduction)
If you want to construct a good reference, you can recreate the circular radial gradient using interpolation between two circles, then distort the group with the perspective envelope.
If that brings you problems you can interpolate after the perspective deformation too.
After that, coming to the conclusion: when radial gradients are distorted, they still end up radial gradients, sort of.
Not a 100% match but can get close looking results by setting the handles to the nodes of the reference objects, and make it asymmetric.
http://tavmjong.free.fr/INKSCAPE/MANUAL/images/ATTRIBUTES/Attributes_Gradient7.png
I guess I´d go down the bitmap way:
Not Inkscape obviously.
@Polygon nitpicking: this is not a perspective but an isometric view. 🤓
I think @Lazur is right. In most cases, an elliptical gradient with an offset center is sufficient.
Quick example file.
As you can see in the 1 point perspective the horizontal segments (i.e. tile widths in a checker layout) keep their proportions with eachother.
The depth however is distorted and the change is non-linear and non-exponential.
A radial gradient uses linear interpolation between the steps. Thus a "horizontal section" of it showing equal steps is matching with the perspective.
However even when the centre of the gradient is shifted to the point where it "should be" according to perspective distortion,
the interpolation still remain linear between the steps.
Meaning that the outside shape ofthe gradient, the starting step and the end step placement is correct, but it's not a perfect match.
Realistically with each step in the gradient the proportion of the shape of the "ellipses" should also change in a non-linear fashion.
Thanks all! Making radial gradients asymmetric is a trick that wasn't on my radar, and running that over a perspective-distorted ellipse creates a perfectly workable version of what I'm after.
Cheers for the help!
Here's my attempt.