Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 58

Thread: Creating My own laser show software

  1. #21
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Quote Originally Posted by cfavreau View Post
    Forgot that neat feature of LaserBoy!

    Ok. I uploaded a zip file with my code in it. Sorry I have not had a chance to go through it before posting. I am quite busy with other stuff.

    You can get it here: http://fab-favreau.com/ild2h_07142012.zip

    See the main.cpp file for how to use the class. Currently ILDA file reading is written... ILDA file writing is not... I am sure I will be finishing it up shortly as I need it for another project I am working on.

    Let me know if you have any questions on how to use it... etc.

    Chris
    Hi cfavreau

    Im testing you code and i have some doubts

    1-about ildaout.h file, I get some compiling problems if I include this file on my main.cpp. It seems to not be well formated, Im saying this beacause if I include the ilda_test_frame.h I get no compiling errors and I can perfectly read this ilda_test_frame.h and show the ilda test with my projector.

    So Im thinking about make some modifications to your generate_h_file(CILDAFile &file) in order to get a ildaout.h file with the same format that ilda_test_frame.h.

    2-When I read the ilda_test_frame.h the ilda test is shown but i also get the "blanking lines", really dont know if thats the correct word, I mean that the projector not only draw the ilda_test_frame.h it also draw lines between points, so the image is a mess.

    ¿do you know how to control not to paint some of the lines between points?

    ¿maybe we must add some information to the array,int test_frame[TEST_FRAME_SIZE][5]? so when we read the coordinates from it, we must know when to paint or not to the line between two points.

    I will appreciate any idea about how to control this when reading coordinates from a TXT.

    I have found a solution but is a poor one, first a play the draw point by point and see wich points are the ones that are joined by a line that must be blanked then on the for loop i jus put blanking=1 so that line is no shown. There must be a way while youre reading the .ild file to add another dato to the array that means if blanking is neede or not for that point.

    3-If I try to read an .ild file with movement, more than 1 frame, no movement shows on my projection.

    its possible that your code its only reading the first frame of the .ild file?

    Thanks
    Last edited by Osithlon; 07-17-2012 at 08:53.

  2. #22
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    If you do not want solid colored lines between coordinate points, you need to have two points at every coordinate. The first point is blank and serves as the anchor for the next lit dot which is the second and destination with the color and the lit status.

    LaserBoy has a feature to convert a selection of vertices into nothing but dots by adding these points.

    If you are interested in the LaserBoy text format, try exporting some frames to get some examples of what it looks like. Check out the last four settings in menu x for variations of text format.

    James.
    Last edited by james; 07-17-2012 at 13:23.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  3. #23
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Hi James

    Thanks again.

    I found a solution for this blanking problem.

    Chris (cfavreau) code was reading blanking bit on ILDA format, but he wasnt saving this point to the array where He saves the coordinates+RGB info, so i just add this bit to the multidimensional array and now my draw is perfect with no blanking lines.

    Ositlhon

  4. #24
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Quote Originally Posted by Osithlon View Post
    Hi cfavreau

    Im testing you code and i have some doubts

    1-about ildaout.h file, I get some compiling problems if I include this file on my main.cpp. It seems to not be well formated, Im saying this beacause if I include the ilda_test_frame.h I get no compiling errors and I can perfectly read this ilda_test_frame.h and show the ilda test with my projector.

    So Im thinking about make some modifications to your generate_h_file(CILDAFile &file) in order to get a ildaout.h file with the same format that ilda_test_frame.h.

    2-When I read the ilda_test_frame.h the ilda test is shown but i also get the "blanking lines", really dont know if thats the correct word, I mean that the projector not only draw the ilda_test_frame.h it also draw lines between points, so the image is a mess.

    ¿do you know how to control not to paint some of the lines between points?

    ¿maybe we must add some information to the array,int test_frame[TEST_FRAME_SIZE][5]? so when we read the coordinates from it, we must know when to paint or not to the line between two points.

    I will appreciate any idea about how to control this when reading coordinates from a TXT.

    I have found a solution but is a poor one, first a play the draw point by point and see wich points are the ones that are joined by a line that must be blanked then on the for loop i jus put blanking=1 so that line is no shown. There must be a way while youre reading the .ild file to add another dato to the array that means if blanking is neede or not for that point.

    3-If I try to read an .ild file with movement, more than 1 frame, no movement shows on my projection.

    its possible that your code its only reading the first frame of the .ild file?

    Thanks
    Hi Chris I have solved point 2, "blanking problems". You were reading blanking bit on ILDA Format but you were not saving it to the array, i have just modified one line on the generate_h_file(CILDAFile &file) function. The new line looks like this

    fprintf(pFile, "{%d,%d,%d,%d,%d,%d},\n", pPoint->X(), pPoint->Y(), pPoint->R(), pPoint->G(), pPoint->B(), pPoint->Blanked());

    Just added , pPoint->Blanked(), make array [6] instead of [5], and now theres no blanking lines on my projections!!!!.

    I will try now with problem 3 "no movement on animated ILD files". As I told you if I read an ild file with movement, its look like youre only saving data for the first Frame, i will check it now and write you later.

    Thanks

  5. #25
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Chris

    About what I call issue number 3 "no movement on animated ILD files". I was right you were only saving data for the first frame, so whe you read the ildaout.h file for projecting there was no movement on the projection.

    What i have done.

    Detect how many frames and points on each frame we have, and create an array like:

    int framepoints[number_of_Frames]={pointsframe1, pointsframe2, ......, pointsframen}

    Looks like this ffor a 7 frame example:
    int test_frame_size[7] = {300,301,293,281,280,287,292};

    And also create another array with the points:

    int test_frame [number_of_Frames][max_points_in_aframe][number_of_data to_store] = {.............}

    int test_frame [7][301][6] = {.....}

    The problem cames when I wanted to create just one ildout.h file, I couldnt so I have creatd two .h files. One for each array.

    Then I just have to include this two files in my project, read thhe info from the arrays with Dr.Lavas UDAC and send it to the etherdream, and now the image has movement!!!

    Thanks Chris

    I have some problems with the generated .h files, I will make some test and write back with results.

  6. #26
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Quote Originally Posted by cfavreau View Post
    Forgot that neat feature of LaserBoy!

    Ok. I uploaded a zip file with my code in it. Sorry I have not had a chance to go through it before posting. I am quite busy with other stuff.

    You can get it here: http://fab-favreau.com/ild2h_07142012.zip

    See the main.cpp file for how to use the class. Currently ILDA file reading is written... ILDA file writing is not... I am sure I will be finishing it up shortly as I need it for another project I am working on.

    Let me know if you have any questions on how to use it... etc.

    Chris
    Hi Again Chris

    Im getting this error "STACK ABOUT VAR POINT WAS CORRUPTED" when reading some .ild files.

    Any idea, maybe is the ild interal format?

    I have perfectly read a .ild file with 101 frames, 800 poins per frame, with 3D rotation effect and no problem with it.

    Really dont know why it comes out with this errors when trying to read some .ild files that seems to be simplest than the one with 3D effect.

    Thanks in advance.

  7. #27
    Join Date
    Feb 2009
    Location
    East Coast of Southern Virginia
    Posts
    536

    Default

    Whoa... sorry I have not been following the thread. I usually depend on my email to send me updates. I have been working on the ILDA reading/writing code and have it saving ILDA V4 files reliably. I also found some bugs in my code. I had only used it to read single frame V1 or V0 files previously.

    For just wanting to use the reading writing class you will not need all the files in that project. I just included that project so you could see the context that I used it in since I don't have any documentation. As far as I know without sitting down in front of my computer that actually has the code on it you will need:

    ilda.cpp
    ilda.h
    ilda_structs.h ? is this the correct file name?
    ilda_palette.h ? is this correct also?

    You will just need to instantiate an instance of CILDAFile CILDAFrame and or CILDAPoint in order to work with the code.

    As far as the blanking goes... I saved the blanking encoded as R=0 G=0 B=0 ... and the internal code interprets between that.

    The generated arrays are for my OLSD project (Open Laser Show DAC) ... it has built in test patterns in the microcontroller and that program is how I got them in there.

    In order to use the classes properly... do not pay attention to the test frame encodings... those are streamlined for a microcontroller...

    Just use the C++ objects CILDAFile, CILDAFrame and CILDAPoint... CILDAPoint is just 1 3 dimensional point with color and blanking information. CILDAFrame is a collection of CILDAPOints. CILDAFile is a collection of CILDAFrames.... I use STL vectors internally so you can modify the code to access them like an array or you can use the appropriate Get function in the object to get a X,Y,Z,R,G,B value or frame or whole animation etc.

    If you have some code that you would like to use the file reading in send me a copy of it and I will put the CILDA class code in there for an example... Otherwise if there is something you are trying to do with the code let me know and I will post an example here. I just do not know what kind of example to provide.

    Maybe I could open and ILDA File, rotate all the frames about the Z axis and save the ILDA file back to a new file... or some other transformation etc.

    Or better yet I have Dr Lavas UDAC... I can make it play animations and such from the command line. How about that?

    Let me know I can whip up an example in no time.

  8. #28
    Join Date
    Feb 2009
    Location
    East Coast of Southern Virginia
    Posts
    536

    Default

    I will be updating the code as soon as I have a good example(s) worked out. In the meantime I will whip up something quickly and upload it tonight.

  9. #29
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Thanks for your help Chris

    Im not sure at all, but I think for my concrete idea its not necessary the ILDA write option. Let me explain you.

    Now I have a software, C#.NET, with two concrete funcionalities:


    1-Play on screen preloaded animated gifs that came with the software.


    For the First funcionality I thought to convert all my preloaded gifs to ILDA, read these ILDA files and save each preloaded gif to a .txt or in your case to a .h file. All this stuff will be done just one time and outside the software, I mean is transparent for users.

    So when the user tries to play one of this preloaded gifs I will just have to open the selected (.txt or .h) file read the coordinates, send them to DrLavas UDAC + Etherdream and the scanner will show the animated gif.


    2-Create and store animated gifs with a tool bar and play those animated gifs on screen.

    I have not think yet how to convert this user created gifs to ILDA format or coordinates format that where valid for sending to UDAC +ETHERDREAM.


    For my first prototype Im only working with the first funcionality. As I told you in other posts Im working with c++, but it wil lbe easier for to work with C#.NET, the problem is

    How to use DRLavas Library from C#.NET. I tried using DLLIMPORT, but there are lots of pointers and other types that gives sosme problems converting to C#.

    I get one C#.NET demo with DLLIMPORT working but it paints only strange forms, not painting what I send to paint.

    Do you have any idea about how to export or call or using DrLavas UDAC from a .NET project.

    Thanks in advance

    Osithlon

  10. #30
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    A gif is a raster image format. It's made of rows and columns of pixels. ILDA files are vector art. It is fairly easy to convert a vector image to a raster image, but certainly not the other way around!

    The fact that you can see the vector image on a computer screen is proof that it has already been converted to raster.

    James.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

Posting Permissions

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