Results 1 to 3 of 3

Thread: Help (easy) with assigning verticies to a bone

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2002
    Posts
    8

    Help (easy) with assigning verticies to a bone

    I'm trying to implement bone based animation for a model format I'm working on. Essentially I simply represent each bone by a Quaternion that I plan on multiplying by its assigned verticies. Problem is, I'm new to tools writing and I can't figure out any way to select verticies.

    Ideally, the artists on the project would like to be able to click and drag around the verticies they would like to assign a bone to and then assign it.

    I think I need to render to the Feedback buffer but I'm not entirely sure how to and can't seem to find any good tutorials on how this would be done. Can someone please help me?

    BTW, this is my first post here.

  2. #2
    Member Contributor
    Join Date
    Jun 2002
    Posts
    68

    Re: Help (easy) with assigning verticies to a bone

    Is this like a 3D-Editor? If I understand your question correctly...

    For 2D view windows (front, side, top), you can simply find the distance from the selection (cursor/mouse) point to the vertex. You will write a loop that goes through all visible (or selectable) vertices and only selects the vertex with the shortest distance.

    There are tricks you can use to speed up the above algorithm (as well as following).

    3D vertex selection can be done the same why as far as I know (AFAIK). You will have to know how the final vertices will be projected to the 2D screen so you can use your 2D selection (cursor/mouse) point.

    If you have a 3D selection (cursor/mouse) point then you can simply use the closest vertex by finding the distance between the 3D selection and 3D vertex point.

    "There is more then one way to skin a cat", the methods above are just the ways in which I would do them.

    I am not very experienced in OpenGL, so these may not be the ideal solutions.

    "If it looks right, it is right"

    *----- Appended -----*
    A good way to learn how to solve problems like this is to ask your self how "you" would do it. Draw a few points on a piece of paper and use your pencil as the cursor. How would you (or the artist) pick the desired vertex?

    [This message has been edited by hkyProgrammer88 (edited 08-23-2002).]

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2002
    Posts
    19

    Re: Help (easy) with assigning verticies to a bone

    Try opengl selection as described in the programming guide, or in the nehe tutor. Drawing little quads in selection mode for each vertex, then you can get info for each pixel on the screen witch quads are there.

    p.s: sorry for my poor english

Similar Threads

  1. Drawing verticies
    By DrHaximus in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 06-07-2013, 05:12 PM
  2. Drawing lines with a vector of verticies
    By slayton in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-14-2011, 06:57 AM
  3. Help: Selecting verticies using the line equation
    By Kev~ in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 07-03-2002, 04:08 AM
  4. Getting transformed verticies back
    By bgs in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-31-2001, 03:06 PM
  5. Rendering Problem: "swimming verticies" ?
    By JMaynard in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 06-13-2000, 04:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean