fuzzzzzz / MESA

Maya Exporter for Source Assets
http://puppet-master.net
Other
12 stars 1 forks source link

VTFEdit multiple issues when determining the path of the materials files from the smdTarget attribute #1

Open fuzzzzzz opened 11 years ago

fuzzzzzz commented 11 years ago

The manner we access to the VTF and VMT, doesn't work well.

issue 1.

If the path of the textures in materials, is different then the path of the smd/QC path, we can't find the VTF/vMT

example : c:/mymod/models/props/ c:/mymod/materials/models/props/

vtf edit script expected that path : c:/mymod/materials/props/

issue 2 :

another case with two materials on the same models the script will only open the file base on the name of the Scene ( cause the sdm /qc path is generated from the path of the scene)

issue 3 :

but we can rename the QC and reference SMD name. and in that case if the name of the scene is cube.ma, and the SMD /qc path is Cube_reference.smd

the script will looking for c:/mymod/materials/models/props/cube_reference_diffuse.vtf but that file doesn't exist. the name of the texture is cube_diffuse.vtf

fuzzzzzz commented 11 years ago

This script must to be rewrite to check the path in to the phongE shader, instead of trying to determine the path from the qc/smd path. Using the relative path of the VMT should be the way to access the right file. but it would be better to directly read into the phongE shader to get the path of the VMT and VTF files.