Capturing DMX or Stored Attributes in LUA

BECOME PART OF THE COMMUNITY - Sign up here
  • So it may still be too early to ask something like this but perhaps someone can point me in the right direction.

    Today I started to see if I could do Moving trusses in 3D, after a little trial and error I was able to get something working using the Execute function in LUA to grab the fader position and update the trusses Z Position.

    What I would like to do is be able to store channels or attributes in a sequence to drive the position of the truss so you can previs truss moves. The only part I can't seem to figure out is how to get the live data from either an output or stored in a sequence.

    Given what I learned to do make the truss move seems like it should be somewhat simple.

    Any ideas?

  • Interesting, I'll give that a try.

    I have a feeling I'll need to figure out how to grab the info but I'll play with it for a bit and see where I get.

    Thanks!

    Edit:

    Nevermind that was VERY easy. I think I have everything I need to figure this out... Thanks again.

    Edited once, last by hoss (March 8, 2020 at 12:15 AM).

  • That wasn't too bad. Still definitely needs work as i can cause crashes but I can attach an input to the plugin to control up to 6 axis ( Position X, Y, Z and Rotation X, Y, z) then attach a plugin to a truss to move it real time.

    Click the Image for a youtube example.

    Next I wonder if I can move the camera.

  • Sure,

    I haven't posted any of my code since there is a somewhat good chance of a crash if your not careful but the basics are this, find your fixture in the patch and, set it's posx, posy, posz, rotx, roty or, rotz attributes.

    Depending on what you trying to do it it looks like there are a few options, The below LUA liner moves the first patched fixture (not necessarily the first FID or CID) on the first stage to +5m on the Z Axis (there may be a simpler way but I still haven't gone through all of the API):

    LUA'Root().ShowData.LivePatch.Stages:Children()[2]:Children()[1]:Children()[1].posz = 5.0'

    The below does the same thing but doesn't seem to work well for real time movement, and you can select via FID or CID.

    Set fixture 1 "POSZ" 5

    I should really use some of my extra time to post some documentation on how my plugin works, perhaps this week.

  • Please note the button of the 3D setup encoderbar labeled "Change on Encoderevent"

    This button is there for a reason, and it is disabled by default for a reason.

    Moving fixtures with the encoder will by default be executed locally while encoder is turned, then the final position is sent to the other stations, when encoder-turning is stopped.

    Using a plugin to change positioning data as described in this thread is practically the same as turning the encoders with "Change on Encoderevent" enabled, which depending on amount of 3D objects selected, could stress your network when in a session.

  • Actually that being in session is part of the reason my way of brute forcing the movement doesn't always work so well. Sometimes when I'm in session and move using my plugin it feels like the plugin is actually running on both consoles causing the moved object to move ~1cm up and down constantly, I assume both sessions are at odds, haven't looked into that bug yet since I'm mostly either testing on the console on onPC. Either way this would be a useful previs tool and most definitely not something I'd want to run during a show, Just look up :) .

    When I turn it all on just right (in session or as Idle Master) it actually works quite well.

    I totally understand about the network traffic, hence not releasing any code since it's potentially dangerous without great care, but it's very cool when it works and I do have the ability to tune the updates/second as needed. I think the most units I have tested is 10 with 2 Axis per unit at 10FPS. I'm interested in network traffic now so I think I wireshark might be in order, given I have nothing but time now.

    Change on EncoderEvent button also explains why when moving a 3D Parent the children don't move until you stop moving, Nice to know though. Just using the Set fixture 1 "POSZ" 5 seems safe enough though.

  • I don't have an official one. I took a look at the globals and found most or all of them. But without any documentation, so you kind of have to figure it out on your own.

    I'm not sharing my findings except that what I have coded up on GitHub, mostly because it would not be official, none of it is supported and anyone can find it.

    Also my guess it some of it will change with future versions.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!