Author Topic: Drawing basics  (Read 62796 times)

0 Members and 2 Guests are viewing this topic.

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #15 on: December 31, 2012, 12:48:26 am »
Do you see what the train effect does?

It shifts the color definitions for each vertex through the order of the vertices. So there should be a frame that has them shifted by two.

LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #16 on: December 31, 2012, 12:45:29 pm »
Right, but... there is only one blank vertex drawn by the projector at a time for some reason. If I try to represent the circles as ascii art and the four blank verticies connecting them like this...





----++----
    ||
    ++
    ||
----++----

What we start out with is this (with blank vectors shown as 'x'):


---x++----
    xx
    ++
    |x
----++x---



And then when I apply the train, there are some frames in the middle of the sequence where a single blank moves through the gap, but never more than one blank consecutively:

----++----
    ||
    ++
    ||
---x++----



----++----
    ||
    ++
    x|
----++----



----++----
    x|
    ++
    ||
----++----



---x++----
    ||
    ++
    ||
----++----



...and then later, as the outer circle completes drawing, this:


----++x---
    ||
    ++
    ||
----++----



----++----
    |x
    ++
    ||
----++----



----++----
    ||
    ++
    |x
----++----



----++----
    ||
    ++
    ||
----++x---



Where did the other consecutive blank vectors go? I have no idea. I'm just describing what I'm seeing the projector draw. IDK, maybe I can post a video of it if you think it would be helpful.


Thanks for looking!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #17 on: December 31, 2012, 01:56:16 pm »
Are you optimizing the art before you apply the train effect?

Try lowering [Tab] option

4 maximum optimized blank vector in points.

That will give you more blanking points between the lit segments

LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #18 on: December 31, 2012, 08:37:38 pm »
I do optimize the art before Train. The number of blanking points does limit the length of the tail, if only because the first segment of the blanking path is shorter with more points on the same length path. But, that makes me spend more time drawing the frame, and with slow scanners, I want to waste as little time as possible.Maybe I will set up the development environment and see if I can play with the code to figure out what's going on in this projector... That will take me some time, though.

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #19 on: December 31, 2012, 09:59:37 pm »
Let me know if I can help. I'd be glad to explain the methodology of the code.
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #20 on: January 06, 2013, 05:39:46 pm »
I'm setting up a visual studio project for laserboy. I'm missing this file: dirent.h


Do you know where it should be or what it goes to? Probably I do not have some prerequisite installed.

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #21 on: January 06, 2013, 09:47:34 pm »
I think you might be better off talking to DogP on the PL. He installed wxDex-C++ (free).

I use plain old Dev-C++. I have tried to set up wxDev-C++ but can't get it to recognize that SDL is in fact installed!

I think you'll like Dev-C++.
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #22 on: January 06, 2013, 10:29:25 pm »
OK, I didn't have a problem with SDL... I'm just looking for dirent.h. Where is dirent.h on your system?

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #23 on: January 07, 2013, 01:16:45 am »
I'll have to look, but my first guess is that it is part of Boost C++. You need that too! :)


http://www.boost.org/
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline tribble

  • Newbie
  • *
  • Posts: 20
  • Milliwatts: 0
    • View Profile
Re: Drawing basics
« Reply #24 on: January 07, 2013, 06:19:20 pm »

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #25 on: September 14, 2013, 03:38:08 pm »
Here is a more specific view of the view keys menu.


If you look at menu v you will see tables of keys that effect your view of the art.

The digits 1, 2, 3, 4, 5, 6, 7 all orbit the "camera" around the art. For each key hit of 1, 2, 3 or 4, the camera orbits in some number of degrees around each axis or all three axis. The number of degrees of rotation is set in the [Tab] menu, option a. The shift key plus 1, 2, 3 or 4 rotates in the opposite direction.

The keys 5, 6, & 7 snap to the cardinal views of front, side and top of the 3D cube of space. Shift plus 5, 6 & 7 snap to the logical opposites of back, other side and bottom views.

The 8 key is like the 4 key but it also advances the frame. So you can press and hold it to see an animation in full rotation. Shift 8 does this in reverse.

The q, w, e & r keys, right below 1, 2, 3, 4, pan the camera left-right, up-down, both-at-the-same-time and return to center. Shift on q, w & e pans in the opposite direction. The amount of pan motion per key hit is in some number of points, set in menu [Tab] option 0 (digit zero). Points are relative to the signed 16-bit number space in which this vector art exists. So from one side of the 3D cube of space to the other, along any of the cardinal axis, there are 65535 points.

The keys a, s, d & f, right below q, w, e, r zoom the camera. The a key stretches the X axis; the s key Y and the d key does both. Shift plus key shrinks them. The f key returns the camera zoom to normal; a factor of 1.0. Option b in the [Tab] menu determines the percentage of zoom per key tap.

