Facepunch / sbox-issues

176 stars 12 forks source link

FBX import with automatically converted materials #3577

Open Termit68 opened 1 year ago

Termit68 commented 1 year ago

For?

Hammer, Material Editor, Other

What can't you do?

When exporting in FBX format, for example from Blender, there is a function to pack all materials into the FBX file. This way when importing into another program, this data is automatically loaded and the materials are automatically applied to the model. Previously I worked on projects in Roblox and there this process of importing models really speeds up the development process. Because it's not necessary to constantly monitor the movement of textures. Now the textures packed in FBX are dumped into a separate folder and I have to redo every material manually. And the DefaultMaterialGroup in ModelDoc loads the names of the materials that are embedded in the fbx, but it doesn't load the textures themselves. I could do all materials manually, but I plan to import a large project with hundreds of models and textures, so it would be a very long process if I had to do all materials individually.

How would you like it to work?

1) When importing into ModelDoc the materials in the FBX file are automatically converted. 2) When importing the model, you can specify a folder where materials compiled in this way automatically will be stored. So they can be separated from those that will still be made manually. 3) It would be great if there was a checkbox "check material names before application". Since in large projects, the same material can be used on different models, it would be foolish to create a new one every time, it is more logical to use the one that already exists. If there is a material with a similar name in the materials folder, it will be applied, if not - a new one will be created.

What have you tried?

Tried different ways to export FBX. And also tried putting a plugin for Blender that allows to export in .dmx and .smd formats. However, for some reason these ways don't work either. ModelDoc also loads material names into the DefaultMaterialGroup, but not the materials themselves.

DrakeFruit commented 1 year ago

this would be awesome for making and texturing parts of maps in blender and importing them to hammer.