Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
You could have thought of that.

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.

user:
pass:
register,


                                   

Please log in.
Before you can vote, you need to register. Please log in or create an account.

layers of unconformity

draw intersecting objects on separate layers
  (+4)
(+4)
  [vote for,
against]

So all decent art drawing packages have a very useful feature called layers, where you can draw stuff on top of other stuff, and not destroy that underlay. Conceptually, you are drawing on a series of parallel planes.

Typically you can add and rearrange layers - they're not assigned a specific depth.

Which is fine, except that sometimes what you're drawing isn't perpendicular to the viewing angle, so stuff which is in front in one place is behind in another.
So - we let the user define the distance of each layer, and also optionally to slope them.

This feature would probably be quite useful to the power-user very occasionally, but very awkward, confusing and hard to learn.

Loris, Feb 19 2022

Test case - three mutually overlapping rectangles https://lc1995.gith.../images/Overlap.png
A overlaps B overlaps C overlaps A [Loris, Feb 19 2022]

Local Layering [2009] http://graphics.cs....cts/local-layering/
Research implementation of a similar idea. [markluffel, Mar 06 2022]

[link]






       //Not sure, but it sounds like you’re after something like Autocad or another 3D modeling package.//   

       No, I'm not after that. 3D modelling is quite a different way of working.
The idea is that this is a feature which would[1] suit digital artists.
  

       [1] well, theoretically could...[2]
[2]Obviously it almost certainly wouldn't. It would be far to awkward for anyone to ever learn to use.
Loris, Feb 19 2022
  

       A bit of CAD functionality built into a drawing program. Why approximate an oval when you can go off-plane and draw a circle?   

       What would you want for the render quality of the original skewed image once your viewpoint were out of plane? Keeping that civil could minimize system demand.
RayfordSteele, Feb 19 2022
  

       No, you misunderstand. This is for /drawing/ programs. Layer operations don't distort the image - you change a layer's position within the stack without skewing or rescaling it. This merely affects what's 'on top'.
Loris, Feb 19 2022
  

       Its more like making a mask on a layer and defining the masked and unmasked areas as having different rankings in the heirarchy?
pocmloc, Feb 19 2022
  

       I fully understand the idea and think the concept is of interest. Being able to tilt a layer when viewed from a cross section viewpoint would acheive this but varying the transparency range from left to right or top to bottom would acheive the same result. [+]
xenzag, Feb 19 2022
  

       ////varying the transparency range////
//Explains it well to this non-artist, thanks!//
I'm sure it explains /something/, but it isn't this, because for any particular pixel you want either one layer or the other to be in front; there's no gradual sweep across the image.
  

         

       //Isn’t there a contradiction there? You want to assign specific depths to layers with some not parallel to the others (and not perpendicular to the viewer) but not a 3D drawing program?//   

       I can see how you might think that, but no, not really.   

       The current state of affairs in graphic drawing programs like Inkscape, Aseprite, photoshop and many others is that you can draw images on one or more layers.
You might think of these as perfectly transparent, infinitely thin sheets of paper.
Assuming it isn't obscured by anything else (and excluding layer-specific effects), it doesn't matter which layer an image is on, it'll look just the same.
  

       One older way of animating things was to draw a background, then layer on characters and other foreground on sheets of cellophane. This has the advantage that you don't need to redraw the entire scene for every frame - just those elements which have changed.   

       So it is with a drawing program. If you decide that you've made a mistake, you haven't destroyed whatever it covers up - because that's still there, just hidden. So you can move or redraw that element, and everything is fine.   

       Which is all well and good. But when things cross-over in the viewing field, you can't cleanly separate them to different layers; one layer is completely in front of the other. So you end up having to erase part of the top- most layer image so that the one behind can show through.
Obviously, this means that you can't adjust either of the objects without having your carefully aligned 'holes' misaligned.
  

       So what you want is for one side of a layer to be at a higher position within the stack than the other.
