Home Gallery Resources The Team Rules chat Login Register
Pages:  [1] 2 3 4 ... 6
Author Topic: Brawlbox Modset 4.1 is here! Draggable bones, among other things  (Read 42902 times)
0 Members and 1 Guest are viewing this topic.
??_?
Attention. I have your Attention.
Holy Kitten
*
Offline Offline

Posts: 1618


PM me or something

  • Awards KCMM Old Timer Super Saiyan Topic Sniper Pin Collector

  • View Profile Awards
    « on: November 13, 2010, 09:52:21 AM »


    download brawlbox modset 4.1 (Fixed Bugs)
    Rydia's tutorial

    Quote from: bero
    Change Log of Modset4.1

        * Added a button "Paste only Trans" to Animation editor
        * PAT0 editing function(test)
        * Drag-And-Drop Animating(THANKS,KRYAL!)


    Draggable Bones:
    Quote from: Kryal;11604757
    Okay, it's done (for the most part)
    Lots of changes yes, but our focus is on:

    Maths / Matrix / Vector3
    GLPanel / GLContext / ModelEditControl

    All the work takes place in ModelEditControl:

    Take note of the PostRender event, which renders the rotation orb when a bone node is selected.
    • At the very end of PostRender, ghost nodes are drawn into the z-buffer for every bone. The z-buffer is cleared prior.
    • New display list objects are employed through GLContext.GetSphereList / GetRingList / GetCircleList. These all contain primitives with a radius of 1. Rendering to the desired radius is simply a matter of calling glScale with the desired radius.

    Take note of the MouseDown event, which handles bone node targeting.
    • First, the currently-selected bone is tested against the mouse point.
    • Take note of how the 'radius' variable is calculated, scaling the orbRadius constant to the camera distance.
    • The GLPanel.ProjectCameraSphere method is called for the current bone. This either intersects the bone sphere or its camera-facing plane using a ray from the mouse point.
    • This point's distance is then compared to the bone node, and tested against the radius and the orbit ring.
    • If the point falls within radius: convert the point to local-space, get its angles, and test for axis snapping.
    • If the point falls within the orbit ring, enable orbit snapping.
    • If the point falls within neither, transfer to hit-detection. (We will try selecting a new node)
    • After snapping flags have been set, call GetOrbPoint. This retrieves the world-point that intersects our snapping plane, using a ray from the mouse point. Take note of how the normals for the planes are calculated. The point is then clamped to a distance of 'radius' from the node center.
    • Convert this point to local-space and store it. This will be our origin point.
    • Store the bone's old rotation values. These will be used for escape-key cancelling.

    Part 2: If no bone is selected use hit-detection
    • Get depth of mouse point. If < 1 we found something.
    • UnProject the point to world coordinates.
    • Compare all bones to this point, finding one whose distance matches the node radius. (Not the rotation orb)

    The MouseMove event is where the rotations are updated:
    • Call GetOrbPoint to retrieve the snapped world-point.
    • Convert the point to local-space. We will compare this to our origin point.
    • Create a matrix by multiplying the bone's transformation to an Axis/Angle matrix.
    • The Axis/Angle matrix is created by Matrix.AxisAngleMatrix, just supply the origin point and the new point.
    • With this new matrix, derive the resulting angles by calling GetAngles.
    • Subtract the bone's frame angles from the resulting angles to get the difference. Notice how GetAngles is used twice.
    • Truncate the difference by wrapping the degrees from >180 and <-180. This allows the angles to continually increase/decrease.
    • Apply the new angles by adding the difference to the bone's frame state. (I let the anim panel handle this so that keyframes are created)

    Some things to watch out for:

    Bone scaling may affect how these points are converted to local-space.
    I ditched the Quaternion method because conversion is a nightmare. However, converting a matrix to euler angles can be problematic. You may notice that the rotations look fine, but the angles are odd. This particularly happens to the y-angle.

    http://www.smashboards.com/showthread.php?t=277835&&page=25

     Happy Face
    « Last Edit: November 21, 2010, 04:46:26 PM by LordNOaH » Logged


    hughie
    Special Access
    *****
    Offline Offline

    Posts: 2983


  • Awards Renowned Hacker Hot Topic >9000 Concerned Elector

  • View Profile Awards
    « Reply #1 on: November 13, 2010, 10:06:49 AM »


    I never knew much about this, but will it make bone editing simpler?
    Logged

    ??_?
    Attention. I have your Attention.
    Holy Kitten
    *
    Offline Offline

    Posts: 1618


    PM me or something

  • Awards KCMM Old Timer Super Saiyan Topic Sniper Pin Collector

  • View Profile Awards
    « Reply #2 on: November 13, 2010, 10:10:34 AM »


    I never knew much about this, but will it make bone editing simpler?
    yes, any type of animation editing, model imports, etc will be much less tedious and far easier.
    Logged


    Soverign
    Mega Kitten
    *****
    Offline Offline

    Posts: 118

    So much win


    View Profile Awards
    « Reply #3 on: November 13, 2010, 10:19:27 AM »


    I never knew much about this, but will it make bone editing simpler?
    yes, any type of animation editing, model imports, etc will be much less tedious and far easier.
    AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!
    « Last Edit: November 13, 2010, 10:24:38 AM by Soverign » Logged

    VanillaPuff
    Mega Kitten
    *****
    Offline Offline

    Posts: 103



    View Profile Awards
    « Reply #4 on: November 13, 2010, 10:39:26 AM »


    I never knew much about this, but will it make bone editing simpler?
    yes, any type of animation editing, model imports, etc will be much less tedious and far easier.
    AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!  AWESOME 2.0!
    THis...is win...I can't wait!
     Awesome Face Awesome Face Awesome Face Awesome Face AWESOME 2.0! AWESOME 2.0! AWESOME 2.0! AWESOME 2.0! Happy Face Happy Face Happy Face Happy Face
    Ok enough smiles.
    I haven't read anything but animating is easier and i'll read it soon though. But will rotation with the numbers still be viable? I know theres a preview release...hmm....someone should make a video o.o

    Draggable bones! YESZ 
    Logged

    BlackJax96
    Brawl Mod God
    Boss Kitten
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #5 on: November 13, 2010, 11:19:28 AM »


    Draggable bones is so much win!!! But there's no undo button Sad
    Logged

    Hollow
    Kitty Corp's Personal Hollow
    Heroic Kitten
    **
    Offline Offline

    Posts: 2525


  • Awards Super Saiyan Topic Heart Container KCMM Veteran Pin Collector

  • View Profile Awards
    « Reply #6 on: November 13, 2010, 11:29:21 AM »


    When is it going to be relased?
    Logged

    Eternal Yoshi
    Heroic Kitten
    **
    Offline Offline

    Posts: 2425


    Boss? Is that you?

  • Awards KCMM Old Timer Super Saiyan Topic Active Contributor Former PMDT

  • View Profile Awards
    « Reply #7 on: November 13, 2010, 11:36:31 AM »


    Random advice time.

    If you are using the newest modset and you find the angle value to be really odd(as in too far away from 0), You can fix it. Look at the value and if it's more than 360 or -360 Add or subtract 360 as long as it will get you closer to zero and fix transitions..... unless the previous keyframe has a ridiculously high value.

    For example: If I get -400, I add 360 and will end up with -40. The bone's rotation won't appear to be changed, and the transition is much smoother.
    Logged


    ??_?
    Attention. I have your Attention.
    Holy Kitten
    *
    Offline Offline

    Posts: 1618


    PM me or something

  • Awards KCMM Old Timer Super Saiyan Topic Sniper Pin Collector

  • View Profile Awards
    « Reply #8 on: November 13, 2010, 11:49:24 AM »


    yeah, there are still bugs (Especially rotation I've noticed) and I'm not sure when the official release will come.
    Logged


    hughie
    Special Access
    *****
    Offline Offline

    Posts: 2983


  • Awards Renowned Hacker Hot Topic >9000 Concerned Elector

  • View Profile Awards
    « Reply #9 on: November 13, 2010, 11:51:14 AM »


    I never knew much about this, but will it make bone editing simpler?
    yes, any type of animation editing, model imports, etc will be much less tedious and far easier.
    Prepare for higher quality bone edits. >:D
    Logged

    Akiba Red
    Lol Kitten
    *********
    Offline Offline

    Posts: 825


    AOI CHAN

  • Awards Heart Container

  • View Profile Awards
    « Reply #10 on: November 13, 2010, 12:43:24 PM »


    Yay! Imports from other games, prepare to flood Brawl. >Cheesy
    Logged


    ??_?
    Attention. I have your Attention.
    Holy Kitten
    *
    Offline Offline

    Posts: 1618


    PM me or something

  • Awards KCMM Old Timer Super Saiyan Topic Sniper Pin Collector

  • View Profile Awards
    « Reply #11 on: November 13, 2010, 01:44:43 PM »


    WELL, I played around with it for a few minutes. click a line wrapped around the circumference the sphere to change its rotation; Red=X axis, Green=Y axis, and blue= Z axis. you can also simply click the sphere and control all three at once, but I found this difficult to control. I have no idea what the yellow circle around the sphere is for, it also changes all rotation values, but its limited and also hard to control.

    I assumed that this would also be able to control the translation values, but it appears that it doesn't. I'm a little disappointed at this, as this is what I was excited for. It would make more sense if when the bone was selected, it could be dragged along the x and y axises, and perhaps a button held such as ctrl or shift would allow the z axis to be changed. and maybe another toggle button to change from rotation to translation.

    I might play around with this myself to add this, but my C# is rotten.
    Logged


    VanillaPuff
    Mega Kitten
    *****
    Offline Offline

    Posts: 103



    View Profile Awards
    « Reply #12 on: November 13, 2010, 03:08:37 PM »


    So I got around to testing this and it was pretty cool Cheesy. But totally confusing Sad

    I've never actually figured out which axis is which in the 0.63v version of animating. Very interesting. Can't wait for an official release.

    Yay! Imports from other games, prepare to flood Brawl. >Cheesy

    ^This^

    EDIT:When previewing imported models from other games, only the first bone will show up and the models is unmovable Sad 
    « Last Edit: November 13, 2010, 03:17:56 PM by VanillaPuff » Logged

    BlackJax96
    Brawl Mod God
    Boss Kitten
    ****
    Offline Offline

    Posts: 4612


  • Awards KCMM Veteran Sniper King for a Day Featured

  • View Profile Awards
    « Reply #13 on: November 13, 2010, 03:19:42 PM »


    The model import I'm working on shows all the bones... and this update reminds me a lot of 3ds max :O

    I think the problem with imports is added bones. Open a model without any bones added and it should work
    « Last Edit: November 13, 2010, 03:25:10 PM by BlackJax96 » Logged

    Eternal Yoshi
    Heroic Kitten
    **
    Offline Offline

    Posts: 2425


    Boss? Is that you?

  • Awards KCMM Old Timer Super Saiyan Topic Active Contributor Former PMDT

  • View Profile Awards
    « Reply #14 on: November 13, 2010, 03:26:25 PM »


    Yup. Also BACK UP YOUR MOTION ETC AND YOUR ANIMATION.

    If you knew what happened to me and Lyn, you would know why.

    THankfully, I managed to recover the animation.
    Logged


    Pages:  [1] 2 3 4 ... 6
    Print
    Jump to: