Kantan Mapper issues and proposals

Hello Touchdesigner Community,

Lately I was working with Kantan Mapper in different projects and I have faced a couple of hick-ups. Some are easy to reproduce but others need some kind of preconditioning, like another issue is happening before. As soon as I get more recipes, I’ll post them below. Please let me know if some are known behaviors, so I can focus on reproducing the other ones.

Kantan is such a rich tool, but so far, I struggle to understand the techniques used under the hood. What would be the best way to get more familiar with the structure and states? Certainly, a better understanding will help me to grab and understand any failure states easier. The videos I’ve seen were mainly about the UI, so if there is any in depth information available, please let me know.

Below the issues I have added a few lines about usability topics.

  1. When adding rectangles and selecting the right size with the mouse the operation is not completed once the left mouse key is released. Sometimes it takes just longer to get back to the black background, but sometimes the background stays green and gives an error like below.
  • Can be resolved by selecting new shapes in the shape lister to add more rectangles afterwards.
  • Can be resolved by pressing Reset on /kantanMapper/project/tools/rectCreate
    Once the issue has triggered the first time it will come back quickly.
Traceback (most recent call last):
  File "/container1/kantanMapper/ui/renderpick/renderpick2_callbacks", line 29, in onEvents
  File "/container1/kantanMapper/ui/renderpick/Renderpick", line 237, in Event
  File "/container1/kantanMapper/project/Layerizer", line 99, in AddRect
  File "/container1/kantanMapper/project/Layerizer", line 468, in getLayer
  File "/container1/kantanMapper/project/Layerizer", line 468, in <listcomp>
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
  1. Related to 1) I have experienced a situation where the created quad mode keeps active and allows to create multipe shapes. Also I had the case that the green mode was active but I was not able to create any shapes.

  2. When adding freeforms can happen that the freeform can’t be closed. There is no reset Button in the /kantanMapper/project/tools/createFree custom parameters (like we have it for the rectangles) and also clicking around in the Shape lister like in 1) was not working in some cases. Saving the toe or JSON file after the error was working halfway. It happens that the data was only a subset of what I had expected, and the Texture ID’s and links was mixed or empty.

In that state with an unclosed Shape UNDO is acting with the last action before the freeform. After that: I was just getting something related 5) triggered  I can remove the freeform but can not delete any rectangle shapes. Loading a known JSON got me the expected rectangles plus the freeform which was from the previous project. Also in the new project I was not able to delete rectangle shapes but the freeform, BUT, when getting back the freeform after deletion Kantan it got more crazy but I guess this corner case is too far from the intended functionality and don’t need more explanation. But at least this is a situation more where relaoading the JSON was not healing the problem.

  1. Editing text fields can delete shapes when using the del or backspace key.
    Reproduction works like this: Create some rectangle shapes. Edit the Texture ID, Name, Scale or other text fields proof that everything is working and del or backspace are not deleting the shape. Once a texture TOP is pasted and activated via the ‘ X’ button its now possible to accidently delete shapes when using the del or backspace.
    Sometimes the functionality comes back (del or backspace are usable again) but I had at least one case where Kantan was caught in that mode and needed a Touchdesigner restart.

  2. It can happen that shapes cannot get deleted via del or backspace. Once in this state I have not found a routine to get back to a normal behavior beside restarting Touchdesigner or loading the same setting in a fresh Kantan window. Projects can be saved as toe or JSON without losing data.

  3. After some unknown preconditioning the Texture and texture ID field are not stored the first time when selecting another shape to continue editing there. After coming back and changing the texture ID again it works from time to time. I have not experienced any difference between reselecting via Renderpicking or shape lister. I got into a situation where I was no longer able to change any of the shape related properties including the X button.

  4. When copy a complete Kantan mapper via CTRG+C / V to another patch it can happen that the names of all shapes are renamed to the same string. I can’t recall right now what fallback name that was, maybe ROOT or something. This happened once and I can’t tell more beside that both patches (source and sink) were running with normal load.

And finally here some ideas or questions about the workflow. Maybe these can be evaluated for future versions of Kantan Mapper :slight_smile:

A) The pink and yellow select handles are hard to pick and require a lot of zooming just to catch them. Not really a bug, Especially for objects with a high aspect ratio it’s really hard to work this way. But even with a more normal aspect ratios I have often difficulties to grab these handles.

B) When moving shapes with the arrow key or CTRG + arrow keys everything works fine, but when using SHIFT + arrow keys the Timeline goes to pause. I’m aware about the TD Setting to deactivate the timeline shortcuts, but I still wonder if it’s possible to separate Kantan from the global Shortcuts in some way. Otherwise, is there a way to change the TD default keys used for the Timeline? I wasn’t able to get more info about the timeline shortcuts as it seems the help page is offline Timeline - Derivative.

