Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[Infinity Series] PBR Tools including "PBR Conversion" to convert any Legacy Texture to Unity5 PBR!

Discussion in 'Assets and Asset Store' started by infinitypbr, Oct 10, 2015.

  1. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    PBR Tools is a set of tools designed to help developers work with PBR as well as use PBR features with legacy materials using the flagship tools "PBR Converter" and "Texture Changer".


    PBR Converter
    This will allow you to convert any of your legacy textures to PBR textures. The big benefit is that it works with multiple texture types at once. Many of the Asset Store models you already have and love include texture atlases with multiple materials types, like Leather, Stone, Wood & Metal. With this tool, you'll be able to use image maps to separate the types and assign metallic/roughness values to each. It does require you to create a Color ID map in Photoshop or another image editing program, but once you do that, you'll be able to use sliders and check boxes to set up the Metallic and Roughness values. The script will also create AO & Height maps from the normal map!



    Texture Changer
    Now you can change individual textures on your legacy models! Up to 16 different sections of your model can be isolated and adjusted, or replaced entirely with brand new materials. Works with PBR and Non-PBR materials!

    Potential Use Cases: Replace the metal in a sword you have from the Unity Asset Store with a brand new metal, or with wood, or something else. Change the skin tone of your models. Continue using your previously purchased Asset Store models with modern PBR models from our Infinity Series!

    Combine Metallic Roughness
    If you happen to have a metallic map and a roughness map, and want to use it in the Standard Shader, you can't! This is because Unity (smartly so), expects the roughness values to be in the alpha channel of the metallic map. This tool has an input for the two maps and will export a properly inverted (Unity also expects the roughness map to be inverted -- we'll do that for you!) "Metallic Roughness" map which can be used in the Standard Shader.

    Combine Albedo Opacity
    Similar to the Metallic/Roughness, Unity expects the opacity map to the in the alpha channel of the albedo (aka diffuse aka base color) map. This tool will help combine two input maps into one "Albedo Opacity" map that you can use in the Standard Shader. (Just select "fade" or "transparent" at the top of the Shader options). With this, you could even add holes in floors for many of the models you already own!

    RUNTIME: Color Blender
    This is a runtime optimized feature. It allows you to blend a color with your material via code. There are four blend types to choose from (Copy, Multiply, Overlay & Additive). Via code you can change the blend type, the blend amount & the blend color. Perhaps the closer your player gets to this object, the brighter the blend color? There are many ways to use this.


    RUNTIME: Color Modifier
    This is a runtime optimized feature. Similar to the Color Blender, this allows you to change the Hue, Saturation, Lightness & Contrast of your albedo texture at run time. With it you could fade between saturated and desaturated, change the hue, or do many other things, all via code while the game is running.




    There are more things I could add, if you have any idea of things you may like to have! Let me know! Let me know if these would be useful to you as well!
     
    Last edited: Jun 30, 2016
    fernandobraz and Gozdek like this.
  2. Gozdek

    Gozdek

    Joined:
    Jun 21, 2015
    Posts:
    356
    Very nice.
     
    infinitypbr likes this.
  3. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Thanks!

    Next version should have a really powerful Normal->AO baker with sliders to adjust the intensity of it all.
     
  4. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    I decided to pull the review to add a KILLER new tool called "TEXTURE CHANGER".

    Seriously cool -- this tool works with PBR and Non-PBR materials, and lets you selectively change the actual texture itself. If you have any other texture, perhaps one of the PBR textures you can create using our Base Material Generators from the Weapons & Armor PBR Pack #1, you can switch out whatever texture your material uses with the new ones!

    You can also adjust the Hue, Saturation, Lightness & Contrast of your material, and even adjust the roughness value and add an overlay color.

    In the example below, we took the PBR Converted version of Ethan and changed his suit to a Silver metal. For the various parts, we adjusted the roughness so it wasn't as shiny as actual silver and added overlay colors. We didn't change the texture on the skin or hair, but adjusted the colors to change the character completely.

    Find it when PBR Tools is launched!

     
    Last edited: Jun 30, 2016
  5. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Added video showing the Texture Changer!

     
  6. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Last edited: Jun 30, 2016
  7. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
  8. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,027
    Super cool asset

    Are produced shaders in one custom shader file or use the Unity standard shader structure ?
     
  9. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    It doesn't actually use a custom shader -- it's a workflow I designed using substances, and it exports into Standard Shader materials.

    The only thing the user has to do besides adjust sliders for the effects is build a Color ID map for whatever texture you're using, since there's really no way for anyone to dynamically create one for you -- at least not accurately to the various "materials" on a model.

    I'm trying to figure out how to set up my server to verify purchases, so that users can upload Color ID maps for popular items on the asset store, and download as well, to speed up the process. No doubt many people who have bought environment packages from a particular Polish artist would appreciate being able to use them in Unity 5 :)
     
  10. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,027
    I get it now. So would it be possible to assign the parametrers using a property, like a color range for example, than a texture based color ID ?

    e.g. apply bumpy shiny property to black or grey color and leave the rest
     
  11. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    If I'm getting what you're asking, then yes.

    The system allows up to 16 colors -- they're preassigned values. (white, red, green, blue, yellow etc). If something is not one of those colors, then it shouldn't be affected at all by any changes. And of course you don't have to change anything.

    I'll have to double check to see if something happens when the color value is close, but not exactly, the value required (like an almost-white) -- would it just not be affected, or be partially affected. I think I can make it so that it's partially affected, so that you may be able to get more smoothed changes.

    Ultimately the main point isn't to have much gradient between sections -- a shield is usually Wood & Metal, not a blend between the two, for instance. But it could be an option for uses I haven't thought of.
     
    nasos_333 likes this.
  12. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    7,027
    Ok, seems very nice and controllable. Cant wait :)
     
  13. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    563
    Bought this today and did a test run. However when I'm trying to Save the textures (using the menu item under Windows) I'm getting this error
    Code (CSharp):
    1. AmbiguousMatchException: Ambiguous matching in method resolution
    2. System.Reflection.Binder.FindMostDerivedMatch (System.Reflection.MethodBase[] match) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/Binder.cs:106)
    3. System.MonoType.GetMethodImpl (System.String name, BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/MonoType.cs:245)
    4. System.Type.GetMethod (System.String name, BindingFlags bindingAttr) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/Type.cs:787)
    5. SFB_Exporter.SFB_Export (UnityEditor.SubstanceImporter substanceImporter, UnityEngine.ProceduralMaterial[] substanceMaterials, System.String basePath, UnityEditor.SubstanceArchive substance, System.String code) (at Assets/SFBayStudios/Editor/SFB_Exporter.js:16)
    6. SFB_SaveTexture.SaveTexture () (at Assets/SFBayStudios/Editor/SFB_SaveTexture.js:23)
    I'm using Unity 5.2.2p1 Pro on Windows 10.
     
  14. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    EDIT: Looks like the bug (there was a bug in 5.2.2) has been fixed, but in the process, they changed some stuff behind the scenes so my script is throwing errors! [MESSED UP! :D]

    I'll update the script and paste it here.

    FOR NOW: Use the gear icon in the top-right of the inspector (when the top-level material is selected, it's the 2nd gear icon down), and export the bit maps manually. YOu'll have to create a material and populate the maps into the material.
     
    Last edited: Oct 25, 2015
  15. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    563
    Ok, looks like I have to wait for the next patch then as downgrading isn't an option for the project.
     
  16. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Just updated the post above. I figured I should check it out, since they did say 5.2.2p1 it'd be fixed. It is, but things got changed behind the scenes so my script is broken at the moment.
     
  17. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    563
    Suceeded in exporting the textures and assigning a new material using those to my character. Works like a charm ;). Thanks for the great support.
     
    infinitypbr likes this.
  18. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Cool! hooefulky I will have a fix for the script soon, too
     
  19. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    563
    Hmm seems like I'm encountering an issue with the TextureChanger tool: I created my colorID masks and everything works fine until I'm at slot Custom 6. When I'm assigning the textures everything is still fine but when I'm checking the Main Customs 6 [0,255,255] the material turns completely black where the mask color should be assigned. Note I'm not setting any Hue, Saturation, Lightness, Overly settings for the section 6. This seems to be only the case for that item. Any idea what can be wrong?

    EDIT: Nevermind, when I'm assigning everything for section 7 then the dark skin goes away. No idea what happend though but a non issue for now. Thanks.
     
    Last edited: Oct 26, 2015
  20. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Unity likes to re-bake the data every so often, sometimes seemingly at random time.s Do you think that's what was happening? I'll check out the graph on it, however, to see if anything is mis-connected.

    UPDATE: I wasn't able to replicate this -- I used the demo TextureChangerb material (the one w/ the green suit on the character). I was able to replace the material with the demo metal.

    One thing, the area will appear black until the inputs are set with the new material, so double check that the correct section had the inputs.
     
    Last edited: Oct 26, 2015
  21. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    563
    Thing was I had 7 colorids for my material. All texture slots are empty for all sections. I assigned those texture one colorid at a time (while tweaking the visuals). Everything went ok until I filled in those texture slots for section 6, the material for colorid 7 turned black (only when checking Customs 6 in the main section though). Assigning textures to the slots for section 7 fixed it but strange not all unassigned materials (colorids sections) turn black in such a case to begin with.

    Nevertheless maybe a simple flow in my workflow: instead of assigning textures and tweaking the settings section by section I have to first assign all textures on all slots before proceeding.
     
  22. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Our "Auto Exporter" is a very helpful tool for exporting the textures you create. It automatically exports them and sets them into a new Standard Shader material.

    However, Unity had a big bug in 5.2.0 that was fixed in 5.2.3f1. Any of those in between versions won't work at all -- nothing I can do about that since it's a Unity bug.

    The fix, though, changed the behind-the-scenes code and me being not the best coder, needed help to fix it. It's bene fixed!

    There's a new version that will only work in versions 5.2.3+ to go with the script that only works in versions before 5.2 (but NOT 5.2.0)

    If you log in at www.InfinityPBR.com (no purchase required, just log in, if you want to use the script with Substance files that aren't ours ,go right ahead), you can download the new scripts. I suggest removing the version you're not using, so that the hot key works without issue (they're both set to the same hot key).

    All of our packages will be updated in due time with it too.
     
    S4G4N likes this.
  23. plyrek

    plyrek

    Joined:
    Mar 2, 2015
    Posts:
    13
    Hello,
    I am running into problems with the CombineMetalRough tool. I am getting the following error whether or not I click on Save Texture 5.2.3+ or I just click Save Texture.
    Here is the error:

    NullReferenceException: Object reference not set to an instance of an object
    SFB_Exporter_5_2_3.SFB_Export (UnityEditor.SubstanceImporter substanceImporter, UnityEngine.ProceduralMaterial[] substanceMaterials, System.String basePath, UnityEditor.SubstanceArchive substance, System.String code) (at Assets/SFBayStudios/Editor/SFB_Exporter_5_2_3.js:41)
    SFB_SaveTexture_5_2_3.SaveTexture () (at Assets/SFBayStudios/Editor/SFB_SaveTexture_5_2_3.js:24)

    I maybe doing things wrong. There is not a video on this tool on your site. Do you need to add the CombineMetalRough Material to a model's element list like you do with the TextureChanger? Do you use the Save Texture function when on the material or the parent of material.. Also each time I run the Save Texture thing and get the error it appears an entirely new folder for CombineMetalRough is being created with a new version number. I am obviously doing something wrong.
     
  24. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    What version are you in? The export script doesn't work in 5.3.4 unfortunately.

    Try exporting manually:

    (1) Ensure "Compute All Outputs" is checked.
    (2) In the top right of the inspector (with the circle material selected, close to the top right if the top-level material is selected) click the small gear icon and choose "Export Bitmaps" (either option will be fine, if there are two)

    You can choose where you want the files to save, but that should work.
     
  25. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    since there wasn't a tutorial on it already, I made one!

     
  26. plyrek

    plyrek

    Joined:
    Mar 2, 2015
    Posts:
    13
    Thank you.
     
  27. plyrek

    plyrek

    Joined:
    Mar 2, 2015
    Posts:
    13
    I am using 5.4 as I am working in VR and it is required. Can we expect an updated version soon?
     
  28. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Is the export not working in 5.4? I'll check it out -- it's hard to fix things for beta releases because they change things so often. Most publishers (myself included) stay away from it because it just creates more work. But I'll check it out.

    There is supposed to be some big update for the .sbsar files in 5.4, making them faster and "public".
     
  29. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    286
    Kia ora

    I just brought this, trying to get my head round substance Designer and Substance Painter and getting getting exported materials into Unity, looking to get an Elder Scrolls look to my project. The idea was keep my ole head active, theres times when I feel I'm burning it out faster <grin>. Anyhow!

    I see in your tutorial that you using red green blue colour references to place colour in the correct place. Whats the chances of me when I export a terrain from World Machine (using the UE4 macro allows High, Mid and low splatmaps) using those splatmaps to mask the textures for say rack, grass and dirt. I could then try learn to make some rock, grass and dirt/sand substance blends in Substance Designer with the parameters exposed to give me control over shifing and blending terrain textures. Digging myself one hell of a hole to work my way out off, this for me will be a large learning curve if I can get it working
     
    infinitypbr likes this.
  30. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Hello!

    I don't have any experience with world machine, but from what it sounds like it *may* work. If you open the .sbsar files in Substance Designer, you can see how I set up the graph.

    Basically the colors are for a Color ID map, and allow SD to use separate custom inputs or modifications for just those areas. If your terrain is a single texture map, then it should act the same way as a character texture map would, I think.

    I'd be very interested to see the results you get. Feel free to ask questions -- I may not always have answers, but I'll do my best!!

    Andrew
     
  31. Kiwi-Hawk

    Kiwi-Hawk

    Joined:
    Jul 17, 2015
    Posts:
    286
    Kia ora

    yell if you want a set of files eg a height map and matching out put maps to have a play with so you can be better informed, a can bundle you somit or at the very least you'd know what folk are on about lol
     
  32. imgumby

    imgumby

    Joined:
    Nov 26, 2015
    Posts:
    102
    Looking to purchase this once it's compatible with at least 5.3.5....tired of buying assets that are full of frustrating errors and busted due to Unity constant changing :(
     
    infinitypbr likes this.
  33. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    I'd be tired of that too -- but it should be compatible 5.3.4+.

    There are updates I've got on my roadmap, but the package as is should work just fine.
     
  34. Chrysto

    Chrysto

    Joined:
    Jun 28, 2016
    Posts:
    15
    any test on 5.6 already ?
     
    infinitypbr likes this.
  35. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Not specifically, but I don't think anything has changed in 5.6 with the sbsar workflows
     
  36. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,257
    Can this tool convert Metal standard shader maps into Specular work flow maps?
     
  37. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    Hmmm.... The only difference is that the "roughness' portion is inverted is that correct?

    I'd have to think about it. If that's it then it would be easy.
     
  38. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    406
    Ive been kicking around the idea of picking this up for a while now.. Is it still in java, if so any plans on converting to c# in the future.
     
  39. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    2,641
    All of the tools are .sbsar files, basically substance designer graphs designed to do whatever the tool does. There may be some .js files, but none that would have any impact on a game, I'd think.