Garry's Mod

Garry's Mod

103 ratings
UI .OBJ Loader with physics
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Movie, Scenic
File Size
Posted
27.774 KB
May 4 @ 11:52am
1 Change Note ( view )

Subscribe to download
UI .OBJ Loader with physics

Description
UI .OBJ Loader with physics

A simple UI that can load .obj models placed in garrysmod/data/models with or without physics.
i.e: Create a prop in Blender, spawn it without compiling into .mdl/restarting the game.

UI FEATURES

-Multiple models can be spawned (No limit)
-File browser to load models from garrysmod/data/models (Create folder)
-List of spawned models for individual selection/editing.
-XYZ position/pitch/yaw/roll/scale
-File browser to load models with PHYSICS (interacts only with the world)
-Reset position

USAGE

Place your OBJ models in garrysmod/data/models
Bind a key to "open_objloader_ui"/start in console
Load your OBJ model, no game restart required.
Spawn at crosshair with physics/static
Edit XYZ position/pitch/yaw/roll/scale of STATIC models only.
Mass is directly related to the triangle count.
The more complex the model, the heavier.


DISCLAIMER
This addon is unfinished and I may continue working on it in the future.
I don't know how to texture the .obj models/create physics that interact with entities not just the world.
Spawned models use models/debug/debugwhite texture
so feel free replace it with your model's (must convert to .vtf/.vmt)
and you should be able texture it. (Single texture)

Invert normals feature is broken. They are inverted by default.


Feel free to edit this addon if you'd like to finish it.
22 Comments
Alexandrovich  [author] May 10 @ 4:41pm 
@Arthedo It could be possible in the future
Arthedo May 10 @ 10:47am 
can I work in ragdoll physics?
Alexandrovich  [author] May 10 @ 8:41am 
@Ragnar Steam/SteamApps/common/Garry's Mod/garrysmod/data/models
Ragnar May 10 @ 6:07am 
garrysmod as in GarrysMod from steamapps?
Alexandrovich  [author] May 10 @ 5:41am 
@Ragnar garrysmod/data/models if folder does not exist create it
Ragnar May 10 @ 4:30am 
can you give the full file directory on where im supposed to put the model?
Not Chris May 9 @ 10:44pm 
Bro you can make a mod playing Garry's mod now!:steamthumbsup:
Alexandrovich  [author] May 9 @ 6:54am 
@AhmedMake400 I tried but don't know how to make it work properly and don't have time to fix it
AhmedMake400 May 9 @ 3:53am 
>> author
Ok great work, but can't you make it work server side so we can grab it with anything like a prop?

Also, an error occurs when I modify the size value or when I change from number 1 to any higher number:
[UI .OBJ Loader with physics] lua/autorun/client/cl_objloader.lua:847: bad argument #1 to 'SetModelScale' (number expected, got userdata)
1. SetModelScale - [C]:-1
2. OnEnter - lua/autorun/client/cl_objloader.lua:847
3. unknown - lua/vgui/dtextentry.lua:79
🕊 Peace&Death ⚰ May 7 @ 1:33pm 
емать имба!