Convert groups of props into clientside meshes.
https://steamcommunity.com/sharedfiles/filedetails/?id=2458909924
Garry's Mod Addon - Convert a group of props into a single clientside mesh
Convert groups of props into clientside meshes.
https://steamcommunity.com/sharedfiles/filedetails/?id=2458909924
Hello,
I am unable to select the mesh controller with context menu and edit the mesh to delete unwanted props/holos. I was able to do this in a previous version but not now.
Also, thank you for making this tool.
I think a great idea would be to have a way of importing a specified folder of .obj files into their own controllers. I like to make P2M cars but my models have a ton of individual meshes. I use individual meshes in their own controllers because it prevents the spiderweb models that sometimes happen with higher quality cars, and so I can individually color and material each part. I would love you forever!
As a long time implementer of CPPI for my own prop protection, I haven't ran into any other addon that includes a CPPICanTool check inside of TOOL:LeftClick().
TOOL:LeftClick() already causes (or is preceded by) a gamemode CanTool check. Perhaps my setup isn't kosher, but all other addons I've ran on sandbox server that cater to CPPI have seemingly never needed CPPICanTool inside LeftClick. I think the assumption is whatever prop protection system that implements CPPI is probably also going to be utilizing the gamemode CanTool hook to allow/prevent TOOL:LeftClick() getting called in the first place.
In my case, this is true. Using P2M on worldspawn specifically will be allowed in my CanTool (explicitly returning true), but the redundant CPPICanTool check inside TOOL:LeftClick() will return false because I rely on the initial CanTool check to handle whether a player can use a specific tool on things like worldspawn or not. The CPPICanTool check itself doesn't default to allow worldspawn to always return true.
The tl;dr is that players on my server have to now use P2M on a prop that they own in order to spawn the P2M sent, rather than getting to just click on worldspawn. I'd prefer not to change CPPICanTool to always explicitly return true on worldspawn, but that is what the call inside of TOOL:LeftClick() will require me to do.
If my case sounds too specific or deviated from CPPI's intended implementation, I'd understand if you'd prefer to leave the check in. Otherwise I'd argue, from my current perspective, that it is unnecessary and should be handled by CanTool instead.
i've been unable to get any new mesh to load from legacy or new controllers on sp and mp
i've deleted the workshop version and installed the git version and tried every combination of legacy and new controller
https://youtu.be/CLcHy6qrhNw
https://youtu.be/6fnyhijAfS4
https://youtu.be/5j_sRxYOBtQ
in the update this feature was removed, and replaced with "stop rendering"
Posting this on behalf of someone else - they were messing with Prop2Mesh, and they deleted a p2m controller while an entity was selected. All non-world entities became wireframe and they began getting the following error in their console.
Player [6][OneEaredNeko] ERR: [prop2mesh] addons/prop2mesh/lua/p2m/editor.lua:97: Tried to use a NULL entity!
1. LocalToWorld - [C]:-1
2. v - addons/prop2mesh/lua/p2m/editor.lua:97
3. unknown - lua/includes/modules/hook.lua:84 (x5)
Worked in legacy, doesn't work anymore. Clipping the controller does nothing to the mesh. It ONLY works with the entire legacy addon, not legacy controllers, cause even those don't clip on the new updated addon.
Yes, "render inside of prop" is a bad setting, but some older dupes from me and a few others are affected because we didn't know at the time of making them. I noticed it seems intentional - if this is a technical limitation or a solution to an issue, feel free to close this. Just wondering about it.
Lets say if a model includes simple colliders you could include that as a type of collider like a prop acts, that would be nice
Can't select/add/remove/change color or material of controller with Tool Gun while P2M Entity is parented (because it lacks physbox). Using E2 for this is not easy for everyone. Duplicate those settings in Controller->Settings of C-menu for above actions would be nice.
Sometimes players import unnecessarily large models for what they're doing, it would be nice to be able to optionally set a total triangle "allowance" per player so that people can't go too crazy.
Unable to specify bodygroup type via e2 commands
Using setMaterial (such as mEntity:setMaterial(5, nOffMat), where nOffMat = "models/debug/debugwhite" and mEntity is a mesh controller, index 5 being a valid controller) results in a type mismatch for index claiming it expects a string even though in prop2mesh.lua you can tell that "index" is supposed to be a number. It appears to be trying to call Entity:setMaterial rather than p2m:setMaterial.
To reproduce:
my models were scaled up from 1.0 to 40.0 however certain camera angles and position of the player relative to the controller hide the meshes
https://youtu.be/0EuYzXpOP68
https://youtu.be/zQYkKT2mSEQ
rx7fc.txt
If you come across any models that generate rotated, post the paths here so I can add them to the fixup list
I cant get the new controllers to scale anything properly, trying to scale a model down by 0.4500 in settings>meshscale and it will let me enter that in, however after saving it changes to 0.4325
[Prop2Mesh] lua/includes/extensions/table.lua:563: attempt to index field 'val' (a number value)
it's supposed to have 5 controllers. after i meshed a p2m legacy controller, everything broke and i was unable to edit the meshes.
idk what to do, as my project can no longer be worked on
I know it was discussed in the ACF3 discord a while ago, just putting this here as a proper feature request seeing as it was implemented in Primitive.
Could default it to off and have a checkbox to enable it in the tool settings if mesh build time was impacted enough.
While attempting to convert a hologram-based build into a mesh, I discovered a strange issue with the Blast Door prop:
https://steamuserimages-a.akamaihd.net/ugc/1647719819407341322/0058EE6E9BBA962312DBE2DEB28CF6C2CB2E68EE/
For some reason, the prop splits itself in half and contains a wide gap in the middle after the meshing process. What it's supposed to look like is shown above the broken one.
Model:
models/props_lab/blastdoor001c.mdl
so there is an option for prop 2 mesh to export the mesh to e2 yet when they do the models dont even spawn why?
It has happened with base gmod models on a part of my mechs legs but only 4 of them disappear in the same spot on each leg, other parts of the leg share the same model and material but for some reason out of no where my dupe decided to spawn them without anything there, the chip has the models and materials inside of the p2m chip and i tried restarting gmod changing the materials and what not and nothing has fixed the issue. I redid the models and when i confirmed the resize they also disappeared
.
After I saved the dup with p2p via Adv. Duplicator I cannot confirm changes in it
Video with issue
https://github.com/shadowscion/Prop2Mesh/assets/170870965/78e1a29b-4577-46f7-a1fe-a4103fc1e6e4
For larger builds mostly utilizing a single material with multiple colors, selecting only one color is a pain to do manually. It'd be nice to have a checkbox similar to select by material, just for colors instead.
Applying most textures to the mesh controller makes it render as solid black. In the image both the plate and the controller have the same texture (vanilla gmod texture, phoenix_storms/wire/pcb_green
).
Only a few select textures render properly. From my tests, it seems most textures in the models
folder work (such as models/props_pipes/Pipesystem01a_skin3
but not models/flesh
). I tested all the sprops textures for example, none of them worked. The meshed props are sprops plates too.
I was told this could be due to hardware incompatibilities, I'm not sure how true that is. If it helps at all, my CPU (integrated graphics) is a Intel® Core™ i5-4300U CPU @ 1.90GHz × 4
.
A second draw call here with flashlight mode enabled would let flashlights and lamps work on 'complex' imeshes (p2m only uses these for controllers that can't all fit in a single GetRenderMesh's 64k vertex limit).
after changing scale twice on a single p2m chip, i am now unable to change anything on one of my controllers
This is the E2 I'm using to test:
@inputs P2m:entity On
@outputs
@persist
@trigger
if(~On&On){
#P2m=p2mCreate(entity():pos()+vec(10,0,0),entity():angles(),1,1)
P2m:p2mSetPos(entity():pos()+vec(10,0,0))
P2m:p2mSetAng(entity():angles())
P2m:p2mPushModel("models/led2.mdl",entity():toLocal(vec(30,0,0)),entity():toLocal(ang(0)),vec(1))
P2m:p2mBuild()
P2m:p2mSetParent(entity())
P2m:p2mSetColor(vec(255,50,50))
P2m:p2mSetMaterial("models/proppertextures/acrylic")
}
It throws this error:
sv: Expression 2 (P2m Test): entities/gmod_wire_expression2/core/custom/prop2mesh.lua:313: attempt to get
length of field 'E2P2MResevoir' (a nil value)
This is the lua function, line 311-313 Here
if not Check_Parents(this, target) then
return
end
At one point during my experimenting today I did get it to work wiring a p2m entity and pushing models to that. I don't know what I did to make that controller work, but any others I spawned using the tool would only give the error previously stated.
I also can't get the E2 generated controller to receive or build. If I'm just not doing something right, please let me know.
Other than this problem, this is a great addon! Thanks for your work so far!
When looking for the p2mPushModel() function parameters at the SFHelper it appears to be missing the bodygroup parameter.
Executable: C:\games\steamapps\common\GarrysMod\bin\win64\gmod.exe
Client
0. GetModelMeshes - [C]:-1
1. getVertsFromMDL - addons/prop2mesh-master/lua/prop2mesh/cl_meshlab.lua:322
2. (null) - addons/prop2mesh-master/lua/prop2mesh/cl_meshlab.lua:690
Server
Lua Interface = NULL
MenuSystem
Not in Lua call OR Lua has panicked
Like you can disable rendering for custom meshes, an option that lets players select whether they want to download the meshes or not might help with client performance if you already keep rendering off most of the time.
Whilst exporting and combining several meshes in E2, I noticed that scaling multiple meshes is unreliable.
I exported and combined a total of thirteen meshes. Whilst messing about with MScale, I noticed that some meshes don't scale to the new value of MScale. Only after reloading the E2 numerous times, do all meshes scale to the new value.
After initially spawning the E2, with MScale set to 0.2:
After reloading the E2 several times:
As you can see, some meshes remain with an MScale value of 1. From experience, the number of meshes affected differ from 1-5.
Messing about with timers in E2 doesn't seem to fix the issue.
models/props_lab/blastwindow.mdl
screenshot
https://i.imgur.com/bJvgjea.png
Need to use a matrix instead of the entity as the reference pos/ang
addons/prop2mesh/lua/entities/gmod_ent_p2m/init.lua:237: bad argument #1 to 'ipairs' (table expected, got nil)
1. ipairs - [C]:-1
2. func - addons/prop2mesh/lua/entities/gmod_ent_p2m/init.lua:237
3. unknown - lua/includes/extensions/net.lua:32
This worked the first time I attempted it using a very basic model I made in blender as a test. I removed the p2m controller and attempted to do the same thing again while figuring things out, and I couldn't add the object because I'd get this error. Attempting to use a different model didn't make a difference.
it's a mess, particularly the hardcoded dropdown box
selecting by baseclass would be helpful too
for bumpmaps
This thing crashes me constantly and the convar to disable it doesn't work at all.
No idea why. Closest I've got to fixing it is drawing the mesh objects twice, once with flashlight mode pushed which halves performance.
p2mSetMaterial
and p2mSetColor
on a p2m controller with the index of 7 (I have 8 in total) cause a script error. Pushing models works fine.
The error: sv: Expression 2 ( E2name ): entities/gmod_wire_expression2/core/custom/prop2mesh.lua:58: attempt to index a number value
need p2m.canCreate() for starfall or some other way to check if a p2m can be created and built. need this to queue spawning of meshes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.