Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Spline Editor

  1. #11
    Nice! Looking good chief

    cheers,
    Paul

  2. #12
    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.

  3. #13
    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.

  4. #14
    Looking good bro

    cheers,
    Paul

  5. #15
    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.

  6. #16
    I want to release this on Github, but I've been fighting with SSH, TortoiseGit and msysGit for over an hour and a I can't get them to play ball together nicely.

    Update: Finally managed to do it. If anyone is interested at the source, fetch it here:

    https://github.com/chronozphere/spline_editor

    And please don't be shy and give GIT a try yourself

    Hope my work will be of use to anyone else.
    Last edited by chronozphere; 30-05-2011 at 09:33 PM.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  7. #17
    Nice! Great job Nathan

    cheers,
    Paul

  8. #18
    Hey Nathan
    I was curious as to whether you have done any updates to this project lately?

    Ignoring any updates, I was just thinking that I could use it to create some spline objects for a game...so I might give it a whirl

    cheers,
    Paul
    Last edited by paul_nicholls; 07-11-2011 at 11:22 AM.

  9. #19
    Well, the source is still up there, so please go ahead and try if the program works for you. if you have any problems/questions, don't hesitate to ask me about them.

    This project was more or less finished, so no more updates. Anyone who needs this in the future can derive his/her own version, but please let me know about them.
    Last edited by chronozphere; 13-11-2011 at 08:28 PM.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  10. #20
    No worries Nathan
    I will give it a go...

    cheers,
    Paul

Page 2 of 2 FirstFirst 12

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
  •