Page 4 of 4

Re: Using Verve as a X Y tracing table ?

PostPosted: Tue Jul 21, 2015 7:56 pm
by GBoGBo
Some update :-)
I found a workaround of the above issues by drawing a first set with small tiles, then a second set of larger ones (same algorithm from Dr Di Blasi for both).
Before drawing each large tile, the trick is to erase its place with some margin in order to "insert" it nicely into the previous set.
Small tiles were possible despite the Verve restriction on square brushes, provided that they are long enough, like rice grains.

Here's an example, with a final rendering with Blender/Cycles :
Image

regards,
GBoGBo

Re: Using Verve as a X Y tracing table ?

PostPosted: Mon May 09, 2016 1:25 pm
by GBoGBo
Pilou wrote:Have you somewhere the link for "how use your stuff" with Verve? :oops:
Concrete use of Processing (?) inside Verve! A complete tuto even very simple! From A to Z! :)

Hi Pilou, what i do with Processing is basically programming moves of the mouse pointer and mouse clicks, it works with Verve but would work above any painting program or other application with a GUI. Also I know from a friend that you could do the same with Python instead of Processing if you prefer.

In order to make a stroke on a painting application, you just need to program this :
1. A mouse move to where you want to begin the stroke
2. A left mouse button click ON
3. A mouse move to where you want to end your stroke
4. A left mouse button click OFF
Et voilĂ .

The first post of this thread gives the trick on how to use the JAVA Robot Class in Processing, this class has all the necessary to control the mouse (moves, clicks) and also the keyboard (e.g. Ctrl key to erase in Verve) :
viewtopic.php?p=11070#p11070
Note that unlike the circle example, you don't need to code into the draw(), coding into setup() is what we want most of the time.

For a single stroke in 4 steps as explained above, this is the corresponding code in Processing :
  Code:
import java.awt.Robot;  // for mouse moves
import java.awt.event.InputEvent; // for mouse clics
import java.awt.event.KeyEvent; // for keyboard e.g. rbt.keyPress(KeyEvent.VK_CONTROL);

Robot rbt;

void setup(){
  try {
      rbt = new Robot();
  } catch(Exception e) {
    e.printStackTrace();
  }

  // start :
  rbt.delay(3000); // wait 3 seconds to give the time to Alt+TAB to Verve
  rbt.setAutoDelay(60); // set some delay between every Robot action
 
  // 1. move the mouse to the center of the HD screen
  rbt.mouseMove(1920/2, 1080/2);
 
  // 2. press left mouse button to begin painting
  rbt.mousePress(InputEvent.BUTTON1_MASK);

  // 3. move the mouse to the end of wanted line
  rbt.mouseMove(1920/2 + 100, 1080/2 - 100);

  // 4. release left mouse button to stop painting
  rbt.mouseRelease(InputEvent.BUTTON1_MASK);
 }

Don't forget to switch to Verve once the Processing sketch is launched (Alt+TAB), otherwise the mouse pointer will go and click on... whatever is on your window ! :evil:

Of course having a knowledge of Processing programming is a prerequisite to go beyond, for those who don't know programming or Processing I can advice a really good book*, and after that I can guide for the specifics (e.g. a way to change color on Verve GUI, the stroke size, and so on). Please let me know when you are at this stage.

Regards,
GBoGBo

(*) http://learningprocessing.com/
You may find the first edition when searching "learning processing pdf" on google to have a glance, but i recommend to buy the book of course, to retribute the author for this great resource to learn programming and OOP basics

Re: Using Verve as a X Y tracing table ?

PostPosted: Mon May 09, 2016 10:09 pm
by Pilou
Thx for the efforts!
I will see that when I will have ideas a little more bright! :roll:

PS If you want to see the Learning Processing in Live : the Nature of Code (and free) by the incredible Daniel Shiffman
gothere! and make a big Scroll down! :beer:

Re: Using Verve as a X Y tracing table ?

PostPosted: Tue Apr 25, 2017 2:11 am
by eduardobedoya
Great post GboGbo,
I'm eager to test this code of yours, thanks for sharing.

Zeropainter, I thought LAZY NEZUMI was used for smoothing your lines, does it have a painting bot too?

Thanks Advanced.