Coder Social home page Coder Social logo

edunad / prop_mesh Goto Github PK

View Code? Open in Web Editor NEW
14.0 7.0 0.0 37.45 MB

Garrysmod OBJ - Custom Model Loader

Home Page: https://steamcommunity.com/sharedfiles/filedetails/?id=2205982705

License: Apache License 2.0

Lua 100.00%
duplicator blender garrysmod addon obj custom model loader hotload

prop_mesh's Introduction

prop_mesh - Custom Model Loader

prop_mesh allows you to use .obj models as props using box collisions! Supports multi-textured models!

NOTES

  • Only .obj models are supported!
  • You can find prop_mesh on Entities -> Custom Models
  • When using prop_mesh make sure you at least have a Prop Protection ADDON (else it will use SetOwner to determine the owner, preventing you from grabbing it!)
  • If you want to use it SINGLEPLAYER, make sure "Local Server" is ticked! DO NOT START IT IN PURE SINGLEPLAYER

COMMANDS

CLIENT :
	prop_mesh_urltexture_timeout <number> - How many seconds before timing out (Default: 30)
	-------------
	prop_mesh_queue_interval <0.35 to 1> - How many seconds between prop_mesh mesh rendering (LOW VALUE = More chances of crashing) (Default: 0.35)
	-------------
	prop_mesh_urltexture_reload - Reloads all url textures
	prop_mesh_urltexture_clear - Clear url texture cache
SERVER :
	sbox_maxprop_mesh <number> - Max prop_mesh per players (Default: 10)

	prop_mesh_maxTriangles <number> - Max prop_mesh Obj triangles allowed in TOTAL (Default: 1650)
	prop_mesh_maxSubMeshes <number> - Max prop_mesh sub-meshes allowed (HIGH VALUE = More rendering lag) (Default: 5)
	prop_mesh_maxOBJ_bytes <number> - Max prop_mesh obj size in BYTES (Default: 2048576)
	prop_mesh_maxScaleVolume <number> - Max prop_mesh volume scale (Default: 580)
	prop_mesh_minScaleVolume <number> - Min prop_mesh volume scale (Default: 3)
	prop_mesh_ignoreContentRange <number> - Ignore Content-Range check, users will be able to force the server to download huge files! (Default: 0)
SHARED :
	prop_mesh_objcache_clear - Clear cached models (If ran on server, it will clear clients cache)

KNOWN ISSUES

  • If your model looks "weird" try converting the faces to tris (if you use blender, when exporting the obj, tick "Triangulate Faces"

TODO

Mesh

  • Save parsed mesh on client as cache
  • Save textures on client as cache
  • Split the mesh if triangles limit is high

Entity

  • Fix Adv.dup constrains
  • Server / Client code improvements
  • Add console commands to limit prop_mesh on client side
  • Add console commands server side for admins
  • Handle server failing to parse model?
  • Better UI Panel

LINKS

SCREENSHOTS

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.