Grix / ildagen

LaserShowGen - Laser Show Editor / Player
https://bitlasers.com/lasershowgen-sw/
Other
31 stars 4 forks source link

ILDA that cannot be open with a laser projector #20

Closed iKachaykin closed 4 months ago

iKachaykin commented 6 months ago

Hi!

Thanks for your amazing package!

I am a bit not sure if you may help me with that, but anyway any assistance will be appreciated. I implemented a little svg2ilda converter very similar to this one -> https://github.com/marcan/openlase/blob/master/tools/svg2ild.py The problem is actually in the fact that I can open ilda files in LaserShowGen, in LaserOS, but a real laser projector refuses to draw any animation. Then, if I re-export my files with LaserShowGen it starts working, but it has some glitches that I would like to avoid. Do you maybe have any idea what do I do wrong?

I use the following laser projector: https://www.ebay.co.uk/itm/225907853137?itmmeta=01HPM4EXEZSWJJ89HGF4VGMGT0&hash=item3499284751:g:XyMAAOSwWrFkmUzg&itmprp=enc%3AAQAIAAABIIxbUAGHYdl7I6pXMGEHurSJ2SFMot653ccVRP0Ds3Amof%2BenAHmh8dyo%2FpaaEf2DTOuTmuINXKvPghvIDVvRT%2BSWFfo42z%2BV%2Fx12UF9Qnr%2FLNMzkRjAFqj2ewbDM5F9coPXaefvrQQ49H6rzo5xI%2Fee6Ep89rXlvfxKdltocgTvEaxJwn%2FZFf%2FpDrXQLxbfggtdFzODj2Gp5TpgzrV8Vfo%2BFApAGkd9reVhxgRWHXJ%2BsEhxFfeEVD5JXENkhTvZcJbeGV2FEzhyiwyNASDQ1sgc5GfXKhB8Wfd4qIUAVEHA8WqpD32LtfKEzJUiz%2BfGxXaIxSjMQZWDjQH080ZmIB%2FEFTulmyNBy7gvw7HonzRYBqYEKduYlR1AeV4hAutf0w%3D%3D%7Ctkp%3ABFBMxte7hLVj

I also attach down below a sample ilda file, and one re-exported from LaserShowGen (in a zip archive). ild-files.zip

Any feedback will be appreciated, thank you a lot for reading this message!

Grix commented 6 months ago

Not sure exactly which glitches you refer to, do you mean the small protruding lines at the tip of each normal line? If so, that is a color shift that is meant for direct output to DACs, not for ILD files since the projectors can apply this optimization themselves.

You can turn this off by setting "red/green/blue color shift" to 0 in the LSG settings. In fact, you can simply select the settings profile "ILDA file for sharing" or "ILDA file for SD card projector" presets in the lower right corner.

hmihalis1 commented 4 months ago

Hi @Grix thanks for your response and suggestion, i'm also working with @iKachaykin on this project. Perhaps I can try to clarify the issue we are experiencing.

We are trying to write a custom python ild exporter to go directly from 2d curves in Houdini to .ild files. The issue we are experiencing is that the .ild files generated with our method do not play at all, or create only very short single bursts of random small lines when we put them on the laser projector. Whereas the same file exported using our code will display fine when imported to LaserShowGen.

We can then re-export that file using LSG and it will work, but it creates these unwanted connecting lines. Not small protrouding lines, but full connections between shapes that should be unconnected , as if the dwell/end-dwell markers are erased and its drawing the entire frame as one connected curve. These erroneous connections are also visible if we then import that file re-exported from LSG to LaserOS.

I have attached a video file of the resulting laser projection and the intended input animation so you can better see what we mean.

erroneous lines in LaserOs: https://github.com/Grix/ildagen/assets/9805915/548c1fa9-795c-4912-bec7-8801562e61c7

intended result: https://github.com/Grix/ildagen/assets/9805915/0333169b-20dd-4469-92ad-2cdbec341d67

erroneous lines on laser projector: https://github.com/Grix/ildagen/assets/9805915/271e96b6-de40-44c7-a232-d020fa6503f1

Our aim is to understand what changes we need to make to our code to get it to output clean, playable .ild's directly from Houdini.

Many thanks for your attention

Grix commented 4 months ago

It does indeed look like a color shift setting issue like I said in the previous post. Those are what I mean by small protruding lines, it just manifests as full connection because the shapes are close together. Did you try adjusting the settings I mentioned? I tried importing and re-exporting the files you send in the first post and I can export them just fine, without the wrong lines, if I disable color shift.

As for why your own python script doesn't work, maybe it has to do with ILDA formats. The file you sent seems to be format 1. But some ILDA file players, especially SD card readers on projectors etc, are very particular about what format they require. Try format 0 or format 5.

hmihalis1 commented 4 months ago

thanks for your response! I'm going to try your suggestion as soon as possible, thats very good info on the format type as well. As far as i'm aware I dont think @iKachaykin has been targeting a specific format version, would you happen to know where he could find more info on those format types and how to target a specific one/which colours are available?

Would you say there is also just a hard limit on how many points its possible to have in a single frame? thankyou so much for your time.

Grix commented 4 months ago

Different ILDA file formats are described in chapter 5 of the spec here: https://www.ilda.com/resources/StandardsDocs/ILDA_IDTF14_rev011.pdf

Format 5 is the most modern, it doesn't have color palettes, each point specifies the color explicitly, which makes it much easier. However, some legacy readers only support format 0, which uses color palettes, and that palette can change based on what the reader expects, so it's a pain in the ass. I recommend trying format 5 first to see if it works.

The max number of points in a frame also probably depends on the reader. I would personally keep it below 1-2k points or so, to be safe.

hmihalis1 commented 4 months ago

Thanks so much @Grix! I'm just testing your reccomendations now and it does indeed seem like exporting using the SD card projector preset at format 0 works to remove the erroneous lines! Albeit with some flickering which I imagine is probably a frame rate issue.

So all that remains now is for us to attempt to replicate this success with our python script direct from houdini, and then to figure out how we handle colours in the case of format 0 and format 5 should we want to handle both.

Grix commented 4 months ago

Ok, sounds good. I'll close this issue then, since there doesn't seem to be anything wrong with LSG. If you need more help then you can send me an email or ask in a more general laser forum, like Photonlexicon.