Search Unity

Import Materials from 3ds Max via FBX - what supported properties???

Discussion in 'General Graphics' started by newguy123, Aug 13, 2019.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Hi guys

    I'm trying to import a model from 3ds Max that has standard materials applied, however only the diffuse textures and values are coming in. None of the glossy, bump etc are coming in. What am I missing?
     
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    https://docs.unity3d.com/2017.4/Documentation/Manual/HOWTO-ImportObjectMax.html

    "
    1. Meshes with vertex colors, normals and one or two UV sets (see below).
    2. Materials with diffuse texture and color. Multiple materials per mesh."
    Thats all that will import with it by default.

    And then from here:

    https://docs.unity3d.com/2019.2/Documentation/Manual/HOWTO-importObject.html

    "Note: You must store Textures in a folder called Textures, placed inside the Assets
    folder (next to the exported Mesh) within your Unity Project. This enables the Unity Editor to find the Textures and connect them to the generated Materials. For more information, see the Importing Textures documentation
    ."

    And then you can read more here:

    https://docs.unity3d.com/2019.2/Documentation/Manual/ImportingTextures.html

    and here:

    https://docs.unity3d.com/2019.2/Documentation/Manual/class-TextureImporter.html

    But in general the textures are not going to all just come in automatically and perfectly from max or maya. You need to create unity compatible versions of your maps and most likely bring them in manually. Some stuff will link up but most wont. This is because the unity shaders are different from the ones in most DCC programs, and each DCC will have its own shader.

    Most people tend to do texturing in a texturing app like substance painter anyway, which will output unity compatible versions easily and can convert easily

    Then you can write a custom importer / processor that can look for bits in names and auto hook them up.

    Thats what we do, we export with specific naming convetions and then unity automatically hooks everything up, creates materials, sets texture import settings, creates prefabs etc all automatically.

    You can read up on this here:

    https://docs.unity3d.com/Manual/ScriptedImporters.html

    https://docs.unity3d.com/ScriptReference/AssetPostprocessor.html
     
    newguy123 likes this.
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Thanks for the info.

    In the Architectural Visualisation World however, we dont paint that much stuff, compared to a gaming studio for example. All our stuff is V-Ray materials, and I have a script to convert them to standard, but then as I mentioned, only the diffuse comes in.

    Would be awesome if I can simply script something to read the 3dsMax VRay values into a json or similar, then in Unity just script something that will take my json and make a new fresh material and hook everything up for me
     
    Elviz_3D likes this.
  4. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    What I was talking about is not to do with painting. Substance painter a lot of the time is about applying procedural materials or tiling materials, exactly as you are talking about.

    V-Ray materials are not supported by default in unity, you need to convert them. Your better off asking in V-Ray forums in that case.

    We are not a gaming studio btw but also do arch vis and sim vis. So the pipeline I detailed above directly applies to you. Sorry if you thought I was talking about gaming.
     
    newguy123 likes this.
  5. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Already asked the question on chaos forum, without a satisfying solution.
    Point I was making is that we have tons of assets already made and we're not about to subscribe to yet another cost such as substance or quixel, cool as those tools may be.

    Ideally a datasmith (like unreal's) solution would be cool for Unity, but alas I've been asking that and it's also falling on deaf ears.

    I'm very interested in your workflow then. Could you provide some more details please on how to bring vray (3ds max) stuff into Unity? Manually recreating materials is something I'm NOT interested in, as our typical scenes have more than 100 different materials from plants to merchandise, not to even mention the building and interiors itself.
     
  6. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Well normally you would research this first? Why did you go and create hundreds of things before knowing if your pipeline works?

    Its standard in any studio to trial the pipeline first, you dont leave this stuff till the end.

    You may have to wait for someone else to answer as I am not that profiecient with VRay, also doing this manually would be the main way I would rectify it as youve already raced ahead and caused yourself some problems, and writing some auto tool just to get you back to where you should be in terms of Vray < > unity will take similar if not longer amount of time than spending a day or two dragging in assets by hand and relinking materials.

    If you dont want to spend on a solution, your going to have to look into the differences between vray and unity and then write your own editor script to convert and import from one to another.

    Next time to save yourself this kind of headache, trial your pipeline first. Create a final quality asset and bring it into unity and do a build. If you cant get from beginning to end of pipeline with a single asset, racing ahead making tons more will cause all sorts of issues.

    EDIT: anyway the point I was making about introducing a 3rd party app like substance is you can then convert any texturing done in it to VRAY, Unity etc etc with a single click. Even if you change engine or renderer 2 years later youll be able to single click rexport in correct format. By not using a texturing app as the intermediary, you have lost a lot of that control over switching between engines, renderers, shaders etc.

    https://forums.chaosgroup.com/forum...-how-do-you-deal-with-your-vray-max-materials
     
    Last edited: Aug 13, 2019
    newguy123 likes this.
  7. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    You're not understanding the situation. We've been using traditional "rendering" for many years. Over that time, we built up a VAST library of materials, models, assets etc.

    We are only now starting to use realtime. Not "instead of" traditional rendering, but rather as a complimen t to it. We would still need to create very high end renders, while at the same time creating realtime apps (AR/VR etc) of the same scenes, for other use cases. Having something that can bring you close to the original traditional rendering is the goal, even though we understand you will unlikely get 100% of they way.

    To manually recreate everything we built up over many years will take forever, but a companion tool to convert stuff on the fly while we run various components of the projects in parrallel, would be awesome.
     
  8. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    No, I get that.

    Im saying if you want to do that alongside realtime, then substance painter or similar is your friend.

    I dont think I made this part clear:

    You DONT need to recreate everything to get it into substance. You can import your Vray stuff ,and then convert it within there and export again. No need to remake everything. Thats why I am suggesting it.

    That is what I was trying to say, if you dont want to remake, get substance. If you dont want to do that, then prepare to remake everything at least to some degree.

    So me suggesting substance, and others doing the same in Vray forums is because it really is the answer to what you seem to want. It also comes with scripting API and automation toolkit so you can literally batch process a ton of your stuff (all of it even) just as you say you want to do.

    Sorry but I am not sure how else to solve what your trying to do if your unwilling to get the tool that literally does what you asked for. Maybe others can help you with a free solution, but this is how I would convert hundreds of already created Vray assets.
     
  9. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Ah ok, now I understand. I was under the impression the substance conversion is only 1 direction, ie substance to vray. I didn't know you can go vray to substance!

    Seems we will have to bite the bullet reluctantly, and subscribe to yet another software package
     
    MadeFromPolygons likes this.
  10. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Try the 30 day trial first!

    Also I suggest you post on the substance forums to ask for some more in depth info on how to best use their software for your purposes, they will be able to give you a step by step process. Then you can assess if it is what you need ,or if another software package will make it easier for you.

    But you can definately get Vray materials into substance, and back out. I just do not know how fiddly this is to do as I myself do not use Vray anymore. It could be that you need to put all the textures into a certain folder, named a certain way. Certainly it can be automated, depending on how well you are able to code. The substance automation toolkit could be an easier route than coding however

    https://www.substance3d.com/products/substance-automation-toolkit
     
  11. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    You switched to Corona, FStorm, or Redshift?
     
  12. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,983
    Nah since blender 2.8 the updates to cycles meant that with correct settings, the difference between Vray and Cycles was not really visible to our clients (for our purposes, your mileage may vary). After consulting them, we moved to blender cycles and havent really had any visual difference in quality, yet get the ease of also having eevee so setting up renders is super quick. Once we are happy with render we switch to cycles and render overnight.

    Iteration time wise we save about 60% of time using this method. The nice thing is Vray provides a rendering node for blender so if we ever need to go back its not such an issue (and with substance we just export back out to whatever, using Vray preset or cycles preset or unity etc etc).
     
    newguy123 likes this.
  13. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Did you solve this? I found a VRAY to standard converter here, http://www.scriptspot.com/3ds-max/scripts/v-raymtl-converter (costs money unfortunately)
    it works for some files (appears to convert everything to standard, and looks good in max) but I still have many left grey, they all seem to be named "map", just wondering how to also get these to work so I can view the model in unity properly.
     
  14. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    In newer Max versions, there's a built in converter from VRay to Physical Material. Your milage may vary but at least those materials look better than standard, and they can be imported into Unity also, again, your milage may vary.
     
    radiantboy likes this.