Home Technical Talk

Save CGF with material

polycounter lvl 4
Offline / Send Message
nukes polycounter lvl 4
Hey everyone,

I'm trying to add some custom vegetation.
So I exported my tree from max, added it in the editor as a brush and created a custom material for it. Now when I try to save my CGF again from the editor (with the custom material) it crashes badly.

So i need to save the CGF with material applied so I can use it as a object for painting vegetation.
Now i can add it but it doesn't have a material.
Or is there another way to add material to vegetation objects or save my cgf with material?

Thanks!

Replies

  • Ghogiel
    Options
    Offline / Send Message
    Ghogiel greentooth
    I don't quite understand the bit when you say "Now when I try to save my CGF again from the editor (with the custom material)" what does saving the CGF from the editor mean, why?

    The material name that is applied to the mesh at the time of export from max is written into the CGF file itself. This means that you only ever need to export the mesh and it's done. All material set up is a different process. You don't need to save the mesh from the editor.

    if syncing a material from max to CE3 isn't working, there was an issue with that if you didn't start max and sandbox in admin mode back in CE2. It should work now fine but it's a lot faster to click the sync material button in the cryexpot tools than to do it manually.

    But anyway, failing syncing the mtl to the editor, all you need to do in sandbox is recreate the material and it work the same>

    In the editor, press M, create a new material, name it the same as the one that was applied to the mesh in max, and save it to the same folder where you are exporting the CGF to.

    Since there is now an mtl file in the same folder as the cgf and that is named the same as the material that was applied to the mesh in max, and thus also the material string name inside the cgf, it'll be found and read.

    Now you just have to set up all the submats, plug in textures and shader parameters and make it look nice.
  • nukes
    Options
    Offline / Send Message
    nukes polycounter lvl 4
    yep sorry for the late reply
    i've managed to properly use my cgf for vegetation with syncing the material.
    I didn't know that was the way to do it, i tried saving cgf for no reason i guess :)

    thanks alot!
Sign In or Register to comment.