Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Open Dmx-Interface implementation - how to?

Discussion in 'Scripting' started by Metal_Bow, Dec 14, 2021.

  1. Metal_Bow

    Metal_Bow

    Joined:
    Jul 11, 2020
    Posts:
    2
    Hi,

    I am trying to create a program that will be connected to a DMX-Light-device. To connect that device to the pc i got the Enttec-Open-DMX-USB-Interface.

    They have an C#-Class on their website (https://www.enttec.co.uk/product/lighting-communication-protocols/dmx512/open-dmx-usb/)
    but now I am just struggeling to get a seperate script to send a signal to that device and I have no clue what I am doing wrong/ where I have to look to do it right.

    So you'd be a great help, if you know how to send a dmx-signal to a channel

    (I added the C#-class to the thread and my last small attemp to just get the lamp to go on)
     

    Attached Files:

  2. schirDev

    schirDev

    Joined:
    Mar 7, 2018
    Posts:
    12
    did you solve your problem? I'm kind of trying the same thing atm
     
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,749
    Please don't necro post to old threads. Odds are this person is long gone and in any case, necro-posting is against forum rules.

    When you post vague questions, remember that we cannot read your mind.

    How to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220

    This is the bare minimum of information to report:

    - what you want
    - what you tried
    - what you expected to happen
    - links to documentation you used to cross-check your work (CRITICAL!!!)
    - what actually happened, especially any errors you see

    If you post a code snippet, ALWAYS USE CODE TAGS:

    How to use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/
     
  4. schirDev

    schirDev

    Joined:
    Mar 7, 2018
    Posts:
    12
    Well I wasn't aware, that responding to a post from Dec 21 is considered necro-posting. I just had the same problem as op, but I will provide more information next time.
     
  5. DavidLeertasteW

    DavidLeertasteW

    Joined:
    Dec 17, 2017
    Posts:
    5
    Hi there, I don't think you were wrong to ask that question. It was merely a not super timely follow-up to a niche question with the slim chance for a solution.

    I actually faced the same problem op was struggling with in February, and found a workaround/solution. As it stands, there is no way I know of to get the C# Open DMX protocol running from within a Unity application, or a dot net core application for that matter. (Missing libraries)

    However, you can create a separate Windows Forms C# application that implements the Open DMX protocol. Now you just need to find a way to get the DMX512 byte[ ] from your Unity application to your Open DMX application.

    If you want a quick and beginner-friendly solution, simply write to a file from Unity and read that file from the Open DMX program. The next best method is to turn your Open DMX program into a TCP server, and send messages to it from the Unity application.
    A lightweight alternative to that, is to turn it into an HTTP PUT server instead, and send Unity Web requests. This is less performant (slightly more garbage generation) but supports most platforms with the least amount of hassle. And yes, a nice bonus is that you can control the lights from your phone as well ;)

    I ended up polishing my implementation and created a Unity plugin from it, which you can check out here: https://neoludic-games.itch.io/u-dmx, if you want to save a bit of time.

    Let me know if you have any questions. I am happy to see more Unity devs explore DMX tech, cause frankly it is super cool what you can do with it!

    Edit: U-DMX is now also available on the Asset Store! https://assetstore.unity.com/packages/tools/integration/u-dmx-230795
     
    Last edited: Sep 9, 2022