.
Page 1 of 2 12 LastLast
Results 1 to 15 of 28

Thread: How to export FBX correctly for PBR materials in blender?

  1. #1
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    727
     

    Default How to export FBX correctly for PBR materials in blender?

    Hi everyone, by now I imagine someone using Blender 2.79 has added a PBR material (probably more Principled BSDF material + other inputs) to a mesh and has exported to FBX (or some other format first, then FBX) and imported that into Trainz successfully?

    If you have could you send me a detailed instruction set either by a reply to this thread or if it exists somewhere else send over the URL.

    Cheers,
    Paul

  2. #2
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,547
    Blog Entries
    30
     

    Default

    I did try that shader in Blender Cycles a few weeks ago but I couldn’t find a way of combining 8 bit channels into a parameters texture. There was no suitable conversion node. So, at this stage, I’m using an external image editor to fabricate all the textures, including the parameters texture.

    I think Whitepass and Pencil42 are doing something similar. I don't know who else is working in this space.

    My current target process is:

    1. Make the mesh, UV map it, bake a normal and AO map (all within Blender).
    2. Import all that into Substance Painter.
    3. Bake additional maps within SP.
    4. Paint the model.
    5. Export the albedo, parameters and normal textures. You can create different export configurations and I have one for PBRMetal that our German friends provided.
    6. Import the textures back into Blender.
    7. Create the material names and link the textures as described in the PBRMetal section of the WiKi.
    8. Import into TRS18.

    Perhaps much of that can be done in Blender but it would have to be in Cycles mode. I haven't figured a way of doing it - yet!

    I've learned quite a lot in the last few weeks so I could try again.

    Paul


  3. #3
    Join Date
    Nov 2006
    Location
    United States of America, Michagain, Berkley
    Posts
    5,564
    Blog Entries
    6
     

    Default

    I use Blender 2.78 and making a Blog on how but not done yet. https://whitepasstrainz.blogspot.com/

  4. #4
    Join Date
    Nov 2006
    Location
    United States of America, Washington, Seattle
    Posts
    3,366
     

    Default

    I'll see if I can write something up this weekend, as well.

    A couple of issues so far:
    1. Blender doesn't export Cycles materials. To export a model with material information, it needs to be using a Blender Internal material. The Cycles Principled BSDF material can be used in Blender to see what your material looks like, however.
    2. I haven't found a way in Blender to (easily) bake multiple Principled BSDF materials (especially the metallic and roughness maps) into a single material. This may be Substance Painter's biggest advantage.

    Curtis

  5. #5
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    727
     

    Default

    Thanks for the info and continue to send it through.

    Shame 2.79 doesn't export the cycles materials as this was my setup using all channels of the one parameters texture that seemed to work (at least in blender).

    Attached Images Attached Images
    Last edited by n3vpolsen; February 8th, 2018 at 06:28 PM.

  6. #6
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,547
    Blog Entries
    30
     

    Default

    Quote Originally Posted by n3vpolsen View Post
    Thanks for the info and continue to send it through.

    Shame 2.79 doesn't export the cycles materials as this was my setup using all channels of the one parameters texture that seemed to work (at least in blender).

    ...

    Interesting. I hadn't seen your post and I did look at the separate RGB converter node today but discarded it. Having looked at your example, its given me a couple of ideas that I will try out over the weekend.

    Paul


  7. #7
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,547
    Blog Entries
    30
     

    Default

    For all: please have a look at this post by Cayden in the CC forum.

    Cayden's workflow is somewhat similar to what I've been playing with but in a Mac environment, which is useful, and using different tools. I assume these are Mac specific.

    Paul


  8. #8
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,547
    Blog Entries
    30
     

    Default

    Quote Originally Posted by n3vpolsen View Post
    ...
    Shame 2.79 doesn't export the cycles materials as this was my setup using all channels of the one parameters texture that seemed to work (at least in blender).
    ...
    I looked through the Blender exporter code and discovered that materials that use nodes (i.e. Cycles) are ignored. The material is identified but not much else. My test exports out of Blender and into TRS18 resulted in plain grey assets.

    So, I did a little Google research and discovered this Blender Stack Exchange article: https://blender.stackexchange.com/qu...ls-or-textures This question has been asked many times before.

    From what I've seen elsewhere, I gather most just export the mesh, the UV maps, and some other maps, and use those in Unreal Engine or other products. This is basically the conclusion I came to the hard way!

    If you don't have Substance Painter, then I think there is value in using the Cycles mapping as shown by Paul in post #5 since it will give some visual feedback. I suggest it may be possible to modify that layout to have the parameters texture channels as separate 8 bit files. That way it may be easier to tweak individual channels to see the effect on the rendered mesh. It may not be exactly the same as TRS18 but I think it worth a try. I'm working on a test case.

    Note that to export in FBX for Trainz purposes, the render mode will need to be switched to Blender Render and the materials and textures re-added.

    It might be handy if N3V came up with a metadata format that can identify the textures associated with a material and their usage.

    Paul


  9. #9
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    727
     

    Default

    New feature for you to play with should be in an upcoming build

    http://www.trainzportal.com/blog/vie...lling-software

  10. #10
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,547
    Blog Entries
    30
     

    Default

    Quote Originally Posted by n3vpolsen View Post
    New feature for you to play with should be in an upcoming build

    http://www.trainzportal.com/blog/vie...lling-software
    My request was a bit TIC but maybe you guys had the same idea. Anyway, it should make life easier.

    Did you see my e-mail of a couple of days back?

    Paul


  11. #11
    Join Date
    Nov 2006
    Location
    United Kingdom
    Posts
    1,110
     

    Default

    Quote Originally Posted by n3vpolsen View Post
    New feature for you to play with should be in an upcoming build

    http://www.trainzportal.com/blog/vie...lling-software
    This is really exciting news. Does this mean that the Blender material configuration is pretty much irrelevant, so long as it's correctly named? I'm asking because I've been wondering if it would be possible to configure the cycles material so that the parameters map is pulled together from three separate greyscale images, representing each channel of the RGB of the final parameters texture, and then use a node to combine these into the final texture. This might allow manual painting, either in Blender or in an external image editor, of each channel, without the need for a separate tool?

    Haven't had time to experiment yet, but thought I'd share the idea in case someone wants to try it.

    R3

  12. #12
    Join Date
    Nov 2006
    Location
    United States of America, Michagain, Berkley
    Posts
    5,564
    Blog Entries
    6
     

    Default

    My only separate tool is Photoshop and have not looked at cycles material.

  13. #13
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,547
    Blog Entries
    30
     

    Default

    Quote Originally Posted by rumour3 View Post
    This is really exciting news. Does this mean that the Blender material configuration is pretty much irrelevant, so long as it's correctly named?
    Some of the Principled BSDF material factors, not provided by texture inputs, may be exported as well. Whether TRS18 uses them is another matter.

    Quote Originally Posted by rumour3 View Post
    ...

    I'm asking because I've been wondering if it would be possible to configure the cycles material so that the parameters map is pulled together from three separate greyscale images, representing each channel of the RGB of the final parameters texture
    Yes, you can do that and it's also possible to use RGB inputs to the material to simulate plain greyscale values to inputs such as roughness, metallic and emissive. That way you can play with values to see the effect when you don't care if the mesh has the same degree of roughness, etc.


    Quote Originally Posted by rumour3 View Post
    ...

    , and then use a node to combine these into the final texture. This might allow manual painting, either in Blender or in an external image editor, of each channel, without the need for a separate tool?
    I assume you mean to paint individual parts of the mesh with a greyscale color and then save the image as a roughness or metallic map? You would still need a tool to combine those maps into a single parameters texture. I don't know of any Blender tool that would do that - but I'm still looking.

    Paul


  14. #14
    Join Date
    Nov 2006
    Location
    United States of America, Washington, Seattle
    Posts
    3,366
     

    Default

    To allow manual painting (or procedural materials, or different materials applied to different parts of the UV map), you'd need a way to burn the result to a series of bitmaps. That appears to only be partially implemented in Blender at the moment; at least when using the Principled BSDF shader. The diffuse channel only burns for non-metallic materials. The metallic and roughness channels don't appear to be 'burnable'. I suspect there are ways around this, like moving the roughness to the diffuse input and treating it like a color, but this would be a bit of a pain.

    I hope this makes sense?
    Curtis

  15. #15
    Join Date
    Nov 2006
    Location
    Canberra, Australia
    Posts
    8,547
    Blog Entries
    30
     

    Default

    Yes. I was trying something like that yesterday and achieved nothing. The results were not remotely like I was expecting.

    The thinking behind my earlier answer was to create the burned textures while not using Cycles. i.e. running two Blender versions of the same mesh - one in Cycles and one in Blender Render. Within the BR version, you create a possible roughness texture, for example, burn and write to disk, and then refer to that texture in the Cycles version. It's a bit clumsy but maybe a better method will come to light eventually.

    There has been quite a lot of discussion on Principled BSDF in the Blender forums. Perhaps there is something out there we can use.

    Paul


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •