Profile image

OBJModelPart

118k PlanariaLab  2 months ago

Downloads

327 downloads
Version 1.2 Part

Mod to add parts that read and display models in OBJ format from local files.
Created to bring custom meshes parts into the game with less effort than creating a dedicated parts mod.
gif

update ver1.2

You can now display the model without having to rely on external files, by opening the obj and mtl files in a text editor and copying and pasting the text inside into the fields for entering the path to each file.
sample build
(Models to be embedded in xml cannot contain textures.)
(Note: Files are not encrypted.)
(The model text is very large. Therefore, the part property, can cause a great deal of delay. To avoid delays, we recommend using the following tools when importing. toolLink)

PartSettings
  • OBJPath : Specifies the path to the OBJ file.(model data)
  • MTLPath : Specifies the path to the MTL file.(material data associated with the OBJ)
    (If not entered, it will follow the setting on the obj file side.)
  • Scale : Adjust the display size of the model.
  • Offset : Adjust the position of the model.
  • Collider : If true, the mesh is given a convex mesh collider.
  • ColliderPath : Overwrite the collider shape with another OBJ file.
    (If not entered, the shape of the collider is based on the model used for the display)
  • Input : If value <= 0, the model is hidden.
Supported MTL Tags
  • Kd : MainColor
  • Ka : EmissionColor(The original specification is ambient light, but in this mod it has been changed to emission due the shaders.)
  • Ks : Metallic(The original specification is Specular color, but in this mod it has been changed to metallic due the shaders.Only read the R channel of the RGB.)
  • Ns : Smothness(For this parameter only, specify a value in the range 0~1000.)
  • d : Opacity. For transparent materials, be sure to add this item. (1: opaque, 0: completely transparent)
  • map_Kd : main texture name
  • map_Ka : emission map name
  • map_Bump : Normal map name

It is not recommended to publish builds using this mod.
When publishing a build using this mod, please be sure to use models created by yourself or carefully check the terms of use of the model you are using before using it.
I am not responsible for any problems that may occur using this mod.

translation:DeepL

Update Log

  • 1.11 : Added collider-related items
  • 1.12 : Fixed a bug that caused meshes to flip left and right.
  • 1.13 : Fixed uv bug. Removed the specification that the texture automatically becomes a transparent material when it contains an alpha channel.
  • 1.2 : Support for direct input of obj codes.

  • Log in to leave a comment
  • Profile image
    55.0k MVC

    I think the best solution would be to create a folder on the C drive for all users and name it SPobj.

    thus, we will simplify our life if all the models are stored in one place, but they will be sorted something like

    C:/SPobj/author name/craft name
    C:/SPobj/MVC/BMwm5f90

    Pinned 2 months ago
  • Profile image

    @PlanariaLab We've updated our policy since that earlier comment. Players are no longer restricted to fuselage and block parts and are now allowed to use exported crafts from SimplePlanes in both personal and commercial projects under the following conditions:

    • Permission from Creators: If you plan to use community-created models, you must obtain explicit permission from the original creators who uploaded the airplanes, weapons, or other vehicles.
    • Proper Attribution: Please ensure that credit is given to both the original model creators and SimplePlanes within your project, such as in the credits section of your game.
    • Commercial Limitations: The exported models cannot be sold individually or distributed outside the context of your project.
      We appreciate your interest and dedication to the SimplePlanes community. If you have any more questions, feel free to reach out.

    Also, nice job with this mod!

    Pinned 2 months ago
  • Profile image

    @PlanariaLab sweet! I got plans for this one!

    9 days ago
  • Profile image

    @StockPlanesRemastered
    Mod part act as a single part.

    9 days ago
  • Profile image

    could i potentially us this to turn a whole build into one part by exporting the build to obj like i want to 3d print it, but then reinporting the obj as a part with this mod? and then would it act as one part, or as if i added 200+ extra parts in the build?

    9 days ago
  • Profile image

    @AndrewGarrison Speaking of witch, has Jundroo considered selling 3D printed models of the stock vehicles in game either as "diecast" (I guess that's not the right word here, dieprinted perhaps?) or as buildable models? I know of at least one person who would pay up for that.

    9 days ago
  • Profile image

    @TunderTunder
    Added the ability to embed obj and mtl (except textures) in xml.
    It seems to be working generally well, but there seems to be a very long delay when opening the part properties. (This is happening because we are dealing with long text, the same as with text label images.)

    +1 15 days ago
  • Profile image

    amazing that is

    one month ago
  • Profile image

    @TunderTunder
    It is technically possible since obj's internals are text data, but it would require modifying the library used for import, which would be tedious.
    Also, the main reason I created this mod is to handle textured model data, but it is difficult to convert image files, which vary in number, size and format from model to model, into text to fit in xml....

    +1 one month ago
  • Profile image
    31.5k TunderTunder

    What if we stored mesh data in to part xml, like label or cockpit? Of course i would make mesh much bigger, but that the price for it...

    one month ago
  • Profile image
    50.3k PUMPKINSIDD

    @PlanariaLab I'll See later, thanks btw

    one month ago
  • Profile image

    @PUMPKINSIDD
    Enter the absolute path of the obj file on the device in the "OBJPath" of the part setting.

    one month ago
  • Profile image
    50.3k PUMPKINSIDD

    am i being stupid or, how do i import the Model to the Game?, the GIF is too blurry i cant see

    one month ago
  • Profile image
    55.0k MVC

    @PlanariaLab It's sad to hear that, but please, my way sounds logical, but it can also be considered. The disadvantage is that the root disk will fill up, although this is not very critical, it all depends on the number of models that we will use.

    although my practice has shown that obj format files that contain only a mesh do not take up much space.

    2 months ago
  • Profile image

    @MVC
    Perhaps your method is the simplest at this time.
    As a solution on the mod side, I'm considering adding an option to ModSettings to specify an arbitrary folder, so that the model can be handled by a path relative to it.
    The only problem I have not been able to do this is that ModSettings is broken in the latest version of SP and cannot save the settings.

    2 months ago
  • Profile image

    @AndrewGarrison Have you considered adding 3d printed models of the stock planes to the merch store? I know of at least one person who would buy them

    2 months ago
  • Profile image

    @PlanariaLab ah, ok

    2 months ago
  • Profile image

    @RobertsAeronautics
    Yes.
    However, this mod works in conjunction with files on the device, so it takes a bit of work if you want to share builds.

    2 months ago
  • Profile image

    So does this make it easier to add Blender-made parts to SimplePlanes?

    +1 2 months ago
  • Profile image

    This is a dream come true Awesome!!

    +1 2 months ago
  • Profile image
    50.3k PUMPKINSIDD

    what a game changer, Very amazing, Marvelous even

    +1 2 months ago
  • Profile image
    1,754 MolotokSP

    a mod so diabolically cracked that the gabe newell of the simpleplanes world responded

    +1 2 months ago
  • Profile image
    55.0k MVC

    @PlanariaLab amazing

    2 months ago
  • Profile image

    @RestlessGalaxies Thanks for the kind words! SimplePlanes and Juno: New Origins are free for educators.

    +4 2 months ago
  • Profile image

    @AndrewGarrison you know, Funnily enough, those updates in the policy make the "game" a legit and viable option to actually start learning some basic 3D modelling before moving on to a CAD and/or blender.

    I really do wonder if Simpleplanes can be genuinely developed intl an education software that universities can actually integrate into the syllabus. Might be something the dev team could and should consider, I personally would love to teach children the basics of aerodynamics with Simpleplanes being a part of the actual syllabus instead of some game on the side with vague connection to the subject of Aero...

    +3 2 months ago
  • Log in to see more comments