The one thing you might notice is that pan and zoom have nothing to do with the Z axis. That is because these controls effect the way the art is displayed on the screen. The screen simply has no Z axis. It is important to understand that none of the keys described above have any effect on the numerical values that define the art. They only effect the way the art is displayed on the (2D) screen.

You can however impose the current view on the art itself so that what you see is actually what is stored in the frame data.

A big issue here is that the view of the art must all fit inside of the 3D cube of numerically defined space. Note that it is very easy to set the view so that this is not the case.

If any of the art, in a non standard view, is outside of the defined 3D space, trying to apply the view simply will not work. LaserBoy will not remove or change the coordinate values of any vertices in the frame. It just won't do anything.

It's also important to think about applying the effects of rotation, pan and zoom individually. Don't try to do all of them in the same step.

The "current view" displayed in menu v shows the rotational angle on each axis, the offset and the scale that the display math is using to make the 2D raster picture on the screen from the 3D vector art in the RAM.

Below that are shown the letter options for applying these factors to the art itself. Once the factors are applied to the art they are set back to normal so that you can see the art as it really is; from the front of space with no pan or zoom. Lower case letters o, t & g apply the view to the current frame only. Upper case applies the view to the whole frame set. If any of the frames in the set do not fit inside the defined cube of space, only those frames will be left unaltered.

So.......

If your objective is to convert a 2D drawing into 3D, first you need to know that the only thing that differentiates 2D from 3D is that in a 2D frame all the Z coordinates for every vertex in the frame have a value of zero. So if you move the 2D image away from the Z axis origin, either forward or backward in the cube, a 2D frame meets the criteria for being stored as a 3D frame.

But, as was mentioned above, pan has no effect in Z. So first you need to orbit the camera to the side of space (the 6 key). If your frame really is 2D this will display the frame as nothing but a vertical line, possibly of different colors, at the origin of space. Apply this rotation to the art (the o key). Then pan the camera left or right to move the view away from the origin of space (the q key). Apply this offset (the t key). Finally view the art from the opposite side applied in the first step to see it from what you want to be the front (the ^ key) and apply this rotation to the art (the o key).

Once you're done with this you can press and hold digit 4 to spin the camera around and verify that the art is no longer on the plane associated with zero Z.

In menu u you can turn on and off some visual elements that enhance the display on the screen. The fixed bounds and origin in conjunction with the floating bounds and axis makes all of this make a lot more sense visually.

All of the listed keys in the view menu work in the main menu except for the keys that apply the view to the art. Those only work when you are in menu v.

The number keys 1, 2, 3, 4, 5, 6,  7 & 8 work the same way in menus k and l (L) to enhance the ability to draw and manipulate vector art in 3D space; again, only effecting the way the art is displayed on the 2D computer screen.
« Last Edit: September 14, 2013, 09:17:02 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #26 on: September 17, 2013, 05:54:12 pm »
New version!

This fixes the issue with a 2D frame being stuck 2D.

http://laserboy.org/code/LaserBoy_2013_09_17.zip

James.
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #27 on: November 06, 2013, 12:00:48 pm »
New New version:

http://laserboy.org/code/LaserBoy_2013_11_06.zip

While working with a guy in The Ukraine, I noticed a bug.

If you had a bunch of frames and you did a convert from blank to black and then collapsed those frames into one frame, the connections between the segments that were individual frames was black.

It should be blank!

The issue was that the convert from blank to black was effecting the zeroth vertex, which should always be blank, no matter what.

James.
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #28 on: November 08, 2013, 02:57:41 pm »
This text file might be very useful or anyone trying to prepare files for projectors that are TTL.

You can put this file (attached) inside of the LaserBoy/txt/ folder and import it into LaserBoy as a new target palette.

i to import
4 for txt
type the file name [enter]
6 to import a palette

Now you can go into the palette transforms menu, use the up and down arrows to find the new palette and use either b to match the current frame to the new palette or B to match all frames to the new palette.

Once you have done a best match to this color reduced palette, all of your colors will be as close to pure TTL as you can get. (Only cyan is a bit off. All the others are exactly correct.)

Your vector art will now be displayed on the screen with only the TTL colors that are in the default palette. This is how it will look when you project it with a TTL color projector.

To save this as a standard ILDA format 0 or 1, you need to find the default palette of 63 colors with the up / down arrow keys and do a best match or a match to index (c for current frame. C for all frames) from your current new palette back to the default palette.

Now when you save this as ILDA it will not save a format 2 (non-default palette) in front of the format 0 or 1 frames.

Please post any questions you might have here!

James.
« Last Edit: November 08, 2013, 03:13:20 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2132
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
Re: Drawing basics
« Reply #29 on: November 13, 2013, 11:18:54 am »
Oops!

I just found a couple of crash conditions!  :P 

If you try to import this palette (only a palette defined in the txt file and no frames) as a frame set, it crashes.

Also I noticed that if there is a bad word in the header of a text formatted section it crashes.

So I'm working on that now.

I fixed the first problem.

Stay tuned for an update.

James.
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.7 © 2008-2024, SimplePortal