#XXL Pallets
1 messages · Page 1 of 1 (latest)
I like the way these look. The texture is good
One of these days someone is going to make a tool that generates PHX meshes dynamically and then we'll see some shit
texture is based off woodflor005a
Very nice
true
some guy already made procedural meshes
but tool is complicated for not "builder nerds"
but very powerful
and builds good convex collision
added x3 variants of panels and x05
Are you going to create gibs?
Oh that does look complicated
still trying to find a good way for defining these wooden props health
i was using thing that if prop is 2 times heavier, props health will be 1.5x times higher
because with 2x health values become huge
😍
for example this one had 3600
I would figure out a good health for a 1x1 panel and then multiply that by the surface area
So if you have a 0.5x2 panel, it has the same health as a 1x1 panel
trying to find good formula so you wont be able to just create 4x4 plate that is almost indestructible with bullets
What are you basing it on? Weight?
weight is based on its scale
so 2x0.5 has same weight as 1x1
weight is ok with this thing
but health for big props
What kind of formula are you trying?
I want to see if I can make one, but I don't know your inputs
health = weight * 1.5 ?
trying to make balance for big props
so walls made out of these props wouldnt have huge health
I understand your balance goal
You said you have a bad formula, right?
Can I see it?
health = constant value (for panels is 100) * weight difference / 1.5
but not sure if this is exactly this one
What is weight difference?
i was just thinking if prop is 2 times bigger, i would just scale weight by 1.5 instead
but this is not worked when x3 and x05 props appeared
weight of bigger prop / weight of reference prop (1x1 panel)
Hmm
Floating point imprecision 🤩
but this works if i set weight manually and paste with advdupe2
so it is studiomdl issue?

yea studiomdl issue
maybe should make request to rubat if he can improve it
atleast i can manually fixup imprecise values
Min Mass: 50
Min Health: 50
Max Health: 200
Mass: 50 Health: 50
Mass: 100 Health: 87
Mass: 200 Health: 134
Mass: 400 Health: 164
Mass: 800 Health: 181
Mass: 1600 Health: 190
Mass: 3200 Health: 195
Mass: 6400 Health: 197
Mass: 12800 Health: 198
How does this look?
Formula
do you have it?
local minMass = 50
local minHealth = 50
local maxHealth = 200
local function GetHealth( mass )
return minHealth + math.floor( math.pow( ( mass - minMass ) / mass, 2 ) * ( maxHealth - minHealth ) )
end
local testMasses = {
50,
100,
200,
400,
800,
1600,
3200,
6400,
12800
}
local function TestHealth()
print( "Min Mass: " .. minMass )
print( "Min Health: " .. minHealth )
print( "Max Health: " .. maxHealth )
for i = 1, #testMasses do
local mass = testMasses[i]
local health = GetHealth( mass )
print( "Mass: " .. mass .. "\tHealth: " .. health )
end
end
TestHealth()
thanks
Just... don't go under the min mass value
?
Min Mass: 50
Min Health: 50
Max Health: 200
Mass: 25 Health: 200
Mass: 50 Health: 50
It won't like it
You can change the min and max mass variables
It's configurable, just make sure to obey the config
will it work in console if i just paste it in autorun lua?
Yes but you can also do it here
OneCompiler's Lua online editor helps you to write, compile, debug and run Lua code online.
Doesn't need to be in Garry's Mod
Nevermind then
Yes
It's set up so that as you get more and more mass, the amount of health the extra mass gives is less and less
Hmm
There is definitely a way... let me play with the math a bit
Can you give me your variables?
The min mass, max mass, etc.
Try changing this 2 to a 5
local function GetHealth( mass )
return minHealth + math.floor( math.pow( ( mass - minMass ) / mass, 5 ) * ( maxHealth - minHealth ) )
end
I'm not a math guy so I don't know exactly how to customize it
This is basically a modified version of the math to generate a random integer between some minimum and maximum value using a double in the range 0-1
Glad it helped!
pack now looks like that, should add wheels and other stuff like tubes and frame cubes
Do the orignal PHX props have LODs?
none of gmod non-hl2 props (except playermodels) have lods
was tested on r_lod 6 command
placed airboat on back to show that command works
decided to add verts because 2 208 verts total on all 18 props
lod pushes down this value to 144
If you have a good workflow for creating those LODs, consider creating LODs for them
I'm sure it would increase performance for those with less powerful hardware
like i put decimate modifier with angle limit of 1
and then fixing uv manually
done this for my props
I was assuming you were creating the mesh from a cube manually and then setting up the UVs by hand
debugging stuff rn, some uvs are not correct positions
Does decimating the model save time compared to creating a cube and scaling it?
yea
Interesting
it saves top and down sides of uv
some fixed some not, source moment
wait ofc it wasnt fixed i not selected 3x05 mesh
also 3x3 and 1x3
lods are pain, but important in case of these props
because mostly used in big amounts
almost impossible to notice (even harder on video cuz compressed), bug gpu and small part of cpu says thanks
Looks good! These are very fully-featured PHX-style props
also decided to simplify collision
Was it complex?
removed small bevels
but idk about this PHX prop
simplified round props collision is easy to notice
but this is very bad for cpu and default vphysics
Seems like it does nothing but make it hard to stack them
Jesus
So I see
Some things need precise collisions, but I don't think they need THAT precise of collisions
wheels should be precise
but in lua they might be just spheres
cheaper
and not phase to ground at high rpm
The outside edge needs precision but not the inside
simpler rtt shadow
not so much boost but for overall performance
also custom gibs are good
but generic
if getting custom gibs for every prop it will fill up precache
and texture tiling is too noticeable
The tiling looks fine to me