SteamVR

SteamVR

SteamVR Workshop
Customize your SteamVR experience by finding new backgrounds, 3D environments, controllers and base station models.
Learn More
Mantas T 1 23 Sep, 2019 @ 12:01am
fbx and materials
so if i create a model and export it as obj it has a material (that i have to create in my 3d software) with a same name as 3d model and all works fine. but if i do the same for animated fbx model it gets a material "error" and my original material name created in 3d software is ignored. that would be fine, sins i edit that "error" material and its fine. but after i save my map, quit hammer and open it next day - material is gone. what could be going wrong here? (iam using 3d max ) also if i open material in material editor (can happen to any material) hammer crashes. the only way to edit material is to create a new one, save it with a name of old one. any ideas?
< >
Showing 1-8 of 8 comments
Rectus 13 23 Sep, 2019 @ 12:46am 
The error material is just what it displays on the model if it can't find the actual material, it's not in your addon so it shouldn't really be editable. Chances are that the material name from the 3D software is still there but it doesn't know the path to it.

There are two ways of importing a model. If you pick a mesh file outside the addon folder, it will open the import wizard, which doesn't always work very well with materials.

If you instead save or copy the mesh file to somewhere inside the addon folder structure (making a subfolder under \models is recommended), it will skip the import wizard and just use the mesh as-is, using the material name from the 3D editor. This method is outlined here:
https://developer.valvesoftware.com/wiki/SteamVR/Environments/Environment_Tutorial:_Creating_a_Physics_Prop#Starting_the_Import

With the latter method, you will need to put a material search path (e.g. materials/models/furniture) in the mesh properties in the model editor, ot it will not know where to look for the material.

I'd recommend using the latter method even though it takes a lot more setup, since it gives you more control over the model and lets you update it after importing.
Mantas T 1 23 Sep, 2019 @ 3:30am 
you saved the day again! thank you.
Mantas T 1 30 Jun, 2020 @ 1:14am 
hello people, i have the same problem - cannot figure out how to make a material for a model (animated one that i do by creating actual model in model editor to add fbx animation not the one when you just import mesh to map) so i create my fbx in 3dmax i apply material with a name - but when imported to steamvr i only get material called "error" first i used workaround to create material with name "error" but that only works if i want to have only one single animated model. what do i do wrong? https://www.youtube.com/watch?v=DS86VBrMa_k&feature=youtu.be
Mantas T 1 30 Jun, 2020 @ 1:24am 
and trying to put material url doesn't do anything at all. https://youtu.be/Vz2iv96hsRA
Rectus 13 30 Jun, 2020 @ 1:34am 
The Material Search Path needs to just have the directory to the materials, not the filename. In your case it would be: materials\
Mantas T 1 30 Jun, 2020 @ 1:50am 
hey! thanks for quick reply! but i still have a problem i dont understand :( https://youtu.be/wKnzeBE_F8E
Rectus 13 30 Jun, 2020 @ 2:00am 
In the last example your material is called candle.vmat, but it's searching for flame.vmat.
Mantas T 1 30 Jun, 2020 @ 2:06am 
dam it! sorry for that !
< >
Showing 1-8 of 8 comments
Per page: 1530 50