Loris, Feb 19 2022
  

       You lost me at //when things cross-over in the viewing field//. The whole point of layers is to allow one to obscure the other.
Voice, Feb 19 2022
  

       //You lost me at //when things cross-over in the viewing field//. The whole point of layers is to allow one to obscure the other.//   

       Sure. But not everything is a convex hull. If everything is well-separated, there's no problem. But sometimes different parts of a thing can be in front of and behind another.   

       Example - imagine you have the front of a house, with an open doorway in the middle. Imagine viewing it obliquely, with a character standing just inside the house. You can only see part of the character, because the near side of the doorway occludes them. However, they cover the far side of the doorframe.
This is a deliberately simple example, and the straightforward solution for this sort of thing is be to split the house to two layers, bracketing the character's layer.
However, there are more complicated (and reasonably common) cases where you don't really want to be splitting off parts of e.g. interacting characters.
Loris, Feb 19 2022
  

       //[xenzag] provided an explanation fitting your idea into the drawing layer paradigm.//   

       xenzag mentioned varying the transparency, I think wouldn't work, but it seemed to make sense to you - so why don't you explain how that works to me?   

       //Your explanation of a person in a house, viewed obliquely through a doorway, is a reasonable example of what someone might draw in a 3D modeling program. But that’s not what you’re after either.//   

       I'm going for providing some of the nuanced ability of managing objects in 3d space, which 3D modelling provides - to artists who want to draw highly complex and interesting shapes, like people, creatures, plants and artistic geometry - without the pain of 3D modelling (and texturing) complex shapes and geometry.   

       I'll try and dig up a simple example later.
Loris, Feb 19 2022
  

       //A layer would appear “on top” where it was opaque to what was behind it, but hidden where it was transparent— the underlayer would be showing.//   

       I think that is an alternative way of doing it in some programs - you generate a mask layer by copying one of your layers, process the colours and reconfigure the layer, then erase areas of that to show through the original layer to the one behind. It's a bit hacky, and rather awkward though.   

       I found a demonstration case, linked above.   

       Incidentally, once the concept is clear, I'll move on to specifying layers with their own z-buffering (basically, a per-pixel heightmap, promoting the contents above higher layers), which are more powerful, complex, and supremely functional.
Loris, Feb 19 2022
  

       "Sloping" a layer through others is all very well, but that only gives a linear "cross-over". Based on your "doorway" example, you are wanting a much more complex boundary, which would need to be precisely define at each & every cross-over. So, as others have said, it would be virtually identical in practice to simply duplicate & erase parts of the top copy of the layer. (The bottom one can remain whole as it is obscured by the top.)
Can layers be "linked", so the top one retains all the data from the "whole" lower version (so any edits to the lower are reflected in the upper), but only shows part of it, so future edits can "un-erase" if required (useful for animation, for example)?
neutrinos_shadow, Feb 20 2022
  

       //"Sloping" a layer through others is all very well, but that only gives a linear "cross-over". Based on your "doorway" example, you are wanting a much more complex boundary, which would need to be precisely define at each & every cross-over.//   

       Yes, idea as described in the initial description would be limited to a linear crossover with each other layer. Of course, more complex geometries are possible... but I figured I'd describe the simplest case first.
However, for most purposes I think this would be sufficient. I disagree that one needs to precisely define each crossover - they need to be within a tolerance of the respective object edges. It's actually erasing/masking which needs precise work.
The doorway example is a very simple vertical crossing. The objective is to occlude the character by the near edge of the doorframe. This is a single positioning step, and just has to be within the visible width of the door - easily managed. Splitting the house between layers requires the same precision, but has the disadvantage that now the house can't be managed as a single entity. The other alternatives discussed (masking layer on character; erase character) require pixel-level precision.
  

       //So, as others have said, it would be virtually identical in practice to simply duplicate & erase parts of the top copy of the layer. (The bottom one can remain whole as it is obscured by the top.)//   

       Identical results in practice being identical end results? Sure. However in terms of workflow - not at all! Having to erase part of an object so that another object can show through /does/ have to be very precise - and in general it can't be easily adjusted. Adjust something a few pixels? Do all your masking again.
