Garry's Mod

Garry's Mod

25 ratings
.OBJ 3D MODEL LOADER
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Gamemode
Addon Tags: Build, Scenic, Realism
File Size
Posted
Updated
108.082 MB
30 May, 2024 @ 1:56pm
5 Jun, 2024 @ 12:38pm
2 Change Notes ( view )

Subscribe to download
.OBJ 3D MODEL LOADER

Description
██▄.......█▀▀▀.........█.........███▄........█▄........▄▀█....█▀▀▀
█....█.....█▄▄▄.......█...█......█......█.......█...▀▄▀.....█....█▄▄▄
█▀▄.......█............█▄▄▄█....█......█.......█................█....█
█.....▀▄..█▄▄▄..█............█..███▀........█................█...█▄▄▄


64 BIT BRANCH GMOD TO RUN ANY INFINITE MAP
OTHERWISE EXPECT ENGINE ERROR/CRASH

REQUIRES Infmap Base by Meetric


.OBJ 3D MODEL LOADER v1.5

Now you can make your own infmap easily by callibrating the models position in real time!

Step-by-step guide on how to make an Infinite Map


v1.5 Features:
-Load any .obj 3D model in-game
-Rotate, move and scale model in real time
-GUI with limited rotation and collision/nocollision/collision_only (alpha/nocull) spawning
-Includes tutorial on how to load with materials
-Includes tutorial on how to further edit the angles/translation/scale settings

INSTRUCTIONS

1.Drag/drop your .OBJ and .MTL files into: "%steamdir%/steamapps/common/GarrysMod/garrysmod/maps"
2.Rename both files as: model_template (You should get: model_template.obj & model_template.mtl)
3.Start Garry's Mod and switch to the OBJ LOADER gamemode.
4.Start the map: "gm_infmap_obj_model_loader" found under the OBJ MODEL LOADER tab in maps.
5.You will spawn in an empty infmap. Use /help for a list of commands.
6.For the MATERIALS: Create a folder in: "%steamdir%/steamapps/common/GarrysMod/garrysmod/materials" named: infmap
7.Place them there (they must be in .png format)






====================================================================================================================
-OBJ model loadmodel by Alexandrovich v1.5-

Place any .OBJ + .MTL files in garrysmod/maps and rename them as:
model_template.obj - model_template.mtl

====================================================================================================================
/help - Prints all commands to console
/loadmodel_gui - Opens GUI model loadmodel
/loadmodel_advanced - Prints tutorial on how to further edit the angles/translation/scale settings to console
/loadmodel_materials - Prints tutorial on how to load the model with materials to console
====================================================================================================================
--ADVANCED MODEL LOADING--

-ANGLES ONLY-
Input as desired by changing from the following options

/loadmodel_..COLLISION/NOCOLLISION/COLLISION_ONLY....ANGLES 10 at a time -180 to 180.._..ALPHATEST/NOCULL..


Example: /loadmodel_nocollision-90_alphatest
Example: /loadmodel_collision130_nocull


-ANGLES+Z_TRANSLATION-
Input as desired by changing from the following options

/loadmodel_..COLLISION/NOCOLLISION/COLLISION_ONLY....ANGLES 10 at a time -180 to 180.._..ALPHATEST/NOCULL.._move_z_..1000 at a time 1000 to 20000..


Example: /loadmodel_nocollision-40_alphatest_move_z_-5000
Example: /loadmodel_collision170_nocull_move_z_9000


-SCALING-
Input as desired by changing from the following options

(Spawns without collision
/loadmodel_scale..NUMBERS: 0.5,1,2,3,4,5,10 or 20.._..ALPHA/NOCULL..


Example: /loadmodel_scale0.5_alpha
Example: /loadmodel_scale5_nocull


====================================================================================================================

By Alexandrovich 2024
https://steamhost.cn/steamcommunity_com/id/alexandrovich_mods/

Infinite Map Base by Meetric
https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2905327911

====================================================================================================================








For advanced rotation/position/scaling:

1.Create a file named: loadobject.lua in:
%steamdir%/steamapps/common/GarrysMod/garrysmod/lua/infmap/gm_infmap_obj_model_loader
2.Paste the following text inside:

InfMap.clear_parsed_objects()
local mat = Matrix()
mat:SetTranslation(Vector (0, 0, 0))
mat:SetAngles(Angle(0, 0, 0))
mat:SetScale(Vector(1, 1, 1) * 39.3701)
InfMap.parse_obj("model_template", mat, 3, "nocull")


(See Meetric's original guide on how to deal with this values here)[github.com]


3.Edit as you wish.
4.To add more than once model simply,
copy and paste the text as many times as you want changing "model_template" name as needed.

More features may come in the future such as scaling, and more precision.

To do:

-Add direct input for precision
-Add scaling option
-Multiple models??


Find 3D models on Sketchfab:

https://sketchfab.com/feed
17 Comments
Alexandrovich  [author] 4 May @ 12:45pm 
Alexandrovich  [author] 26 Aug, 2024 @ 12:43am 
@Eraserhead7782 Give it time, collisions may take a while to load, otherwise try simplifying your model
Eraserhead7782 22 Aug, 2024 @ 5:47pm 
I made my model 19,986 triangles and 19,695 faces and the collision still won't work. Is there anything else I have to do?
Eraserhead7782 17 Aug, 2024 @ 5:22am 
Is there a reason why the triangle limit is so low? Is it because of the source engine not being able to handle it?
Alexandrovich  [author] 2 Aug, 2024 @ 1:35am 
@Eraserhead7782 Make sure you select the (collision) button and that the model is sliced into 21,845max triangle objects or simply less than 21,845 tris itself.
Beyond this tri count the models dont work properly
Eraserhead7782 2 Aug, 2024 @ 12:06am 
I really like this. But did I do something wrong when setting everything up? The model and all the textures show up, but the collision never works. What should I do? Should I give more info?
Alexandrovich  [author] 5 Jun, 2024 @ 10:03am 
Updated desc on materials
Alexandrovich  [author] 31 May, 2024 @ 10:08am 
@The Escspist it could be better was done in 3-4 hours, I will try to make it more precise when I can
You Are Pregnant🧙 31 May, 2024 @ 7:38am 
This addon is apolitical and well designed. Thank the author.
Alexandrovich  [author] 31 May, 2024 @ 7:35am 
lazzly Wtf why?