smeighan Posted April 20, 2012 Posted April 20, 2012 I have been getting requests for more targets than i have coded so far.Most are requesting the horizontal matrix.I will build a target generator for that, but i wanted to let all of you know that you can make your own target files.horizontal matrix, LEDs wrapped around your bush, leds on the side of your house, stack matrix quads on top of each other. You can do it.Here is the basic concept for Nutcracker targets. Whatever you have has to be divided into vertical strands. Each strand has pixels. Those pixels will always start with Pixel #1 at the top. For each pixel include the x,y,z location in world coordinates.Well, thats it.Here is what a target file looks like. It should be a space delimited ASCII file. Comments begin with a hash mark. Blank lines are ignored.# ../targets/2/AA.dat# Col 1: Your TARGET_MODEL_NAME# Col 2: Strand number.# Col 3: Nutcracker Pixel## Col 4: X location in world coordinates# Col 5: Y location in world coordinates# Col 6: Z location in world coordinates# Col 7: User string <= This is your string#. Start at 1 and go to how many you have# Col 8: User pixel <= This is the physical pixel # on your string# Col 9: Username. This is a uneeded field and can be left blank# Col 10: Targetname (again). This is an unneeded field and can be left blankAA 1 1 0.000 0.728 131.254 0 1 50 f AAAA 1 2 0.000 1.455 128.343 0 1 49 f AAAA 1 3 0.000 2.183 125.433 0 1 48 f AAAA 1 4 0.000 2.910 122.522 0 1 47 f AAAA 1 5 0.000 3.638 119.612 0 1 46 f AAAA 1 6 0.000 4.366 116.702 0 1 45 f AAAA 1 7 0.000 5.093 113.791 0 1 44 f AAAA 1 8 0.000 5.821 110.881 0 1 43 f AAAA 1 9 0.000 6.548 107.970 0 1 42 f AAAA 1 10 0.000 7.276 105.060 0 1 41 f AAAA 2 1 0.142 0.714 131.254 0 1 51 f AAAA 2 2 0.284 1.427 128.343 0 1 52 f AAAA 2 3 0.426 2.141 125.433 0 1 53 f AAAA 2 4 0.568 2.855 122.522 0 1 54 f AAAA 2 5 0.710 3.568 119.612 0 1 55 f AAAA 2 6 0.852 4.282 116.702 0 1 56 f AAAA 2 7 0.994 4.995 113.791 0 1 57 f AAAA 2 8 1.136 5.709 110.881 0 1 58 f AAAA 2 9 1.278 6.423 107.970 0 1 59 f AAAA 2 10 1.419 7.136 105.060 0 1 60 f AASo let me show you how to make one in pseudo code:A user here has 12 flat strings, 30 pixels each. He wants to string them horizontally and make a horizontal matrix.He probably wants scrolling text to work and create a nice sign board.We need the above file to be created.# In x,y,z world coordinates, we can consider this a 2D object. In Nutcracker space the z axis is up and down, the x axis is left and right, the y axis is front and back# we will start at the bottom of his first string and consider that (0,0,0).# Y axis will always be 0 since this is a 2d object. Let us assume 3" spacing between his pixels and 3" spacing between the rows of strings. My aha moment was# when i realized these dimensions do NOT have to match your display, they only have to be keep referential intact for my calculations. Let me simply this# by saying always use 3" or 8cm for the spacing between your objects and all my effects will work.for (s=1;s<=12;s++) # Lets go through all of his stringsfor (p=1;p<=30;p++) # and for each of his strings look at all of his pixels.{y=0.0; # we have a 2d shape, the matrix will be a flat planex=p*3; # in a horizontal matrix, pixels are going horizontallyz=s*3; # and strings stack on top of each other.strand =p; # i need the verticals to be strands. 30 pixels laid out horizontally. We will therefore have 30 strandspixel = 13-s; The very top string needs to be labeled as pixel #1, the very last (bottom string) needs to be labels as pixel 12print "HMATRIX ",strand,pixel,x,y,z,s,p;}The code in red will produce a target file for a horizontal matrix.,This will work with all effects in the Nutcracker.As you can see , making the target files is pretty simple. It gets a little more complex if the object is in 3d.Make a target file and email it to me, i will add it into your library of targets. I will make a screen where you can upload your own targets. The only other little cleanup is each target has to be entered into the mysql database.
travis p Posted April 20, 2012 Posted April 20, 2012 Sean i ll wait that is all Greek to me i hope your not stopping?
smeighan Posted April 21, 2012 Author Posted April 21, 2012 t purser wrote:Sean i ll wait that is all Greek to me i hope your not stopping?Not stopping.I will , before june, have produced target generators for1) Horizontal matrix2) Arches3) ability to create a matrix out of other targets, Build a 16x32 matrix, bow take 6 of those and put them next to each other in a 2x3 super grid.What i described above allows people who know how and want to to be able to make custom targets and i will support them.
Donny M. Carter Posted April 21, 2012 Posted April 21, 2012 How are things looking for S3 support Sean? Hope I didn't miss an update on that! Sorry if I did.
smeighan Posted April 21, 2012 Author Posted April 21, 2012 Donny M. Carter wrote:How are things looking for S3 support Sean? Hope I didn't miss an update on that! Sorry if I did.It has been confirmed that the s2 file loads in s3 with no issues.Currently, I have a regression where I broke the s2 file. I am working that issue this weekend. I currently am camping at chatfield reservoir in Colorado with my twin 11 yo boys and the boyscouts. I will be back tomorrow .
Aaron Maue Posted April 21, 2012 Posted April 21, 2012 smeighan wrote:Donny M. Carter wrote:How are things looking for S3 support Sean? Hope I didn't miss an update on that! Sorry if I did.It has been confirmed that the s2 file loads in s3 with no issues.Currently, I have a regression where I broke the s2 file. I am working that issue this weekend. I currently am camping at chatfield reservoir in Colorado with my twin 11 yo boys and the boyscouts. I will be back tomorrow .Awesome. Hope you're enjoying your time off from Nutcracker development.
Recommended Posts