Re: Dev Diary


I'm really toying with the idea of giving you all a kind of preview of what I just hooked up, because I'm so excited, hehe, but I'll add a little more comfort to it first. The most fascinating part is that it's only a funny side-effect of a side-effect...or rather an off-shoot from an off-shoot from an idea for a solution for something most of you would barely notice, or at least not really recognize as what powerful thing it is. Even if I tell you the origin of this, you'd still never guess what you'll get, I think.
But, because I'm in the mood for it, I'll tell you a little bit about it:
- Using the ribbon brushes 7 or 8, you might have noticed how it goes zigzag, when you alter the size of it as you make a stroke via pressure or movement speed, right? I initially didn't think much of it, thought it was just some nonsense in my coordinate routines, because they are pretty darn unusual. It didn't make sense to me, really, but I ignored it. Eventually I had a moment and investigated it a little only to find out a fundamental flaw of openGL quad mapping. It breaks a quad (polygon between 4 points (vertices)) into two triangles (that I knew, of course!). Distort such a rectangle and one of the two triangles will be smaller than the other. This results in a visible mapping difference, thus creating the zigzag looking ribbons or patterns on the ribbon.
- I decided to figure out, if I can alter this mapping myself and came up with a solution that is totally genuine, because there was nothing useful on the web to be found and I was digging. To keep all the sides aligned properly, no perspective distortion was allowed, otherwise the center content along the sides would shift around uncontrollably. Left to my own devices I spent 4 days thinking and trying until it suddenly came to me and I had pretty much perfect mapping for quadrilaterals, rectangles that are totally distorted. This would allow me to finally solve the ribbon issue, but I noticed what else it can do.
- Realizing I could make a pretty much unique deform/transform tool, I figured, I could also do the inverse of it and allow capturing deformed areas, which you could then straighten out or deform differently, if you wished. Thing is, my deformer was meant to understand 2d deformation as 2d deformation and not as some perspective distortion as you'd find it in photoshop, for example. That means, it will keep the content of the source rectangle exactly where it was in proportion to the rectangle's sides and allow you to distort it again, maintaining the contents integrity exactly.
- However, then I realized what basic power I have just set up, not so much in terms of distortion, but in terms of access to image data... so I wrote a quick little test, which I then quickly turned into a full feature, but it requires one essential interface element, which I hopefully get to write today!

- ...and then I really need to make a youtube video, too!
