Near real time processing



Is it possible to process input data in a “near real time manner”?
What would be needed so that a the position of the camera (or of an entity) could be influenced by input data input data (for example a “midi file”)?


It sounds like you wish for an animation engine.

SketchUp is designed for a human to manually produce models by using interactive tools.


Hallo Dan
Thanks for your reply.
I am aware of the fact, that Sketchup was not intend to process real time input. Nevertheless, I wondered if it was possible to come close to it with some extensions-scripts.
I wrote some very simple ones in the field of camera animation. I read about “tool” but I cannot figure out how to realize the reading of data and the manipulating the model.
Is this impossible to do even with ruby or c++ api.?


Reading external data is possible (and often done) using standard Ruby libraries or classes.

The “real time” is the problem. There are too many things that can cause data and SketchUp to be out of sync. (And this is the wrong category to be teaching programming.)


What exactly is it you are trying to achieve?


hallo kengeyhallo
I wrote some very simple scripts in the field of camera animation.
I wondered, if it was possible, to extend the input, to read data, for example from a wave-file to influence the camera parameters. So the music would move the camera or the model.


Well, there is a difference in reading a wave file and doing some Fast Fourier Transformations, which doesn’t have to be real time since it can be precalculated, and (near) real-time interfacing with a hardware interface on the other hand.

Anyhow, since real-time also mostly means ‘all the time’, i would do whatever it is you wish to poll in a timer, to not block the UI while doing your continuous polling.(


I wonder what in a WAV file would tell the plugin code to move the camera in which direction ?
… what would tell the camera to move up or down ?
… what would tell it to zoom in or out ?
… what would tell it to change the target point ?

Looking at …

… I’m none the wiser as how such data could move the camera, unless it just increments a frame for each bit in the WAV bitstream. (But then there need to be some predetermined camera paths for it’s eye and target.)

The SketchUp API’s method for playing sound files only supports WAV on the PC/Windows editions.


Hallo Dan

The Data of a WAV File would have to be analyzed and the camera-parameters changed according to defined transformation rules. For example, a beat in defined frequency-range reaching a certain threshold would move the camera on the x-Axis to a certain extent, a beat in another frequency-range would influence the Zoom-Factor. In absence of beats, the camera-parameters would return to their initial values.

Best regards, Luca


The SketchUp API does not have any defined interface for WAV file bitstream data.
You will need to write this yourself, or use a 3rd party library or gem.

  1. I do not know of any (libraries or gems) myself.
  2. I feel this is not appropriate for SketchUp and is better suited to gaming engines.


Thank you Dan
for clarifying th****e question.


Here is a search on the rubygems library on “WAV” …✓&query=WAV


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.