It's the incredible awkwardness of this which this proposal aims to address.
  

       //Can layers be "linked", so the top one retains all the data from the "whole" lower version (so any edits to the lower are reflected in the upper), but only shows part of it, so future edits can "un-erase" if required (useful for animation, for example)?//
  

       I can't speak for everything, but I think in Photoshop this would be the mask layer approach. I'm not an artist and haven't used it myself - from what I've heard it's expensive and buggy in equal measure. I had a quick look in Krita... and I think the answer might be yes, but to be honest it looked complicated enough that I couldn't be bothered to figure it out.
But of course the downside is that your edits to that mask layer are now work which isn't itself preservable. Could you could have a mask layer for your mask layer? Maybe, but your file is ballooning in size.
In practice, for complicated interweaves, I think it's generally going to be easier to avoid masking; clone the appropriate parts of your rear layer and paste them in front of your front-most layer. This keeps you one good copy of all your character/objects. Disregarding filesize growth (which isn't a big issue for most artists at the moment), the problem with this is a loss of clarity. It's hard enough to draw stuff on the right layer at the best of times, now if you want to adjust something you need to remember that you've got stuff in front of your main character layer(s), remove them, work with your rear character - hiding/revealing/partially hiding the front character as appropriate, then remember to re-apply all those sticky-out bits. Fairly error-prone, unless you're extremely methodical.
Loris, Feb 20 2022
  

       [Loris] If the art on the layers is simple enough to do areas of layer distancing, wouldn't masking work? For complex art, the lines/areas of pixels still has to have that precision extra layer distancing drawn for each pixel , for each time the character/object scene relationship changes. Seems a small window of help.   

       Sketchup (3D) has planes where pictures can be placed. These planes can be placed relative to each other in any orientation wanted in 3d space. A camera can view from any position.
wjt, Feb 23 2022
  

       //If the art on the layers is simple enough to do areas of layer distancing, wouldn't masking work? For complex art, the lines/areas of pixels still has to have that precision extra layer distancing drawn for each pixel , for each time the character/object scene relationship changes. Seems a small window of help.//   

       It's not really a question of whether something /can/ work. Masking can always work. Just drawing everything on a single layer can always work (it's just a pain). The question is how easy it is to do.   

       Yes, sloping layers won't be useful for every case. If the problem is of the "character holding a thing" variety - where there is no visible space between the two objects - then it won't be better than masking. I'm not suggesting /replacing/ masking, so you could still do that.
Without checking, I assume complex editors like photoshop let you optionally move multiple layers (such as an image and masking layer) together. That's not theoretically hard. It won't help every case, though. Similarly, it's not hard to imagine being able to toggle movement of an image with its layer-slope characteristics as well as separately.
  

       If you imagine the full-fat "z-buffer" version of this concept - where every point in an image can be raised to a height above the base, would that be useful? Well, yes of course... but would it be better than just masking layers? That is, 'better' in the sense - would it be easier for an artist to do this than using the current standard of mask layers, assuming all convenience features?
Thinking about it, I think the answer is almost certainly yes. If you had two or more tightly interwoven images, I think generating a rough heightmap for one of them would be straightforward, and then you'd be able to pixel-level adjust relative positioning without having to regenerate anything. That's much less true for masking or partial-image copying approaches.
Loris, Feb 24 2022
  

       Thank you markliffel for the link, it's an interesting and I think rather intuitive way of doing it. Also the description and examples are clear, so if you still don't know what I'm going on about you could do worse than have a look at it.
I'd like to welcome you to the halfbakery - but I see you've had an account for some time, so congratulations on de-lurking.
Loris, Mar 06 2022
  
      
[annotate]
  


 

back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle