Orx - Portable Game Engine
Welcome, Guest
Please Login or Register.    Lost Password?
Inkscape SVG to ORX Config Converter Tool
(1 viewing) 1 Guest
Go to bottom
TOPIC: Inkscape SVG to ORX Config Converter Tool
#5306
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 3
For my current project needs, I've created a converter tool that takes Inkscape SVG paths and converts them to orx config BodyPart sections and VertexLists.

This is handy for creating mesh shapes for BodyPart(s).

File Attachment:
File Name: InkscapeToOrxMesh03.zip
File Size:


 
Logged Logged
 
Last Edit: 2017/09/04 09:32 By sausage.
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
#5307
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Re:Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 3
Usage tutorial for Inkscape SVG paths and the converter has been added to the wiki:

Using the Inkscape to ORX Converter
 
Logged Logged
 
Last Edit: 2017/09/02 18:25 By sausage. Reason: Link was wrong
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
#5310
jim
Moderator
Posts: 260
graphgraph
User Offline Click here to see the profile of this user
Re:Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 4
Amazing work you have done man, it looks like many community made tools are coming, which is great, just cant wait for the next official release of ORX
 
Logged Logged
 
A Jim Carrey fan, that's why "Jim" twitter: @thesolewalker
  The administrator has disabled public write access.
#5312
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Re:Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 3
Thanks Jim. This tool has been so handy even just for me. I use it all the time and it saves so much time and effort rather than plot points by hand to make meshes. Glad you like it.
 
Logged Logged
 
Last Edit: 2012/10/10 05:30 By sausage.
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
#5314
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Re:Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 3
The source repository is available on bitbucket:

bitbucket.org/orx/inkscapetoorxmesh
 
Logged Logged
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
#5319
iarwain
Administrator
Posts: 3125
graph
User Offline Click here to see the profile of this user
Gender: Male Orx - Portable Game Engine Location: Montreal
Re:Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 71
Nice work, sausage, I'm going to give it a try over the week end.

@jim: About the next release, it's slowly shaping up: I successfully wrote a setup for windows master/slave buildbots.
The master is notified of new commits (it's polling the repo every X mins) and can either build for every commit, nightly or when manually forced.
The slave is able to clone the repo and start commands. Right now I got it to compile the msvs2008 versions.

I now need to write a batch file to create the packages themselves and also add slave supports for other versions/platforms.
 
Logged Logged
 
Want to follow orx's development? Check our Trello board: http://trello.com/b/g4jMS6jc/orx-tasks
  The administrator has disabled public write access.
#5332
epoulsen
Expert Boarder
Posts: 93
graphgraph
User Offline Click here to see the profile of this user
Gender: Male epoulsen2 Location: Southern California Birthday: 10/05
Re:Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 0
Hey sausage,

I did a similar thing a while back using Python / Pyglet. I wanted to create all my graphics in Inkscape. I'd add non-visible paths to the graphics for physics outlines, and a 'mass' attribute.

There was one problem I ran into that you might not have hit yet. SVG graphics often have transformations (e.g. rotate, scale, etc) in them, and often are nested. As such I needed to use xpath to find my physics paths in the XML tree, then move up the tree to the root node looking for transforms, and apply them so that the final path matched the rendered graphic. The actual rasterization of the graphic was separate.

In any case, I've attached the relevant Python code for reference. Even if you don't know Python, it should be relatively easy to read through.

This only covers physics path extraction. The actual rasterization is rather boring; just uses available libs.
 
Logged Logged
 
Last Edit: 2012/10/17 19:36 By epoulsen. Reason: Removed path from zip
  The administrator has disabled public write access.
#5333
epoulsen
Expert Boarder
Posts: 93
graphgraph
User Offline Click here to see the profile of this user
Gender: Male epoulsen2 Location: Southern California Birthday: 10/05
Re:Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 0
Tried to edit my post to attach an updated zip, but it will (now) only let me attach an image, so I'm replying to myself to attach the actual zip.
File Attachment:
File Name: phyextract-696df2d0a03310f75a75858829bf3f2d.zip
File Size: 1960
 
Logged Logged
  The administrator has disabled public write access.
#5334
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Re:Inkscape SVG to ORX Config Converter Tool 5 Years, 1 Month ago Karma: 3
Thanks, epoulsen. You're right, I haven't had to deal with transformations. The converter expects you're just plonking down points rather than any curves or anything else.

In fact, if you do make an accidental curve in Inkscape, the converter will just turn them into points so you have to watch that.

Thank you for submitting your code. I can sift the logic from that if people using the converter require it to handle those things.
 
Logged Logged
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
#8772
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Re:Inkscape SVG to ORX Config Converter Tool 2 Months, 2 Weeks ago Karma: 3
I discover to my horror that I never publicly released 0.2b of the converter.

Here it is:
File Attachment:
File Name: InkscapeToOrxMesh-cfb2500cb5a8f34f1cae13a58855f997.zip
File Size: 20974


Tutorial updated as well.
 
Logged Logged
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
#8773
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Re:Inkscape SVG to ORX Config Converter Tool 2 Months, 2 Weeks ago Karma: 3
New screenshot showing the preview pane:

 
Logged Logged
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
#8774
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Re:Inkscape SVG to ORX Config Converter Tool 2 Months, 2 Weeks ago Karma: 3
New version 0.3 of the converter with the ability to offset all the x and y values:



Download here:

File Attachment:
File Name: InkscapeToOrxMesh03.zip
File Size: 22284


Source repo is here:
bitbucket.org/orx/inkscapetoorxmesh
 
Logged Logged
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
#8778
krousty_bat
Senior Boarder
Posts: 64
graphgraph
User Offline Click here to see the profile of this user
Etincellle
Re:Inkscape SVG to ORX Config Converter Tool 2 Months, 1 Week ago Karma: 0
Great, I updated the Pinned tools thread too.
 
Logged Logged
  The administrator has disabled public write access.
#8779
sausage
Moderator
Posts: 719
graphgraph
User Offline Click here to see the profile of this user
Gender: Male sausagejohnson http://waynejohnson.net Location: Near Canberra, Australia
Re:Inkscape SVG to ORX Config Converter Tool 2 Months, 1 Week ago Karma: 3
Nice one thanks! I'll remember to do that next time.
 
Logged Logged
 
Indie gamedev with Orx at night. Always feel free to come and say hi over in gitter.im/orx/orx gitter chat or drop me a message.
  The administrator has disabled public write access.
Go to top