OPENRNDR and ORX 0.4.5 released!

Version 0.4.5 of the framework is out with tons of new features :tada:

The openrndr-template now defaults to v0.4.5. Over 300 commits in openrndr and about 400 in orx.

This is our attempt to summarize the changes:

In the following weeks I will work on updating the guide to describe the new features, and post some screenshots below.

Note: Take a look at Keeping your code compatible with recent changes for info about updating your programs.

Enjoy! :grin:

3 Likes

ContourAdjuster :new_button:

I described this feature last year when it was still part of the alpha releases. Now it’s there for everyone. Find some examples in this post:

2 Likes

Support for ARM processors and compute shaders on Mac :new_button:

We are happy to announce that OPENRNDR 0.4.5 supports arm64 CPUs in Linux, Mac and Windows. This includes the M processors found in recent Apple computers.

At the same time, support for advanced OPENGL features like Compute Shaders are now available on Apple computers*. They were not supported because OPENGL 4.3 was not available, but thanks to Angle, compute shaders can be used in all desktop platforms :tada:

* Metal compatible GPU required

2 Likes

Applying a 2D/3D camera only to some items

In the past it was a bit cumbersome to combine static elements with other elements affected by a Camera2D. For instance, imagine you want to render some fixed texts or a logo, while being able to pan, zoom and rotate a generative design.

Thanks to Camera2DManual and it’s isolated method this is now very simple. See this demo, or a different one in which the camera is applied interactively to the object under the mouse. The 3D equivalent is OrbitalManual and there’s a demo for it too.

1 Like

orx-fft

One of the new extras added to the orx repository is orx-fft which as you may have guessed, provides the Fast Fourier Transform algorithm.

Here an example calculating the FFT values for some simple generated number sequences:

import org.openrndr.color.ColorRGBa
import org.openrndr.extra.fft.FFT
import org.openrndr.math.Vector2
import kotlin.math.sin

fun main() = org.openrndr.application {
    configure {
        width = 1024
        height = 512
    }
    program {
        val fft = FFT(1024)
        fun Double.tof() = (this * 0.5 + 0.5).toFloat()

        extend {
            val t = frameCount * 0.2

            // Generate some numbers
            val b = FloatArray(1024) {
                //Double.uniform(-1.0, 1.0).tof()
                //simplex(123, it * 0.08, t).tof()
                //sin(it * 2.5 + t).tof()
                (sin(it * 2.5 + t) + sin(it * 0.1 + t)).tof()
            }

            // Do the FFT calculations
            fft.forward(b)

            // Render some results
            drawer.clear(ColorRGBa.WHITE)
            drawer.stroke = ColorRGBa.BLUE
            drawer.lineStrip(List(b.size) {
                Vector2(it * 1.0, height - fft.magnitude(it) * 10.0)
            })
            drawer.stroke = ColorRGBa.RED
            drawer.lineStrip(List(b.size) {
                Vector2(it * 1.0, height * 0.5 - fft.phase(it) * 10.0)
            })
        }
    }
}
2 Likes

orx-shade-styles

There are a lot of new configurable shaders you can apply when drawing things. They can even be combined. Take a look at orx/orx-shade-styles at master · openrndr/orx · GitHub to see images and descriptions of what they have to offer.

2 Likes

Want to say I’m really excited about a lot of these. The FFT will be really nice as I’d been using some less-that-Kotlin-idiomatic Java libraries to do that. What I’m most excited about is finally being able to make GPU shaders on Mac. This platform parity is important as it makes it more more viable to develop on Mac yet deploy on (much cheaper) other platforms. Other stuff looks really good too!

I’m on a bit of a creative coding hiatus for various reasons, but I’ll definitely test these things out once I get back into things! Great work for everyone who worked on this!

1 Like

Hey @torb , nice to read you :slight_smile: I’ve been updating a project to make it work on a Mac Mini. I’ll post how it went when I have a moment. I hope to see you CC’ing soon again. Cheers!

1 Like