nortikin / sverchok

Sverchok
http://nortikin.github.io/sverchok/
GNU General Public License v3.0
2.25k stars 233 forks source link

Parsing ArtRage stroke script and GML and maybe 3D Grease Pencil ML #1594

Closed enzyme69 closed 7 years ago

enzyme69 commented 7 years ago

I am currently starting at this script generated via app called ArtRage. Maybe this can be an interesting study in Sverchok. https://www.artrage.com/manuals/getting-started-artrage/older-desktop-editions-artrage-2-3/artrage-4/script-files/

This can be a fun parsing task as a Python node. artrage_test_001.arscript.zip

Ideally, I really like @zeffii idea of GML (Graffiti Markup Language) thing. It should transfer well into Grease Pencil, maybe, more or less. There are probably some GML data out there that can be transferred into Grease Pencil via Sverchok. Something I want to see.

At some point in the future, we probably have 3D paint tool ala TiltBrush for VR users. I do not have access to those 3D painter unfortunatley.

Anyway, Art Rage 2D strokes look something like below: screen shot 2017-04-28 at 13 23 57

Maybe it is like a basic Motion Capture data of some sort. I will try to parse it using my knowledge of Python. I think the data has XML bits.

Hoping for some hints to the right direction.

Thank you!

enzyme69 commented 7 years ago

Currently discovering XML, elementree, tag, etc. This

-> I suspect, this is all the strokes of my artwork, this thing has lots of lines in it, weird -> useless tag for now Really just want Loc and Pressure info. Should be simple as soon I could access StrokeEvent.
zeffii commented 7 years ago

You need to figure this out by yourself. All progress involves struggle and determination. Good luck

enzyme69 commented 7 years ago

Thanks Zeffii! --


enzyme69 commented 7 years ago

This is actually getting somewhere! 💃

screen shot 2017-04-28 at 17 06 40

There is a sense of accomplishment with parsing code.

The code is pretty crappy at the moment, but basically since the data itself is actually fairly tidy and has certain pattern, this XML, all I want is the coordinate X,Y and the stroke pressure.

To Be Continued.

Maybe I share the completed Script Node here.

I don't know maybe I am the only person in the world using iPad and ArtRage and Sverchok in Blender :D

zeffii commented 7 years ago

Don't worry about crappy code, you have to write a whole lot of crap code to gradually become better. It's more useful as a learning experience just to code it .. warts and all. Then if you feel it should be improved, that's when you ask someone more experienced to have a look and point you at better coding style / conventions / techniques..

Once you can do no more to it, share it. always share it. I've found this to be the best way to make sure I never lose code (code=time you'll never get back).

nortikin commented 7 years ago

i will quote this frase about time

enzyme69 commented 7 years ago

Thanks for tips, @zeffii :D I am learning. True on CODE=TIME.

I will put some of my internal dialogue here: https://github.com/enzyme69/blendersushi/issues/1

enzyme69 commented 7 years ago

Checking out this GML importer by Nick: https://github.com/n1ckfg/LightningArtist/tree/master/blender

It seems to have issue maybe the grease pencil data it is creating is not 100%.

nortikin commented 7 years ago

it is GP animation import export, so usefull maybe for animators.

enzyme69 commented 7 years ago

@Nikitron unfortunate effect is one frame delay... maybe sverchok needs force update node that update something each cycle, kind of like AN process all, using all CPU --


zeffii commented 7 years ago

No.. obj id selector probably needs a frame in. Socket.