Some live coding with python

I've worked on a few different live coding environments in the past, but now I thought I would try to make something simple with Python that could later maybe form the basis for a bigger tool.

Watching for changes

The first thing a live coding system needs is a ...

more ...

How DNG compresses raw data with lossless JPEG92

The Back Story

For the last year, I've been developing a cross-platform (i.e. Linux, Mac and Windows) Python-based desktop application called "MlRawViewer".

It was born out of the troubles I had working with the large raw video files produced using Magic Lantern with my Canon 7D (see Life ...

more ...

ThNdl v2.0

ThNdl has had a, er, Autumn clean. I've migrated to use the Pelican static site generator, and converted all the articles from their old format to Python ReST format.

Sadly all the old links & feeds are broken, and the live shader editing and generation has been replaced with static ...

more ...

Life Without Artifacts

6Mbit/s

12Mbit/s

25Mbit/s

50Mbit/s

RAW

Practically every film or video you watch these days is made up from thousands of 8x8 blocks of pixels described by a tiny stream of bits taking up just a fraction of the size of the original uncompressed data.

When the ...

more ...

RAW, a new way of recording the world

1:1 crop from a 7D RAW video frame. Processed with RawTherapee (sharpening, noise reduction).

A while ago I bought a Canon 7D DSLR camera to use for taking pictures and making videos. It's had a good life so far, producing thousands of pictures and many videos from different ...

more ...

Filming shaders

Some of the most interesting shaders are self contained 4 dimensional worlds defined entirely by maths. With a powerful GPU rendering them in real time at 60 frames per second, they can look utterly stunning.

But what to do in case you don't have the most powerful GPU to ...

more ...

Crunching Rays in your Browser

float floor(vec3 ro, vec3 rd, vec3 normal, inout float t)
{
    float d = dot(rd,-normal);
    float n = dot(ro,-normal);
    t = mix(-n/d,t,step(d,0.));
    return d;
}

float sphere(vec3 ro, vec3 rd, float size, out float t0, out float t1, out vec3 normal)
{
    float a ...
more ...

Shader recap

So far I've posted 9 articles here covering different techniques for making OpenGL shaders.

For those of you that have been following and trying things out, I thought this might be a good place for a recap.

I introduced the different built-in functions of GLSL as we needed them ...

more ...

More noise

Now we have a function which can give us a random-ish looking number between 0-1 for every pixel we render with a shader.

By using floor as we did earlier with continuous numbers, we can now have a random number for each different region of the image.

float rand(vec2 ...
more ...

Noise from numbers

Sometimes, a little noise is all you need to go from synthetic to organic.

The world is unpredictable, and that makes it interesting.

The same rules applies to shaders - unpredictable output makes for more interesting and natural-looking results. So how do you make a shader output unpredictable results?

An easy ...

more ...

Travelling in parallax

This won't be a long one. It's really just an excuse to show you some new background scenery.

(If you're reading the RSS, why not stop by the web site now to see what I'm talking about?)

Unfortunately it will probably be quite boring (disabled) on ...

more ...

Native means nothing

A word that is often thrown around (very often without definition) in the mobile industry these days is native.

It's typically used in the context of application platforms, frameworks, and ecosystems, suggesting that the one with the native label is somehow closer to the hardware, which implies (depending on ...

more ...

Continuously discrete

Smooth looking images have every pixel quite similar to the ones all around them, while still being different enough to form a picture that isn't just one solid colour.

When a shader program is used to make an image, it is typically fed with input values (say x and ...

more ...

Going round in squircles

If you were an N9 user, you might have noticed something about the shapes of many of the icons it used.

They weren't quite the usual squares, or even rectangles with rounded corners, but another shape called (I kid you not) a squircle, which if that wikipedia link is ...

more ...

Mixing it up a bit

With just a few shader functions like length, mod and max, I can make simple repeating shapes like squares, circles, and lines. With stretching and skewing of the coordinates, these can be moulded in all kinds of interesting ways.

But still, when I'm trying to create a more complex ...

more ...

The Art of Repepetition

(If you're reading this in the RSS feed and there isn't a wide animation above this line, I suggest you read the article from the web version for the full giftastic experience)

Sometimes, differences everywhere aren't what you need. Constraints, like limited memory, bandwidth or performance, call ...

more ...

Riley

I was busy mixing some shaders with a bit of new server infrastructure, and something potent emerged that demanded a mini post for itself.

But first a warning. If you have eyes and a brain and you click this link, one or both of them may come away hurting. Don ...

more ...

Square shaped shaders

We already saw how the GLSL (that's the OpenGL Shader Language) built-in function "length" can be used to calculate the distance of a point from the centre (0,0) - great for making circles.

GLSL has many other built in functions. Lets use a couple of those to make squarish ...

more ...

Learning to shade

(Note: ThNdl v1.0 had the live shader editor. ThNdl v2.0, which you are reading now, doesn't. Sorry)

So far on ThNdl, I've shown you some simple OpenGL shaders, and teased you with some not-so-simple ones.

If the whole idea of shaders is new to you, you ...

more ...

Whoops, we forgot a dimension

(Note: this article talks about ThNdl v1.0. You are now reading v2.0 which, sadly, doesn't have side scrolling)

Many of you are probably reading this on a device that looks something like this.

The "tall thin slab full of screen" form factor for phones seems to be ...

more ...

Logo

In pixels

In code:

c=vec4(pos.xy,0.,0.); b=vec4(pos.x*cos(o.x)-pos.y*sin(o.x), pos.x*sin(o.x)+pos.y*cos(o.x),0.,0.);
float r,s,l,h,i,k,m,n; m=clamp(1.5-abs(b.y),0 ...
more ...


Welcome to ThNdl

Welcome!

The first rule of ThNdl is don't forget to PAN RIGHT to find the articles (unless you're on IE with no columns support).

This is a blog written by myself, Andrew Baldwin (baldand@twitter).

The articles will cover all kinds of things I'm interested in, including ...

more ...