Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Primary Vertex #162

Open
Mondaley opened this issue Sep 13, 2023 · 2 comments
Open

The Primary Vertex #162

Mondaley opened this issue Sep 13, 2023 · 2 comments
Labels

Comments

@Mondaley
Copy link

Description

Hello everyone!

I am Mondaley: an animator and a game developer.

Based on my experience, I've noticed that troubleshooting game problems and addressing issues in other software, such as OpenToonz, have a lot in common. Given that I use this software almost daily, I believe I can share certain aspects of it that have been overlooked for quite some time and can explain some of the weird nature of the Vector Layer!

Before I say anything, I want to clarify that I have no knowledge of the underlying code! Everything was discovered through experimentation with the application! Additionally, I will make up names where necessary.

First, let's talk about some basic knowledge so that everyone can have a rough idea about the Vector Layer.

1. Each Vector Shape must be on a separate Layer

Each time you draw a new Vector Shape in the same frame, it will be automatically assigned to its own Layer. It's important to note that you cannot place two drawings on the same Layer.

SimpleLayers

Furthermore, you can make a Regular Layer into a Group Layer by grouping the Vector Shapes together. The advantage of using them lies in their non-interaction behavior, unlike the regular ones.

Layers

We will focus on the Regular Layers, as they are the ones that interact with one another.

2. Areas and the Split Inaccuracy

An Area is defined as a closed Vector Shape capable of being filled with color.

When we draw a square, it constitutes a single distinct area - Let's call it Area A. It's worth noting that Area A can be divided by overlaying a line on top of it, resulting in the emergence of two separate areas: Area A and Area B.

The significance of this section wouldn't be apparent unless there was an issue at play. Believe it or not, the Layers associated with each Vector Shape have a significant impact. If you move the line over the square and it is at least one Layer on top, Area B will inherit the color from Area A. Conversely, if the line is positioned below the square, Area B will be blank.

Areas

3. The Primary Vertex and Isolation

In OpenToonz, every Vector Shape has a Primary Vertex, or how I like to call it: an Origin, responsible for storing color data that determines the fill color of its associated Area.

We can locate this Primary Vertex by utilizing the concept of Isolation. As mentioned in the previous chapter, when a Vector Shape is moved over another and positioned below it with a Layer, a secondary area with a blank color will be formed. I refer to this phenomenon as Isolation.

When we individually Isolate each vertex of the square, we observe an anticipated "normal" behavior. However, an intriguing outcome arises when the Primary Vertex is Isolated: the small area at the upper-right corner of the square retains its color, while the remaining portion of the shape becomes blank. This happens because the Primary Vertex is the Origin of the whole filling. If we Isolate it we also Isolate the filling itself!

Isolation

Every Vector Shape made with the Geometry tool comes with a predetermined Primary Vertex. Conversely, hand-drawn Vector Shapes have their Primary Vertex positioned where you initiated the drawing.

main vector

After all of this, we know that we can isolate the Origin by overlaying its Shape with other Vector Shapes beneath with at least a Layer. However, if you directly cover the Primary Vertex with another Vertex from a line (which must also be beneath), the entire Vector Shape will become devoid of color.

overlapping.the.Primary.Vertex.mp4

You may have already deduced that the Vector Shape when in the blank state, encompasses two distinct Areas rather than just one. Area A is just too tiny to be seen (Area B being the empty area and Area A being the colored one).

tiny area

4. The end

After I discovered the existence of the Origin, a whole new range of bugs and glitches related to it emerged as a result. With all my testing, I have found that troubleshooting them is an overwhelming process. I have no idea about the code, the only options remained are guessing and experimenting. Hopefully, I will be able to understand them and explain how they work.

Steps to Reproduce

No response

Expected Behavior

No response

Screenshots, Video & Crash Logs

No response

OpenToonz Version

1.7

OpenToonz Version Information

built May 10 2023

Operating System

Windows

GPU

NVIDIA

Graphics Tablet

None

@flurick
Copy link

flurick commented Sep 18, 2023

Indeed many bugs are shared between unrelated software. A while ago looking into the svg fill bugs, I noticed fills are stickier than one might expect Moving one line of a filled area around it could be used as some kind of "fill brush".

@RodneyBaker
Copy link
Collaborator

Will move this report over to Opentoonz-Docs repo where it can join other documenation related to Opentoonz.

@RodneyBaker RodneyBaker transferred this issue from opentoonz/opentoonz Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants