|
Post by mikiex on Feb 2, 2014 16:21:30 GMT -5
I put together a quick exporter for photoshop, you use the pen tool to make shapes and it outputs fcb statements. You can output multiple shapes (use a separate layer per shape). The layer name is used as the name of the vector list so make sure the layer name has no spaces!! By default making a shape photoshop will call them "Shape 1".. so you must remove the space. (I'll fix it so it can't happen at some point) output looks like this: Shape2 ;Vector Count = 4 fcb 0,0 fcb -24,24 fcb 40,16 fcb -16,-40 Shape1 ;Vector Count = 7 fcb -32,-64 fcb 16,32 fcb -40,56 fcb 96,8 fcb 16,-56 fcb -48,-64 fcb -40,24 PhotoshopVectorExport on githubI haven't even tested it on an emulator yet though....
|
|
|
Post by xefned on Feb 2, 2014 17:42:38 GMT -5
Wow, it even works in Adobe CS3 on a Mac! Very nice, thank you!
|
|
|
Post by celtroniclabs on Feb 3, 2014 4:01:00 GMT -5
Very nice! I have been looking for something like this for a while.. But not for Vectrex use. I'm going to check this out!
For my use, I need the points output in X,Y order, instead of the Vectrex Y,X order.
What does fcb stand for?
Did you write this in Javascript? Could it work in Illustrator too?
|
|
|
Post by mikiex on Feb 3, 2014 4:27:20 GMT -5
Wow, it even works in Adobe CS3 on a Mac! Very nice, thank you! Yes you can write scripts for photoshop in javascript, apple script or vb... but almost everyone writes them in javascript because its the only cross-platform option
|
|
|
Post by mikiex on Feb 3, 2014 4:39:35 GMT -5
Very nice! I have been looking for something like this for a while.. But not for Vectrex use. I'm going to check this out! For my use, I need the points output in X,Y order, instead of the Vectrex Y,X order. What does fcb stand for? Did you write this in Javascript? Could it work in Illustrator too? Yes javascript, I took an existing script that outputs points and fixed some problems and changed the formatting it outputs. If you look at the code I added bools for the X,Y order.. etc. So for instance: var ReverseXY = true //vectrex X and Y are reversed, so we need to reverse coords if you change that to false it will output X,Y I don't think it would work in illustrator without some modifications (guessing here) fcb stands for "form constant byte" , its just how you tell the compiler you are storing data as bytes in the asm file.
|
|
|
Post by mikiex on Feb 10, 2014 17:47:18 GMT -5
I just tested this, turns out I also needed to negate the Y coordinate because vectors came out upside-down Also need to think about drawing multiple vectors relative to each other and maybe animation. fixed version is now on github
|
|
|
Post by richard on Feb 12, 2014 19:57:08 GMT -5
You can get x,y,z data and line drawing routes out of Google Sketchup files too.
|
|
manu
Vector Runner
Posts: 13
|
Post by manu on Mar 2, 2014 13:02:16 GMT -5
Also there's CGM2AS by Marq - www.pelikonepeijoonit.net/files/vec/cgm2as.zip - I use WinFig to draw the shapes, export to CGM and then that converts them to the needed format. This is what I used to draw the Daft Punk image in Random Access Vector. Need to try this Photoshop thing out though.
|
|
manu
Vector Runner
Posts: 13
|
Post by manu on Mar 2, 2014 13:51:41 GMT -5
I don't know if this my preference only, but I'd prefer the vector output to be all on one line / object ...? like fcb 0,0,-21,-76,-29,-10,-7,-16,-10,-12,-21,-1,-9,20,5,19,21,5,10,7,-4,20,-1,12,7,12 instead of every vector on it's own row.
Also a tip: In Photoshop's View menu - Pixel Aspect Ratio - Add "Vectrex" there and I think 0.82 is about right for the ratio (screen is 11x9 inches right? Someone correct me if needed) then it looks more like it would on Vectrex.
Thanks for this. Trying out my first drawing on this now.
|
|
|
Post by mikiex on Mar 2, 2014 14:17:57 GMT -5
I put it together very quick so not many options, putting the fcb on different lines made it much easier to debug -its easy enough to change by not using writeln and adding a newline at the end. It will also throw an error if the pixel positions are not ints, my local version just rounds them down.. you can comment out the lines that do an alert box eg: //alert(py+" is not an integer! use grid or pixel snap") then parse the positions as ints like so: MyFile.writeln(" fcb "+parseInt(py)+","+parseInt(px)); If I ever get around to it I'll add a dialog as some options
|
|