Milton»Blog
Sergio González
Hi there,

A smallish announcement:

I'm going to change Milton's license to GPL, with the possibility of dual licensing in the future if there is ever demand.

I plan on releasing a commercial product based on Milton. It will start as a macOS app with a UI redesign and some new features, but we'll see how it goes from there. I don't have a well-defined deadline but I estimate it will take at least a year. Probably more.

It goes without saying that everything I release will be free for the people who are Patreon supporters or who have been in the past :3

A more rambly version of this is on my personal blog.

Sergio González
It should have anti-aliasing on many more machines now! (Paging gingerBill and mrmixer)

Linky

Hope it works well.
Sergio González
I posted a devlog on Milton's renderer.
This is an excerpt of the post on my hugo site.

====

After a long time in development, Milton has a brand new renderer. Before now, Milton did all of its rendering on the CPU. The new renderer uses OpenGL to take advantage of the GPU.

I didn’t expect to release OpenGL without problems. I had tested Milton on my machine, which has an Nvidia card. I did some testing with the Intel integrated graphics on this same machine, but I did not do testing with ATI before release.



In the past couple weeks, Milton has gotten some testing from people that aren’t me. At the time of this writing, I am about to ship a new version that corrects some problems with anti-aliasing on non-Nvidia cards.

If Milton works on your machine, then you’ll see how it can handle much more complex paintings now. And for people who use it as a blackboard, which AFAIK is many of Milton’s users thanks to Handmade Hero, it will feel much smoother.

So how does Milton work? Let’s take it step by step

But first, let me say something!

I tried a million things and failed a million times. This is the second renderer for Milton, and for every part of the new renderer that works there were two or three things that didn’t. Perhaps it would have been better to write a chronological document about the development of the renderer, but it would have been way too long. I am only writing a description of the working result, not the months of work that I spent hitting my head against the wall!

With that said, let us begin.

Creating a new stroke

The main loop polls the mouse or (hopefully) the wacom tablet. The mouse gets polled at the Vsync frequency, which is 60hz for most people. This looks really bad. Drawing a circle quickly with the mouse is a great way to create a crappy looking drawing. I will get around to fixing that now that the new renderer is done.

The Wacom is polled at 200hz, or less for lower-end Wacom tablets. The Wacom driver has a limited sample rate. One thing that Milton needs is to do interpolation on the input points.

Milton does some simple smoothing for tablet input. As a stroke is being drawn, every new input point is averaged with the last couple of points. It’s a form of moving average. It’s simple and it works.



Once the stroke is processed, Milton needs to send its information to the GPU, aka “cook it”, so that it can be rendered. A stroke might be cooked several times. If a stroke is within the bounds of the screen and it hasn’t been cooked yet, it gets cooked. If it ever gets within some threshold away from the screen, it gets freed from the GPU.


continues here...

Sergio González
Hey there!

I wrote a blog post. It's about 50% personal and 50% about a "fun" bug that I had with on some machines with Intel integrated graphics.

It is a bit of an experiment in mixing the personal and technical. I plan on posting an actual dev log about Milton's new OpenGL renderer which should be fun to write and hopefully to read.

Meanwhile, I hope you enjoy this!

Link <-- (I was going to paste an excerpt here but it really only works as a whole.)
Sergio González
Copyright (c) 2015-2016 Sergio Gonzalez

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.