• Collision model and textures screwed up
    10 replies, posted
[media]http://img136.imageshack.us/img136/3489/gmconstruct0000p.jpg[/media] In the screenshot, the model is off to the right, but the collision model is center screen. Along with the textures not working. [code] $modelname sarge/tankshell.mdl $cdmaterials sarge/ $scale 20 $body studio "tankshell.smd" $origin 0 0 0 $surfaceprop "metal" $sequence idle "tankshell" loop fps 1 $collisionmodel "tankshell_phys.smd" { $Mass 10 $concave } $keyvalues { "prop_data" { "base" "Metal.Medium" } } [/code] Compile Log [code]Created command line: "E:\Program Files\Steam\steamapps\sonydude\sourcesdk\bin\ep1\bin\studiomdl.exe" -game "e:\program files\steam\steamapps\sonydude\half-life 2\hl2" -notxbox "G:\Projects\tank shells\tankshell.qc" qdir: "g:\projects\tank shells\" gamedir: "e:\program files\steam\steamapps\sonydude\half-life 2\hl2\" g_path: "tankshell" Working on "tankshell.qc" SMD MODEL tankshell.smd SMD MODEL tankshell_phys.smd Model has 1 convex sub-parts Collision model completed. --------------------- writing e:\program files\steam\steamapps\sonydude\half-life 2\hl2\models/sarge/tankshell.mdl: bones 708 bytes (1) animations 120 bytes (1 anims) (1 frames) [0:01] sequences 220 bytes (1 seq) ik/pose 164 bytes eyeballs 0 bytes (0 eyeballs) flexes 0 bytes (0 flexes) textures 72 bytes keyvalues 56 bytes Collision model volume 1189.96 in^3 collision 0 bytes total 1512 --------------------- writing e:\program files\steam\steamapps\sonydude\half-life 2\hl2\models/sarge/tankshell.vvd: vertices 9216 bytes (192 vertices) tangents 3072 bytes (192 vertices) total 12352 bytes --------------------- Generating optimized mesh "e:\program files\steam\steamapps\sonydude\half-life 2\hl2\models/sarge/tankshell.sw.vtx": body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 1728 bytes indices: 1128 bytes bone changes: 8 bytes everything: 2989 bytes --------------------- Generating optimized mesh "e:\program files\steam\steamapps\sonydude\half-life 2\hl2\models/sarge/tankshell.dx80.vtx": body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 1728 bytes indices: 1128 bytes bone changes: 16 bytes everything: 2997 bytes --------------------- Generating optimized mesh "e:\program files\steam\steamapps\sonydude\half-life 2\hl2\models/sarge/tankshell.dx90.vtx": body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 1728 bytes indices: 1128 bytes bone changes: 16 bytes everything: 2997 bytes --------------------- Generating optimized mesh "e:\program files\steam\steamapps\sonydude\half-life 2\hl2\models/sarge/tankshell.xbox.vtx": body parts: 8 bytes models: 20 bytes model LODs: 12 bytes meshes: 9 bytes strip groups: 25 bytes strips: 27 bytes verts: 1728 bytes indices: 1128 bytes bone changes: 16 bytes everything: 2997 bytes Completed "tankshell.qc" [/code] VMT file which is in garrysmod\materials\sarge [code] "LightmappedGeneric" { "$basetexture" "sarge/tankshell" } [/code]
Change your VMT from "LightmappedGeneric" to "VertexlitGeneric" that should fix the texture and use your original model (smd) as the collision model (smd) to solve that (or import them both and check they overlap).
I have a feeling I messed something up while texturing in Max. Does the texture have the be the .VTF? or the .TGA that made the .VTF? Right now its the .TGA
[QUOTE=Sonydude;17068209]I have a feeling I messed something up while texturing in Max. Does the texture have the be the .VTF? or the .TGA that made the .VTF? Right now its the .TGA[/QUOTE] Must be a VTF and also what I said above.
Oh, yea I have already changed to vertexlitgeneric. [editline]02:37PM[/editline] I downloaded the .VTF plugin, applied the .VTF, compiled. Still Pink and black. The texture IS working since I can do material_override sarge/tankshell and it works.
Just chuck $staticprop in the qc.
That would make it a static prop. I want a physic prop.
[QUOTE=Sonydude;17089649]That would make it a static prop. I want a physic prop.[/QUOTE] No, GMod converts static props to physics props. Make it a physics prop if you want to use it in a map for a different mod, though.
Ok, everything compiles right, and the material is fine. (I can apply the material to the prop with the material stool) Yet when spawned it comes up pink and black.
[QUOTE=Sonydude;17089649]That would make it a static prop. I want a physic prop.[/QUOTE] $staticprop doesn't limit it to being a static prop.
Collisions and everything is fine now, my physics model was bad. The material still doesn't show.
Sorry, you need to Log In to post a reply to this thread.