CGF MTL issues?

Hey

This might be a bug, or I am missing something. But when you go to add a MTL to a object, you can do so with the fbx by applying to the set object. However when you try with CGF, there is no option and CGF does not show up in the MTL Editor, so only way is to make a MTL and attach it through the mesh settings once the object is place. I would have assumed the MTL would be the same for FBX and CGF.

When i go to Import the files created in 3ds Max through the import option in the file menu, It imports it fine. Its fine for both fbx and cgf. When i go to add a textures to the objects i am going through the material editor and for the fbx the mtl file is there but for the cgf files the mtl has to be created. I am using 1.12.0.1

Hi @Finchy - could you clarify a bit how you are working on your project? Are you working in the Edit Settings panel of the Asset Browser, the Material Editor, or on a game level with Components? I am just trying to see where you are adding a material to an object. Usually the material .MTL file is derived from the .FBX file, as is the .CGF - the Asset Processor system automatically derives the material from the .FBX file you built from your DCC application (such as 3ds Max or Maya). If you could explain a little more about your workflow, we can give you more information on how to acheive what you need. Thank you!

3ds max does not allow me to export the mtl file through lumberyard exporter as it shows an error all the time, and when i change a setting to fix it, it breaks the textures. As for the cgf, I am not able to export fbx with lumberyard exporter hence why I am using the cgf as thats the file type that it only supports for static objects.

Hi @Finchy - I’m not sure about the workflow you are mentioning for FBX files and what you are trying to do?

For the new FBX pipeline, the Asset Processor automatically processes any FBX files it finds in the project path. So for instance, if you have set up your game project to work in the Starter Game (where it is by default in the Project Configurator), you would place any FBX files you want to be automatically processed in the path:

\dev\StarterGame\Objects

For example:

C:\AMAZON\Lumberyard\1.12.0.1\dev\StarterGame\Objects

So you would place the FBX files for any objects you wanted processed into that folder, and open the Lumberyard editor at that point. There is no need to do anything like File > Import to bring in static CGF objects. Once you check that the Asset Processor has processed your object (check in your hidden icons tray to find the Asset Processor icon, then right-click and select “Show” to see the Asset Processor window) successfully, you can use the Asset Browser to see what it has automatically derived from your FBX file.

When you are in the Lumberyard editor, you go to Tools > Asset Browser, then navigate to your FBX file in the project. You can right-click the file and select “Edit Settings” to see what things the Asset Processor has derived from your FBX file, as well as seeing the actual sub-types in the Asset Browser window.

If you have set up a material on your object in 3ds Max, that material will still be associated with the CGF file automatically, there is no need to assign that material to the static mesh. If you want to see your static mesh on a level with the material applied, you can add a new empty component to a test level in the Entity Outliner, then add the “Mesh” component from the Rendering menu in the Add Component menu of the Entity Inspector.

You should then see your static mesh on your test level with the material applied, without having to do any type of material assignment through the material editor. If you have NOT applied a material in 3ds Max, you can then just point the Mesh component to a Material Override material.

Hope that helps - please let me know if there’s any more info I can give.

Hi @Finchy - also, here are some links to the documentation for some of the things mentioned above.

Asset Processor:

https://docs.aws.amazon.com/lumberyard/latest/userguide/asset-pipeline-processor.html

Asset Browser:

https://docs.aws.amazon.com/lumberyard/latest/userguide/asset-browser-intro.html

Entity Outliner:

https://docs.aws.amazon.com/lumberyard/latest/gettingstartedguide/placing-entities-creating-doorway.html

Entity Inspector:

https://docs.aws.amazon.com/lumberyard/latest/gettingstartedguide/placing-entities-static-mesh.html

Hi @Finchy - ah ok, I think I see what the issue is. For the new FBX pipeline with Lumberyard, there is no exporter. The legacy exporter that is in 3ds Max is only if you are using the legacy CryEngine-style assets, which are only available if you enable the CryLegacy gem in the Project Configurator.

The way you make assets now is to natively create an FBX file from your DCC application (3ds Max, Maya, etc.), and make sure that file is in your project path so that it is processed by the Asset Processor. There is no longer any idea of an “exporter” inside 3ds Max or Maya.

So just make an FBX in 3ds Max in the normal way by going to File > Export > Export… or File > Export > Export Selected… and then in the “Save as type:” box at the bottom select “Autodesk (*.FBX)” as your file type. This will package your assets into an FBX file that will then be read by the Lumberyard engine.

Sorry for any confusion - I didn’t realize that you were using the legacy exporter. The new FBX pipeline does not require an exporter, it just consumes FBX files.

Hope this helps!

Here is a link to a description of how the FBX files are being processed:

https://docs.aws.amazon.com/lumberyard/latest/userguide/char-fbx-importer.html