Skip to content
Ferdinand Calo edited this page Jun 20, 2021 · 11 revisions
# Feature Overview
Kind: Model
Extendable: true
JSON based: depends
JSON config: no

Models are an essential part of FVTM, without them, how would there
be vehicles? Generally as of writing this, these model base classes exists:

  • VehicleModel - for Vehicles (example subclass in FVP)
  • PartModel - for Parts (example subclass in FVP)
  • ContainerModel - for Containers (example subclass in HCP)
  • RoadSignModel - for Road Signs (example subclass in FVTM)
  • BlockModel - for Blocks

All of them base on the same super class, so they share a lot in common.


FVTM Currently supports a few models formats, although only the main one is
confirmed to be fully working and tested. Here a list of all though:

  • FVTM v.3 Scheme - a TurboList and latest FCL-TMT based up-to-date format.
    • can be modelled and exported from FMT
    • models can be made in SMP Modelling Toolbox 2 too, afterwards quickly
      imported into FMT and exported to FVTM format
      • models can be also manually converted from flans/smp format into fvtm if
        desired so, details on how to - on request (e.g. discord)
    • this format requires a model to be compiled, since it's java
  • JTMT v.2 - a custom json format that can be parsed into the FVTM one
    • can be modelled and exported from FMT
    • models can be made in SMP Modelling Toolbox 2 too, afterwards quickly
      imported into FMT and exported to JTMT format
    • this format does NOT require a model to be compiled, it is a JSON
  • Wavefront OBJ - supported, extended support since 3.4.42
    • can be created in various applications
    • models are in a text format, does not need compiling
  • Vanilla MC JSONs - support is considered, not added yet
    • can be created in applications for modelling MC models
    • needs not compiling, it's a JSON

Are you familiar with the Flansmod format? Here some differeces and things in common:

  • ModelRendererTurbo[] and TurboList
    • ModelRendererTurbo (Flans TMT) arrays are replaced into FVTM TurboList(s)
    • While the Flans MRT arrays been predefined, and if you used a specific "group" it
      caused specific animations, in FVTM you can have "unlimited" TurboList(s), also
      you can "append" TurboList Programs to them, custom code snippets adding
      animations or other fancy things (glow, transparency, rotation, translation, other)
  • Latest (FCL branch) TMT
    • Contains functional Cylinders, and a new addition by FEX___96 - hollow cylinders
      and recently updated to have optional radial textures (note: cylinders are not
      supported in SMP Toolbox, only in FMT so far)
    • Most methods return the MRT object itself instead of being void
      • instead of
      ModelRendererTurbo[] group = new ModelRendererTurbo[23]
      group[0] = new ModelRendererTurbo(this, 0, 0, 0, 0);
      group[0].addBox(0, 0, 0, 0, 0, 0);
      group[0].rotateAngleX = 1.5f;
      ...
      you can do
      TurboList group = new TurboList("group_name");
      group.add(new ModelRendererTurbo(this, 0, 0, 0, 0).addBox(0, 0, 0, 0, 0, 0).setRotationAngle(90, 12, 60));
      group.add(new ModelRendererTurbo(this, 0, 0, 0, 0).addBox(12, 23, 34, 3, 2, 4).setRotationAngle(10, 20, 0));
      ...
      this.groups.add(group);
    • Oh! And Degrees! Rotation fields are now degrees instead of radians,
      for sanity during manual edits.

Other than that, it's still TMT models with all it's profits.


Defining a Model in a Config

If you landed on this wiki page from either one of the
Vehicle, Part, Container, RoadSign or other page,
You'll want to know how to link your model into your ... data thing.
Some options are:

  • Class Adress - you can in the config put a class adress, FVTM will try to load it
    example: net.fexcraft.mod.addon.fvp.models.vehicles.SentinelModel.class,
    note: make sure to append .class, else the parser will think it's something else
  • FCL Model Registry - once you export a Model via FMT and the FVTM exporter
    you may notice the @fModel() annotation before the class declaration,
    thanks to this field, once FCL starts and finds this model it will cache it,
    and FVTM can grab the model out of FCL registry by the adress you specify in
    the @fModel field, example: fvp:models/vehicle/c9 (put the same to config!);
    note: you can name the adress however you want,
    but please follow the pattern <packid>:models/<custom>!
  • ResourceLocation - if you're using an OBJ, JSON or JTMT model use a
    a resourcelocation/path the same way you'd use in a vanilla model,
    make sure the adress has .jtmt at end if using JTMT(!)
    and that is has .obj at end if using Wavefront OBJ!
    example: fvp:models/part/ot1st.jtmt