I tried the following:
[code]
//SetMaterial code --- path to material
self:SetMaterial("stuff/carbon") -- /materials/stuff/carbon.vmt(.vtf too)
self:SetMaterial("stuff/carbon.vmt") -- same as above
self:SetMaterial("stuff/carbon.vtf") -- same as above
self:SetMaterial("materials/stuff/carbon") --same as above, vtf/vmt variations included
self:SetMaterial("stuff/carbon.png") -- /materials/stuff/carbon.png(tried .jpg too)
//all the above but materials were in an addon (/addons/myaddon/materials/stuff/carbon.vmt/vtf/jpg/png
[/code]
"models/shiny" or any other default materials works, this one doesn't.
Any idea why? This is on singleplayer/listen server.
self:SetMaterial("stuff/carbon") is the correct way of doing it, the material [b]must[/b] have a correct shader to be applicable to models, that is VertexLitGeneric.
As always, robotboy knows the answer. No idea what I would do without you! Thanks!
Sorry, you need to Log In to post a reply to this thread.