#How to copy a prop and give it custom textures?

54 messages · Page 1 of 1 (latest)

runic tiger
#

Hi, I'm trying to create a Coca-cola branded vending machine using the cs source vending machine model would anyone know how to perform this?

noble sail
#

decompile the model and modify the .qc so it calls for the texture you want to use

#

be sure to give the model a unique name too

runic tiger
#

how would you do that?

#

I'm sorry I'm really new to mapping

hexed pasture
#

use Crowbar app

#

it's awesome

runic tiger
#

I've just decompiled

#

how would I be able to edit the texture?

noble sail
#

then use an image editing software of your choice to edit it

#

after that use vtfedit to save the texture as a .vtf

#

dont forget to make a .vmt too

runic tiger
#

thank you so much

fierce isle
#

changing the $cdmaterials and the $modelname lines$

runic tiger
fierce isle
#

since i imagine the vending machine prop itself is default to the game, you gotta open the game 'vpk' to find the model files
extract them anywhere you want (you need the 4/5 files of the model, not just the .mdl)

#

then you can drag the mdl file itself onto the crowbar window

#

and decompiling will just need you to press the button Decompile (drag dropping the mdl in crowbar, should automatically go to the decompile sub-tab)

runic tiger
#

do you know how I could view vtx phy and vvd files?

#

like which program?

fierce isle
#

the 'mdl' file cannot properly be decompiled if you dont have the vtx, phy and vvd next to it when you are using crowbar

#

because in game, the mdl use the data stored into those other file to make a working model

#

that's why i mentionned you need the 4/5 files

#

for example here, i can drag the mdl in crowbar to decompile it

#

that created a subfolder called 'decompiled' (cause i had output to: subfolder)
and in there, the smd and qc

#

i edit the qc

#

i change the 'modelname' and cdmaterials

#

i save the file

#

i drag the qc on crowbar, and it automatically goes to compile tab

#

i can press compile

#

it compiled
i can press Goto to open the folder where the mdl was generated

#

i can press the use in view button, to make crowbar go in the 'view' tab

#

in there, i can press the view button

#

it launch the game 'hlmv.exe' the model viewer with the model

#

my model is working on the new path, except i got missing texture, as I didnt create the materials and vtf on the new path i defined in the qc file

#

under the 'model' tab, it show that it couldnt load one or more vmts

#

Im not gonna fix that, cause it's just to show you

#

@runic tiger i hope this make it clear how you gotta do it

#

in my case, the cdmaterial is
$cdmaterials "models\custom_new_path\crate_2"

which means i would need my vmt to be in
<game folder>/materials/models/custom_new_path/crate_2/

runic tiger
#

it worked thank you

fierce isle
#

and so in here, i put both the vmt and vtf

the vmt name need to be the same one as the original vmt because that's what the model was configured to load

#

in my case it's those 4

#

a vending machine i imagine only has one material and one texture

#

your vmt can then just load any vtf you want

#

the vtf itself doesnt necessarily need to be in the same folder as the vmt, but the good practice is to put it in the same place