ORX-OLIVE System Crash Problem

Hello,

I’ve been playing around with the new live coding version of OPENRNDR with oliveProgram as shown in Edwin’s great introduction talk over at github. I like the logic behind this, enabling layers and the ease of postFX with shaders. Two questions - is there any documentation about the available shaders that can be applied and is there a good way in which one can extend classes for incorporating one’s own shaders?

Secondly, I’ve encountered a troublesome crash lately using Olive. My computer freezes and the mouse pad locks suddenly. No solution but to reboot. This problem I noticed occurred after automating the offset values for the Perturb fx. This is the line :

    post(Perturb()) {   
             phase = simplex(0, seconds * 0.10) * 0.75 + 0.10
             offset = Vector2(0.0, simplex(0, seconds * 0.05) * 0.75)
                }.addTo(gui)

My program uses a font import and follows the basic structure that Edwin showed in his video, manipulating layers with different post FX. I’m working with a MacBook Pro Retina 13inch (2015) running the latest version of Catalina. Here’s the whole program just in case I’m doing something terribly wrong elsewhere.

/**
 * openrndr-template
 * Created by tisane on 21/05/2020.
 */
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.draw.loadFont
import org.openrndr.extra.compositor.*
import org.openrndr.extra.fx.blend.Add
import org.openrndr.extra.fx.blend.Multiply
import org.openrndr.extra.fx.blend.Screen
import org.openrndr.extra.fx.color.ColorCorrection
import org.openrndr.extra.fx.distort.Perturb
import org.openrndr.extra.fx.patterns.Checkers
import org.openrndr.extra.gui.GUI
import org.openrndr.extra.gui.addTo
import org.openrndr.extra.noise.simplex
import org.openrndr.extra.olive.oliveProgram
import org.openrndr.math.Vector2

/**
 *  This is a template for a live program.
 *  REF : https://www.youtube.com/watch?v=qdgnRct0_nw&feature=youtu.be&t=12428
 *  It uses oliveProgram {} instead of program {}. All code inside the
 *  oliveProgram {} can be changed while the program is running.
 */

fun main() = application {
    configure {
        width = 900
        height = 800
    }

    oliveProgram {
        val gui = GUI()
        val c: Composite = compose {

            // Background layer
            layer {
                //post(Checkers())
                backgroundColor = ColorRGBa.BLACK
            }

            layer {
                val font = loadFont(
                    "data/IBMPlexSans-Bold.ttf",
                    200.0
                )
                // TEXT LAYER 1
                layer {
                    draw {
                        drawer.fill = ColorRGBa.YELLOW
                        drawer.fontMap = font
                        for (y in 0 until 5) {
                            var xOff = simplex(0, seconds * 1.15) * 200.0 + 100.0
                            drawer.text("RNDR", 300.0, y * 125.0+200.0)
                        }
                    }
                }

                // TEXT LAYER 2
                layer {
                    draw {
                        drawer.fill = ColorRGBa.BLUE
                        drawer.fontMap = font
                        for (y in 0 until 5) {
                            var xOff = simplex(0, y * 0.25) * 15.0 + 300.0
                            drawer.text("RNDR", xOff+2.0, y * 125.0+200.0)
                        }
                    }
                    //blend(Multiply())
                }
                // Filters >>>
                post(Perturb()) {
                    //scale = simplex(0, seconds * 0.015) * 0.50 + 1.50
                    phase = simplex(0, seconds * 0.10) * 0.75 + 0.10
                    //offset = Vector2(0.0, simplex(0, seconds * 0.05) * 0.75)
                    //gain = simplex(0, seconds * 0.005) * 0.25 + 0.10
                }.addTo(gui)

                post(ColorCorrection()).addTo(gui)
                }
            }

        extend(gui)
        extend {
            c.draw(drawer)
        }
    }
}
```

Hello Mark,

The filters are described in the guide. That includes a section on creating your own filters as well as a link in the bottom section to an overview of all the filters in orx-fx. That that cover what you are looking for?

I can’t find anything wrong in your code and after trying to run it for myself I don’t see anything strange happen. Can you share software and hardware details of the setup you are using?

Hi Edwin,

Thank you for the feedback. Here is my setup:
Processor - 2,9 GHz Dual-Core Intel Core i5
Graphics - Intel Iris Graphics 6100 1536 MB
Working with Intellij Community Edition latest update and Java 10.0.1

I have had this problem once before - the mousepad blocking - and after some searching, found that this particular MAC Book Pro has had issues with the trackpad. So, it may just be my computer playing up. I’ll keep you up to date if it persists.

Thanks again

Mark

Is it just the mousepad? Does an external mouse work? Is there still activity on the screen even if the mousepad doesn’t work?

I’m asking because in my laptop I get a total freeze when I try drawing more than a few line segments. It also has an Intel GPU. This doesn’t happen in my other computer with a dedicated graphics card.

This is an example of a program that makes my laptop freeze:

Drawing some lines
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.extra.noise.Random

fun main() = application {
    program {
        extend {
            drawer.clear(ColorRGBa.WHITE)
            for (i in 0 until 500) {
                drawer.lineSegment(
                    Random.double0() * width,
                    Random.double0() * height,
                    Random.double0() * width,
                    Random.double0() * height
                )
            }
        }
    }
}

Hi Abe,

What happened was that the mouse track blocked (physically unable to press down) and the mac froze completely. Had to reboot the brutal method ;—) I didn’t/don’t have an external mouse.

I tested your program and there were no issues. Strange behaviour.

M