3D animation using Blender+GIMP

Discussion in 'Track Modding' started by svictor, Feb 19, 2024.

  1. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    936
    Likes Received:
    6,375
    This is a prove of concept for creating some real 3D animation without using commercial software, which could help expand possibility for creating RF2 contents using only free & open source software.

    The main idea is to use a sequence of 3D models of an object in combination with sequenced texture animation, which shows only one frame of the real 3D models at a time.

    The example here is a simple seagull model I made for Dundrod 1955.

    The seagull's wings are made into multiple copies of 3D models, each model represent a frame of the object animation. And then each model's UV is mapped at specific coordinates which reveals one of the wing models only at specific texture frame.

    In this example, there are 12 frames, which results 12 wing models(as frames), and the corresponding texture is split into 4x4 grids. 4x3 rows are used for paint wings. Each wing frame will take one grid of the texture, and is saved to one of the texture sequence while other frames are set invisible.

    Final model & single wing UV map:
    [​IMG]

    Final UV map & texture of all wings objects in GIMP:
    [​IMG]

    Final exported texture sequence:
    [​IMG]

    And material(JSON) setting for wings:
    "FrameCount" is the number of available texture sequence, which is 12 in this case.
    "Rate" is playing speed, high number faster.
    "Sequence" is playing order and sequence, the number is each texture's last digits, and can be repeated.
    "Texture" is the texture file name without last digits.
    (alternatively, 3dsimed can be used to setup animation frames in GMT file.)

    Example of animation code in JSON file:
    Code:
      "textures":[
        {
          "AnisoLevel":0,
          "ChromaColor":0,
          "Flags":[
            "CUBETF_AUTOMIPMAP",
            "CUBETF_TRILINEAR",
            "CUBETF_CHROMAKEY",
            "CUBETF_OWNEDBYMATERIAL",
            "CUBETF_NOZBUFFERREQUIRED"
          ],
          "FrameCount":12,
          "Method":"CUBETAM_CYCLE",
          "MipBias":0,
          "MipLevels":1,
          "Name":"albedoMap",
          "Rate":15,
          "Sequence":[
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
           10,
           11,
          ],
          "ShaderPass":0,
          "ShadowMipBias":0,
          "SkipFrame0":false,
          "StageType":"CUBETST_SRGB",
          "TexChannel":0,
          "Texture":"seagull",
          "hasDefault":true,
          "inactive":false,
          "runtime":false
        }
      ]
    
    Full JSON sample code:
    For details about how to add or edit JSON animation, see guide:
    https://forum.studio-397.com/index....-opensource-free-software.70938/#post-1085292

    How animation plays in Dundrod 1955 (with additional pivot point rotation animation):
    [​IMG]

    Finally, if there are a pack of seagulls, the above material can be duplicated with different "Rate" or "Sequence" setting for different seagulls to generate more randomness and dynamic animation, which also makes this method more flexible.

    A working GMT+DDS+JSON example files can be found in attached ZIP file, and additional info is included in readme file inside ZIP.
     

    Attached Files:

    Last edited: Feb 19, 2024
    Gilles Benoit, FuNK!, Emery and 12 others like this.
  2. pascom

    pascom Registered

    Joined:
    Feb 5, 2013
    Messages:
    504
    Likes Received:
    438
    Excellent!
     
  3. Brutten

    Brutten Registered

    Joined:
    Jun 21, 2017
    Messages:
    362
    Likes Received:
    365
    Great job. Good work @svictor .

    I've been trying to learn how to make basic animations with Blender for some time with null results since my lack of English limits my access to information.

    I don't aspire to more than moving an object on a path (basically moving vehicles around the scenery or exteriors).

    If you could give me some guidance on where to find a guide and the plugins that may be needed it would save me months of searching.
     
  4. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    936
    Likes Received:
    6,375
    Hi @Brutten , thanks for the interests.

    This animation example that using blender & GIMP does not require extra plugin. All it needs are 3D models & sequenced textures, and a proper material setup with texture animation setting.

    Here I've prepared a working GMT+DDS+JSON example files, which you can just add it into existing track SCN to test and see how it works. I also included Blender & texture source files. See the attached ZIP file from first post (and readme.txt included with instruction).

    Good luck!
     
    Gilles Benoit and Corti like this.
  5. Brutten

    Brutten Registered

    Joined:
    Jun 21, 2017
    Messages:
    362
    Likes Received:
    365
    I have seen your model and it is well done, but they are animations of textures and an object rotating around an axis.

    What I am looking for is, if it is possible, to export animations of the 3d object for rFactor (ANM file).

    I don't think it can be done outside 3DMax as I can't find information for Blender.

    If I remember correctly in the Donbass karting circuit (workshop) there are some vehicles driving on an outside road.
     
  6. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    936
    Likes Received:
    6,375
    hi, you are correct the ANM creation or exporting was never possible outside 3dsmax unfortunately. And after all those years that people asking for free alternative, there was no sign of any free plugin to support it, hence I decided to try animate 3D using other methods.

    The method described in this thread is not only an animated texture, but it also animates real 3d model through the use of sequenced texture alpha channel to hide/reveal 3d model(wings) at specific frame. It has some limitations, and not supporting advanced animation such as driver steering, but at the moment it's the only way to do RF2 3D animation outside of 3dsmax.
     
    Gilles Benoit likes this.
  7. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,876
    ... and it was used in rF1 already, for Example to "animate" Gear Stick Movements.
     
  8. Brutten

    Brutten Registered

    Joined:
    Jun 21, 2017
    Messages:
    362
    Likes Received:
    365
    Thanks to both of you.

    I am familiar with this method and have used it on a few tracks. The way you have done it looks very good, which shows that with few tools and creativity you can achieve interesting results.

    I like to set the tracks to have dynamic elements and customize the sound environments, it increases realism and immersion. That's why I was trying what seems not to be possible.
     
  9. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    936
    Likes Received:
    6,375
    Thanks, I feel the same, it's nice to have extra random 3d animation elements to make track (or car) more interesting to explore. And still hoping that one day there will be a free alternative tool/plugin to create real ANM file animation, which would benefit many.
     
    memoNo1 likes this.
  10. Brutten

    Brutten Registered

    Joined:
    Jun 21, 2017
    Messages:
    362
    Likes Received:
    365
    svictor, atomed and DJCruicky like this.

Share This Page