Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Laser Star Wars Game with Unity3d plugin ILDA/Etherdream driver. Need advice

  1. #1
    Join Date
    Dec 2014
    Posts
    8

    Post Laser Star Wars Game with Unity3d plugin ILDA/Etherdream driver. Need advice

    Hello,

    here is a demo of the laser star wars project i started:
    https://www.youtube.com/watch?v=fUtwpOoWUvM

    Please forgive me if I get things wrong, but I am a new to laser shows. I am in the process of building a laser plugin for unity3d. My goal is to connect the unity3d video game engine to ILDA so i can make laser video games for people to play at interactive art shows. I made the game above as an programming test bed to fully understand how lasers work in practice.

    I have a cheap laser of unknown origin and an etherdream DAC (which was very difficult to get working and doesn't seem very reliable even with the test programs on the github). I am in the market to get a better laser if that will improve things.

    So far i have gotten:
    1) Etherdream DAC connected to Unity3D.
    2) Convert the scene from 3D to 2D laser lines. (tunable based on how you want to convert objects to beams)
    3) Process laser lines to laser path (discard unneeded lines and points, optimize path through lines to limit unnecessary blanking, add extra points to keep shape good on big distances, prefer paths limit direction changes, etc).
    4) pick correct PPS for submission based on line integral and target fps.

    I have given up on picking the absolute optimal path for the laser beam since computing it seems like it would be an NP-Complete problem (traveling salesperson problem with cities being laser lines and roads being cost of drawing it given the previous laser line). Instead im crafting a greedy algorithm which picks the closest line to the last endpoint of a line, and seeks to minimize direction changes. (max dot product of sequential vectors).

    I have some problems
    1) Sometimes the scene is distorted. (curved corners, ghost lines in between shapes, etc) I have been able to improve the scene's appearance by some of the optimizations i have above, or slowing the PPS(points per second), adding inbetween points, etc. I probably need a better laser. But the problem im running into is that when i optimize one scene good, other scenes look dirtorted or cause the laser or laser driver to crash)

    2) sometimes the etherdream crashes, but unloading and reloading the dll is enough to get it going again, which needs to be avoided at all costs.

    3) sometimes the etherdream crashes so bad it needs to be completely unplugged and re-plugged in to get it going again which is a deal killer.

    4) sometimes the laser crashes, (its hard to tell if it is the laser or the etherdream).

    I guess some of my questions are:

    1) how to prevent the ether dream from crashing?
    2) how to restart it without having to reboot it?
    3) Is it a bad idea to change PPS on a per frame basis?
    4) any suggested lasers for this type of project? (i need a variance too).
    5) Am i overthinking this?

    Dr. Clement Shimizu

  2. #2
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,063

    Default

    1) I don't know. I also have problems with it.
    2) Don't know.
    3) In general, it is OK. In my laser software I change speeds with each frame without any problems. But, it wouldn't be hard to normalize for a constant pps rate.
    4) A fast RGB system, wide scanning wouldn't hurt if you don't have much throw space.
    5) No, sounds like you are on the right track.

  3. #3
    Join Date
    Feb 2008
    Location
    East Sussex, England
    Posts
    5,205

    Default

    I can only really respond in relation to point 4, but you really need a good quality scanner set for this to be effective.
    You may find that some of your optimization requirements become significantly less important once you scan with decent galvos.

    You can either retrofit a better scanner set in your existing projector, or look for a better projector with better scanners also included. Your budget and time to do mods will dictate a lot of that.
    I'm assuming you're in the States as you talk about variances.

    Scanners that you should consider in rising order of cost:
    Phenix Technology PT-A40 (I think thats the right model, someone will correct me I'm sure, from Eightonlight/Lightspace indicated below)
    Dragon Tiger DT40
    Pangolin ScannerMax 506 (can't currently buy these as a complete set but some manufacturers are integrating, such as Kvant)
    Eye Magic EM7000/8000
    Cambridge Technology 6215

    Good value projectors that incorporate some of these:
    Eightonlight Venus (PT scanners)
    Eightonlight/Lightspace Pluto II (PT Scanners)
    Kvant Clubmax 1800 (506 scanners) http://www.kvantlasers.co.uk/product/kvant-clubmax-1800

    I think all of the above are full diode systems (rather than using a DPSS green module). This is desirable for your application as the colour modulation is much more linear using direct injection diodes, so colour mixing is more consistent at different powers.

    Love the project BTW
    http://www.facebook.com/SubsonicSystems
    http://www.frikkinlazors.co.uk

    You are using Bonetti's defense against me, ah?

    I thought it fitting, considering the rocky terrain.

  4. #4
    Join Date
    Apr 2006
    Location
    Miami, FL
    Posts
    3,580

    Default

    you have too many points thats why your images are becoming distorted

    neat that you made a unity to ILDA dll... one of my client's is a game developer using unity...

  5. #5
    mixedgas's Avatar
    mixedgas is offline Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    9,186

    Default

    Things to try:

    Add "Anchor" points on sharp stops.
    Add "Corner" points at right angle turns.
    Add "Guide" points on long blanked lines, aka large jumps with no points.
    Target 700-1000 points max for an image.

    Reduce your scan angle when possible.
    Scan Angle vs Max Scan PPS is a somewhat non-linear function.

    Scanners respond to short jumps faster. Long jumps take them into the Ballistic regime.

    Assume your scanners have a max bandwidth of DC-2.5 KHz with sharp roll-off for really good 30K PPS scanners.

    Proper amplifier tuning matters on critical apps like this.

    The ILDA standards are here:

    http://www.photonlexicon.com/forums/...ILDA-STANDARDS

    Email Jacob or IRC chat with him, about your Etherdream problems.

    Steve
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

  6. #6
    Join Date
    Sep 2013
    Location
    Essex, UK
    Posts
    29

    Default

    Glad someone else is having trouble with their Etherdream - Well, I'm not glad your having trouble, but it's nice not to be the only one with a ED that keeps crashing, mine seems to be the .dll rather than the ED itself, whatever software I load it in - bang, crash. I emailed jacob before Christmas but I've heard that he was away for the holidays so i'm about to msg again. hope you (we) get it fixed soon. Looking forward to seeing your game finished too!

  7. #7
    Join Date
    Jan 2014
    Location
    North Carolina, USA
    Posts
    219

    Default

    I am working on an Etherdream Max/MSP external - I have it sending data from Max to the Etherdream but ran into several
    of the same issues as you.

    It seems the Etherdream is very particular about the rate at which you send it points. Either too fast or not fast enough and it will fire its relay and shut off. I have my Etherdream streaming in its own thread and is basically a tight loop of Etherdream_Write() followed by Etherdream_Wait_For_Ready(). This generally works if the number of points in Etherdream_Write is a good size - like 500 to 1500 or so. But anything outside of this sweet spot and the relay will usually Fire.

    CMB and I started working on a jsfiddle project to try out some optimization techniques - I don't have. link to this at the moment as I'm on my Phone on an airplane getting ready to take off - by I'll update this when I can.

    Two things which I had a really hard time getting to work on the ED was a simple square and a frame of just a few points (no lines) - finding the right number of anchor points to insert is the magic part. Seems like a or lots of trial and error is involved.

  8. #8
    swamidog's Avatar
    swamidog is online now Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,365

    Default

    Quote Originally Posted by BlueFang View Post
    I am working on an Etherdream Max/MSP external - I have it sending data from Max to the Etherdream but ran into several
    of the same issues as you.

    It seems the Etherdream is very particular about the rate at which you send it points. Either too fast or not fast enough and it will fire its relay and shut off. I have my Etherdream streaming in its own thread and is basically a tight loop of Etherdream_Write() followed by Etherdream_Wait_For_Ready(). This generally works if the number of points in Etherdream_Write is a good size - like 500 to 1500 or so. But anything outside of this sweet spot and the relay will usually Fire.

    CMB and I started working on a jsfiddle project to try out some optimization techniques - I don't have. link to this at the moment as I'm on my Phone on an airplane getting ready to take off - by I'll update this when I can.

    Two things which I had a really hard time getting to work on the ED was a simple square and a frame of just a few points (no lines) - finding the right number of anchor points to insert is the magic part. Seems like a or lots of trial and error is involved.
    the relay firing is the ED sensing an error with the data connection and actuating the interlock to kill projector output. this is absolutely intended to happen on buffer under/over run conditions. i'm sure jacob can speak more about it.
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  9. #9
    Join Date
    Dec 2014
    Posts
    8

    Default

    Quote Originally Posted by BlueFang View Post
    It seems the Etherdream is very particular about the rate at which you send it points. Either too fast or not fast enough and it will fire its relay and shut off. I have my Etherdream streaming in its own thread and is basically a tight loop of Etherdream_Write() followed by Etherdream_Wait_For_Ready(). This generally works if the number of points in Etherdream_Write is a good size - like 500 to 1500 or so. But anything outside of this sweet spot and the relay will usually Fire.
    Around line 557 of
    https://github.com/j4cbo/j4cDAC/blob...m/etherdream.c

    You can see that the driver is approximating a variable called cap. It seems like it is not computed exactly. That is slightly alarming to me, but I guess that there is no way of for sure knowing it. Potentially this could be one place to look into for insight into this issue. The DLL does not expose cap or the other variables. It may be good to expose these variables. I got the dll building on my machine, I could expose this variable if that would be helpful. I dont know exactly what this cap means, but possibly knowing cap would help us know how many points we can submit or if we are in the danger zone for underflow.

  10. #10
    Join Date
    Dec 2014
    Posts
    8

    Default

    Also thank you everyone else for you tips.

    JohnYayas and norty303, I am looking into getting a new fast laser scanner as top priority and thanks for the valuable suggestions.

    flecom and mixedgas Im going to work harder to get my beam patterns optimized. Those are some good ideas. Its a matter of viciously deleting unneeded points, and prudently adding new points.

    One thought is to repeat lines in a frame if the frame is too short and split a frame if it is too big...

    Spotta,
    I simply could not get any program using the dll to work other than making my own. On the git hub, there is a python code sample called talk.py that worked for me and that is what gave me hope that it was working. I also tried loading up the sd card with animations and triggering them with OSC or autoplay and that worked for some but not all of the animations i found. If you preload the animations and use OSC you can potentially make due.

    Actually the first problem i had was the the 25 pin cable i had was bad(possibly a cross over) but plugging the bare card straight into the projector with no cable worked. That is about the only nice thing i have to say about ILDA cables: you dont actually need them!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •