Results 1 to 10 of 20

Thread: Spline Editor

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Nice! Glad to see you working on your engine/designer again.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    Things have taken slightly longer than I expected, but still... new update.

    As said, the view menu is fully functional. You can also use the list of anchors to quickly select an anchor and see it's properties. Also, the red plus-signs allow you to insert new spline-anchors to make more complex splines, like this one.



    The main things that I still need to do are: import/export functionality, add upvector support, make those properties work (bottom-left) and fix a bunch of small buggies.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3
    Nice! Looking good chief

    cheers,
    Paul

  4. #4
    Just did a little work on this one again. Manual editing (entering coordinates) of anchor positions and tangents is now possible. I will release the whole thing once I've made the export/import functionality work.

    I'm stuck with one problem though. I want to support "upvectors". These are vectors that show which direction is "up", if you were to travel along the spline. This vector will always be perpedicular to the spline, and can therefore be described by an angle (with respect to the Y axis, which conventionally points to the sky of the world). But how can I design an interface for editing this angle for each anchor?

    One thing I will do is let the user enter this angle manually. It would be good to have some WYSIWYG-way of editing this. However, I feel that this may become rather awkward if not done right. If I were to create a new handle for this, it would be constrained to rotate around the spline and have a fixed length. I'm not sure what to do here.

    I'll probably leave it out in the first version (or give some visual feedback at best). Still, any ideas about this are appreciated!
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5
    Ok, getting closer and closer... My program now produces this:

    Code:
    <?xml version="1.0"?>
    <Spline Closed="True">
      <Anchor ID="0">
        <Position x="-20,000" y="0,000" z="-20,000"/>
        <Tangent x="15,000" y="0,000" z="-15,000"/>
        <Upvector x="0,000" y="0,000" z="1,000"/>
      </Anchor>
      <Anchor ID="1">
        <Position x="30,000" y="-3,000" z="-25,000"/>
        <Tangent x="15,000" y="0,000" z="5,000"/>
        <Upvector x="0,000" y="0,000" z="1,000"/>
      </Anchor>
      etc....
    </Spline>
    Working with XML in Lazarus is suprisingly easy.

    Update: Almost done with this project. Loading/Saving splines is now possible. I only have to work out the "upvector" thingy and then I can release it.
    Last edited by chronozphere; 01-05-2011 at 04:25 PM.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  6. #6
    Looking good bro

    cheers,
    Paul

  7. #7
    Little update here.

    First of all, I've managed to make this work on Ubuntu. YEAH Lazarus rocks!

    I also made those upvectors work. They can only be manipulated by changing the edit boxes at the left (So no WYSIWYG because that was too hard). Finally, Each anchor has it's own string, that is exported to XML aswell, so you can add your own data there.

    It will be ready for release soon. Just needs some polish and a proper license.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •