2018.26450 - Kantan incorrectly places grid warp rows/cols

When making a rectangle in Kantan, and trying to add rows or columns to it, they are not placed in the position where the mouse currently is.

It looks like the warping that Kantan does internally does not properly warp the UV coordinates of the texture’s rectangle.

You can see the incorrect mapu and mapv coordinates getting used in kantanMapper / ui / renderpick / renderpickCanvas

I’ve managed a fix to this by adding some remapped uvs into kantanMapper/masterShapes/rectangle/offSets

You can see these changes in the attached file
kantan addrows.toe (589 KB)

Hey,

thanks for finding this - added your fix into an upcoming build!

Best
Markus

Thanks for checking it out. Although on some further testing, I’m not sure my fix is complete.

It certainly fixes things when using the mouse to add a line manually.

However, there may be another bug. I’m not sure if this is a different topic though.

I have also been trying to add a row/line through Python using the ext.Transformer class inside the Kantan project node.

Running the AddRow command like this:

AddRow(itemId=1, vPos=.5)

When my fix above is not applied, this command seems to work properly (most of the time*)
However, after my fix is applied, it no longer function correctly. When adding a row (or column) the entire image gets distorted and looks like it’s UVs have been reversed or something.

I don’t know if that is an issue with the UV fix I added, or the fact that there is more going on when manually choosing a line with the mouse opposed to running the Python command.

  • Without the fix, I was trying to run multiple AddRow and AddCol commands within a Python loop. When running only AddRows or AddCols everything worked correctly. However when running Rows and Cols together, I got the same sort of UV distortion mentioned above.

Ah - let me try that out, not sure what happens when you run these in a loop…
Theoretically though, this should be possible. I tried building it in a way that it can be controlled externally.

That would be great. I’ll be interested to hear how it goes for you