Profile image

OBJModelPart

120k PlanariaLab  8 months ago

Downloads

565 downloads
Version 1.3 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.
  • 1.3 : bugFix

  • Log in to leave a comment
  • Profile image
    60.8k 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 7 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 8 months ago
  • Profile image
    7,338 Roswell

    Very useful.

    7 days ago
  • Profile image
    4,993 MiguangBUS

    @PlanariaLab Thank you

    11 days ago
  • Profile image

    @MiguangBUS
    I haven't the energy and time to edit videos, so please forgive me for explaining in writing instead.
    .
    Please try the following:
    1. Ensure the file path is a full path (on Windows, paths starting with “C:” or “D:”, etc. Regarding Mac... I'm sorry, I've never used one, so I don't know.)
    Unity recommends using “/” instead of “\” as the path separator.
    Also, please include the file extension along with the filename in the path.
    X C:\folder\File
    〇 C:/folder/File.obj
    .
    2.Please try change the meshScale property in the parts.
    A unit system mismatch may have occurred between the model file and the SP, causing the model to appear extremely small or large.
    Specifically, try values like scale 0.01 or 1000.
    .
    3.Is the input value greater than 0?
    The model will only be drawn if the input value > 0; otherwise, it will be hidden.
    .
    4.Can that obj file be opened in other software?

    11 days ago
  • Profile image
    4,993 MiguangBUS

    @PlanariaLab I want to know specifically what the OBJ file I downloaded has not changed after entering the folder address of the file in the game. I would like to ask you to send a video to teach the tutorial in detail.

    11 days ago
  • Profile image

    @MiguangBUS
    What specifically would you like to know?

    11 days ago
  • Profile image
    4,993 MiguangBUS

    How can help me use the MOD?

    11 days ago
  • Profile image
    4,993 MiguangBUS

    A

    19 days ago
  • Profile image
    565 VTPADELTA

    :3

    one month ago
  • Profile image
    4,993 MiguangBUS

    E

    2 months ago
  • Profile image

    @PlanariaLab sweet! I got plans for this one!

    5 months ago
  • Profile image

    @StockPlanesRemastered
    Mod part act as a single part.

    5 months 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?

    5 months 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.

    5 months 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 6 months ago
  • Profile image

    amazing that is

    6 months 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 7 months ago
  • Profile image
    32.0k 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...

    7 months ago
  • Profile image
    59.0k PUMPKINSIDD

    @PlanariaLab I'll See later, thanks btw

    7 months ago
  • Profile image

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

    7 months ago
  • Profile image
    59.0k PUMPKINSIDD

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

    7 months ago
  • Profile image
    60.8k 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.

    7 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.

    7 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

    7 months ago
  • Log in to see more comments