Giter Club home page Giter Club logo

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

prop_mesh's People

Contributors

edunad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

prop_mesh's Issues

models magically loading and not loading from time to time

this has become a recurring problem and I really dont see an answer to it, whenever I have an obj loaded in game, or when I get the opportunity to load one in, sometimes i can load it completely normal. then I open up the game again and suddenly "poof" failed to find 'Content-Range' header, I say "weird flex", open the game again and then "poof" object back to normal. any good ideas onto WHY it may be doing this from time to time?

'Invalid MTL' shown - unable to figure out why

Issue Type

  • Model .obj loading
  • Model texture loading
  • Entity related
  • Lua error

Model data (if any)

When trying to load this MTL file (exported from Blender 2.9), the prop_mesh entity refuses to load it, despite the fact that I cannot see as to why this format is not acceptable.
I have fed it both a raw text version of the file and the file itself, and it simply refuses to load it under any circumstances.
I have also tried other MTL files, and it just ain't having it.

Is there a format of MTL that differs to this exported by Blender or is this a valid format file and the entity is simply refusing to load it?

Garry's Mod Time Out Prop_Mesh

Issue Type

  • Unknown

So, when using this on a server, other people's games can crash rarely and just be times out after being in the server after the PM cube is out. Them they wont be able to join back after this happen when the PM cube is spawned out. I am unsure if this is a gmod or lua error.

I am hoping to help test things out and fix this

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.