Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Story telling, animations

  1. #1
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Story telling, animations

    Hi,

    as kryton9 requested some more info on animations for the game, I have few ideas:

    Mike has a set of great profi tools ( Poser, ... ), if he has some time, they would be great for creating some story animations.

    In game animations would be also good, for simplier stuff like just ship entering hangar or something like that.
    For this kind of stuff TBGL animation functions could be used.

    I have prepaired very very simple demoscript on this topic.
    It is just silly UFO with animable cockpit part - please see in attached source.

    I will show you what's behind it...

    I have created the model of UFO in thinEdge. The main body part is stored in "UFO_Body" layer, cockpit glass in "UFO_Glass".

    To define bone for the glass part, you just have to load the model and do this:
    [code=thinBasic]


    tbgl_m15DefBoneLayer %MODEL_UFO, %BONE_FOR_GLASSPART, "UFO_Glass", 0.25, 0.38, 0


    [/code]

    I have used some equates to make parameters clear.
    So first parameter is model number, second is ID of the bone ( 1 to 32, may be improved in future releases of TBGL ).

    Third parameter is string, containing layer name you want to became bone-controlled.

    Last 3 numbers are "anchor", point around which the bone will rotate. I just decided for mentioned point, as I now this part could have joint at this coordinates.

    To animate the model, you must do following steps:
    [code=thinBasic]
    tbgl_m15resetBones %MODEL_UFO

    tbgl_m15RotBoneZ %MODEL_UFO, %BONE_FOR_GLASSPART, -45 + sin(gettickcount/1000)*45

    tbgl_m15ApplyBones %MODEL_UFO

    tbgl_m15DrawModel %MODEL_UFO
    [/code]
    First, you need to reset bone angles in model you want to animate.
    Then you set the rotation, in this case around Z axis. After that you just apply the bones and render the model.


    Hope you were able to follow me, if not please ask ,
    Petr



    Edit by MikeHart: The first code entry wasn't visible
    Attached Files Attached Files
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  2. #2

    Re: Story telling, animations

    I will see how I can get the layer part out of Blender. Thanks for the info.

  3. #3
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Story telling, animations

    Thanks for the example and explanation Petr, I will play with it and see if how we can use this more!!


    Mike, you are spoiling me rotten, now adding layer support. I like it when life is made easy with great tools!!!
    Thanks.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  4. #4

    Re: Story telling, animations

    It is important that the artistic freedom is not blocked by complicated workflows.

  5. #5
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Story telling, animations

    Nice phrase there Mike, thanks.

    Petr, I think it would be neat to have a similar command to the addbone command.
    But one where I could just add another m15 model.

    I was trying to assemble a multi m15 project tonight but no luck. I was going to make a cool demo with Mike's new tbdi commands.

    A very simple robot arm:

    Base this would just rotate around the y axis
    A1 the first arm part from base to elbow. This would rotate around z axis
    A2 this with would be forarm and thumb sort of. Would rotate around z too.
    A3 this was like the claw bottom it too would rotate around z axis.

    So something like tbgl_AddModelBone ParentModelID, ModelToAddID, ToBoneNumber, posX, posY, posZ

    Also it would be nice to have a translate command in addition to rotate command for boned models.
    Also a scale command.

    tbgl_boneTranslate ModelToTranslate, BoneNumberItIsOn, posX,posY,posZ (parentModelID could also be part of it to help keep it clear)
    tbgl_boneScale ModelToScale, BoneNumberItIsOn, scaleX,scaleY,scaleZ (parentModelID could also be part of it to help keep it clear)

    I will attach the very simple models I made. They might need to be scaled to each other, I sort of went from memory how the previous model was and hope they were close.

    Is there a way to load each m15 file into a separate layer in thinEdge?
    Attached Files Attached Files
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  6. #6

    Re: Story telling, animations

    Hi Kryton,Mike,Petr,

    I came across this and thought it may be of interest to look at:

    http://www.anim8or.com/main/index.html

    catventure
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  7. #7
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Story telling, animations

    Thanks CatVenture. It is a very nice program indeed.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  8. #8

    Re: Story telling, animations

    Quote Originally Posted by catventure
    Hi Kryton,Mike,Petr,

    I came across this and thought it may be of interest to look at:

    http://www.anim8or.com/main/index.html

    catventure
    Thanks, I head about it.

  9. #9
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Story telling, animations

    Hi all,

    I feel very bad for it, but I will have less access and possibilities to reply in next two days on this forum. Nothing terrible happens with me, I'm just terribly out of time

    catventure, anim8tor looks cool. I think I have tried it in the past, but now I will check it again and more carefully.

    kryton, thanks for the models. To achieve your goal, you can now use tbgl_Push/PopMatrix magic. As soon as I will have more time, I will post here sample - it is quite easy, you will see

    I'm considering your suggestions for TBGL, just need to think carefully about it.

    I am really sorry my "TBGL support" is terribly lacking in this days, hope it will get better soon ( I know it !)


    Thanks,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  10. #10
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Story telling, animations

    Petr, no worries, just posting ideas or questions as they come. School is first as is family. Never feel bad about that time shortage for those things. Get to it when you can. Thanks and good luck with school!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

Page 1 of 2 12 LastLast

Similar Threads

  1. Animations in TopDown
    By Petr Schreiber in forum Game general
    Replies: 9
    Last Post: 18-03-2007, 21:42

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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