C) Zooming into the scene results in an unwanted xy movement. So, after every zoom with the middle mouse button I need to re-center the scene using the right mouse button. Is there a reason why zooming is implemented that way?

Many thanks for any comment and for looking into these topics.
TD is running in Windows 10, using build 14360 and 15020. Kantan version is 2.14

Best regards
stevo

1 Like

Hi @stevok,

thank you very much for this detailed report. I’ll try to get some work done on some of the bugs - most of the things you mention would fall into that category including the workflow remarks.
Can you let me know what video card you are using?

Best
Markus

Hi Markus,
I am usually using an 2080TI, but the Kantan work was also done on an Laptop using an 960m…

Just found a way out of the unclosed freeforms 3) :slight_smile:

  • Do multiple switches in the shape lister (I used rectangles to be on the safe side)
  • Toggle betweem ‘Create shape’ and ‘Create Freeform’
  • run
projectOP = op('kantanMapper/project')
projectOP.ext.Layerizer.AddFree(end=True)

So, basically after sorting the states I can “emergency close” the Freeform and avoid redoing my work. The created freeforms are visisble in the shape lister and can be deleted as usual.

Thanks for having a look
stevo

2 Likes

Thanks @stevok ! Amazing report.

I’d also like to chime in that there is a years-old bug I’ve experienced in Kantan that’s difficult to replicate in simpler scenes, but easier in more complex ones. I can upload one scene that I know it happens in occasionally, if that helps you @snaut

Essentially, while panning, the camera matrix will occasionally “flip out” and go to a very larger number (like in the tens of thousands or hundreds of thousands or millions). This results in the viewport disappearing / going black. This first happened to me while on a project in 2018, and continues to happen to this day. It’s the only bug in Kantan that’s a real show stopper, it’s otherwise a pretty dang stable and versatile component.

Thanks for making it && maintaining it, @snaut !

ah ok, I think know this one as well, but had not understood whats going on. Most likely I then used the zoom a few times in the wrong direction and made it worse :smiley:

Another feature I was dreaming just today was an cursor x/y position in the bottom bar. It could show the current position and possibly the position of the current handle.
That could help when aligning shapes or points to an exact position but also gives an indication for the ‘lost viewport bug’ mentioned by Dylan.

Other than this an ‘Set view to home’ button sounds helpful to me. It could mainly be used to optimize the viewport to the output window (after zooming and panning), but also helps with the lost viewport.

1 Like

One more thing about 3) ‘freeforms can’t be closed’

I am under the impression that finer shapes are more at risk to fail. With these frames elements I had a bit of a trouble to create 3 rows.

Just started a blank project with Kantan and created the 11 bigger elements. Once I tried a smaller size the error happend. In a 2nd try I was going to smaller elements directly - far smaller than before and meaningful - but I needed a few elements to force an unclosed freeform that way.

In any case, building a few of these U-shaped elements is a good start to hunt this bad boy.

Thanks again, Markus

1 Like

Hey @dylanroscover,

when the canvas is completely gone, do you have a way of getting back by clicking the “h” key?
If you can share a file where I can observe this bug, that’d be great.

best
Markus

1 Like

Aha, I see what you did there @snaut! Very clever. It’s a shame that I missed this super useful shortcut (that totally matches TouchDesigner’s standard syntax… 'doh!)… is it by chance on the kantanMapper Wiki page? I tried searching for it and couldn’t find it referenced.

This homing function would definitely be a great add to the interface too, if possible. Could exist in the Tools section as a small Home button:
image

Here’s the project as a ZIP: https://www.dropbox.com/sh/lymqi8y1xx352yy/AACB8eO4-trWCAJcyFNZKijya?dl=1

Naturally I’m unable to reproduce now that I’m not in production mode, but I’ll keep giving it a shot. My hope is that the h key solves it for the future.

Many thanks!

@stevok Thanks for the freeform close fix, I’ve definitely seen this on multiple complex kantan projects.

Hi everyone !

I’m pretty new to Kantan, I was a Resolume user before.

I see some features missing (or I didn’t find it).

When in edit texture mode, it would be nice to have a pixel info of my shape size. Let’s say I want to crop my input texture to a precise size and position (for a pixel mapping for example), it is not super handy now with a scale moving from 0 to 1 and no info on position.

And in general, a pixel info of position in edit window would help a lot also.

2 Likes