Search Unity

Substance answers !

Discussion in 'General Discussion' started by Jerc, Apr 20, 2011.

Thread Status:
Not open for further replies.
  1. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    No it should work the the same way, simply drag and drop your substance materials on the Mesh Renderer inspector slots and it should work as expected.
     
  2. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    When Unity bakes a substance for iOS player, can you get a bitmap or debug the output? I'm seeing in Editor.log it's baking a 9KB substance (supposedly @ 512x512 compressed) into a 9MB texture

    Used Assets, sorted by uncompressed size:
    9.4 mb 51.3% Assets/Textures/Substances/Old_Painted_Planks.sbsar

    Fromt that size I assume it's making all 7 bitmaps of uncompressed/raw image :(

    I guess I could just use the Substance player to do Export As Bitmap- then I would have total control over the baking output. Just wondering if anyone is using Unity substances baking to iOS and how it's been working.
     
  3. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    We are aware of the issue and in 3.5, substance will only generate and bake the outputs you actually use. I'm not sure about the compression though, I'll check.
     
  4. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    I was hoping procedural Subtances for iOS and Android was coming in 3.5 :(
     
  5. reissgrant

    reissgrant

    Joined:
    Aug 20, 2009
    Posts:
    726
    Great information @Jerc, thanks for posting! Bookmarked!
     
  6. wlad_s

    wlad_s

    Joined:
    Feb 18, 2011
    Posts:
    148
    Is it me unable to find it or are these forums missing an option to search throughout the thread? I'm trying to find if Substance Designer can export relief maps (normal+height as alpha) fast and easy. So that would be my question :)

    My idea was to search this thread for the word "relief" but I couldn't find that option :(
     
  7. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    @uberwleiss, I don't think Designer can do that. However with Player (the free tool) you can export from substances to bitmaps. Not sure if you can get the relief map you want. But it's free so you can try it. You can also ask the question here http://www.allegorithmic.com/community b/c it's a 3rd party product. Although the Allegorithmic people are pretty active on Unity forums too.
     
  8. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Normal maps in Designer or Bitmap2Material are created from height maps, and when creating a normal map in Designer, the corresponding height is automatically placed in the normal map's alpha channel.

    Bitmap2Material outputs a height map in a separate texture but in Unity when you set your substance material properties you can combine them and use it as the normal map alpha too, then use your shiny new textures with your own custom parallax or relief mapping shader :)
     
  9. CUBICcube

    CUBICcube

    Joined:
    Oct 10, 2009
    Posts:
    3
    Are Substance materials supported in Unity 3.5 Flash export? all I'm getting are blank materials when I run my Flash build.
     
  10. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Make sure you have the latest release of 3.5 as the Flash support was added pretty late. It might not work if you are using a beta version.
     
  11. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Any update? Does it run on IOS yet?
     
  12. twiesner

    twiesner

    Joined:
    Oct 4, 2011
    Posts:
    309
    I have it working on Android now since unity 3.5 released so it should work on ios.
     
  13. dimitar

    dimitar

    Joined:
    Mar 12, 2012
    Posts:
    4
    We have an issue with the textures

    They are showing up properly in the unity editor and the game runs , but when we make a build (web player) the textures are corrupted or objects are using some random textures

    Any idea what could cause this ?
     
  14. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    You probably unchecked "Generate at Load" in your substances parameters. If you uncheck it, the substance will only generate if you tell them so through a script, and will display some random stuff until you tell them to generate through ProceduralMaterial.RebuildTextures();
     
  15. dimitar

    dimitar

    Joined:
    Mar 12, 2012
    Posts:
    4
    All of the "Generate at Load" are checked ..any other ideas ?

    We are using the Bitmap2Material form Sep/2011
    Do we need to update ?

    We are also using substances in asset bundles
     
    Last edited: Mar 13, 2012
  16. DigitalGlass

    DigitalGlass

    Joined:
    May 12, 2009
    Posts:
    88
    I'm getting "invalid procedural material" when I try to instantiate a prefab with a substance material from an asset bundle. The substance will load when I check "Generate at Load", but I will still get "invalid procedural material". When I don't have it checked, I only see a blue material, and calling RebuildTextures() does nothing.

    I've tried this with our own custom substance, and also with the substances used in airstream, and I get the same problem each time. Has anyone else tried using substances in asset bundles?
     
  17. dimitar

    dimitar

    Joined:
    Mar 12, 2012
    Posts:
    4
    I did same result: "Invalid procedural material"
     
  18. jhillery

    jhillery

    Joined:
    Mar 13, 2012
    Posts:
    3
    After experimenting with substances + asset bundles a bit more, you will receive the "invalid procedural material" error in the inspector when loading a substance from an asset bundle, but the substance is still fully modifiable through scripts programmatically. This is good enough for our uses... the error was a little unsettling to see though. :)
     
  19. dimitar

    dimitar

    Joined:
    Mar 12, 2012
    Posts:
    4
    substance.RebuildTextures();

    Did the trick for me

    ..but it is obvious that there is a bug if you use asset bundle and substance textures
     
  20. greg767

    greg767

    Joined:
    Nov 6, 2009
    Posts:
    113
    Hey guys,

    Is it possible to create materials with the substance designer that look unique, like procedural materials in Cinema4D (or any other designer)? This would be to get as close as possible to architectural interior renders where there is no tiling effect visible when looking at furniture, floors, carpet, etc.
    Basically like those smart tiles.
    When I get a texture and use it in B2M the tiling effect is visible.

    Thanks
    Greg
     
  21. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    We don't do implicit procedural texturing like in C4D. However, the filter allowing to transform any image into a smart tile is currently being patented and once we get the approval, it will be available on the asset store.
     
  22. greg767

    greg767

    Joined:
    Nov 6, 2009
    Posts:
    113
    Thanks for the explications! Do you happen to know in what timeframe that could happen? Weeks/months/years?
    Also I cannot get the info about the discount for Unity Pro users. I have an account at your website but when I put the product in the cart I am never asked whether I am a Unity user or not.
    All this is just to be able to evaluate whether to take advantage of your current offer that lasts until the 20th of march or with the unity pro discount I will be able to have access to a better pricing anytime.

    thanks
    Greg
     
  23. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    THe Unity Pro discount allows you to get Substance Designer for 595$, the GDC discount allows you to get Designer + B2M + 250 substances for 690$.

    If you want to use the Unity Pro discount, you need to send us your Unity invoice through this contact form and we will send you the coupon code: http://www.allegorithmic.com/company/contact
     
  24. Liatti

    Liatti

    Joined:
    Mar 21, 2011
    Posts:
    63
    Following the success of the GDC package and as requested by the community, we are prolonging this offer up to March 23st (end of the week). Those are the last days to benefit from it for everybody :)
     
  25. greg767

    greg767

    Joined:
    Nov 6, 2009
    Posts:
    113
    Yeah I did get my copy as well. What are the limitations on selling assets with home brewed substances?
     
  26. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    For now you can sell your substances only if they are part of a larger package (with a mesh or a scene). You can't sell substances alone.
     
  27. greg767

    greg767

    Joined:
    Nov 6, 2009
    Posts:
    113
    Okay thats what I meant by asset, a mesh or a scene. So thats fair enough. Thanks.
     
  28. SeanP

    SeanP

    Joined:
    Feb 27, 2011
    Posts:
    38
    I am having issues with "Generate on load" I load into the scene, have blue textures, then things start popping in. Using Substance Designer 2.5, and Unity 3.5

    Any help would be great, sadly documentation for substance is really lacking.
     
  29. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Everything you need is in here :

    http://unity3d.com/support/documentation/ScriptReference/ProceduralMaterial.html

    The "generate on load" tick only affects the first scene you load.
    For the other scenes, you should call RebuildTextures or RebuildTexturesImmediately during the loading screen for example and only display the scene when isProcessing returns false on all substances.

    You should also set the substanceProcessorUsage to "All" so it uses all the available CPU power to generate faster (by default, the generation uses only one CPU core)
     
  30. SeanP

    SeanP

    Joined:
    Feb 27, 2011
    Posts:
    38
    Thank you very much Jerc!
     
  31. Harabeck

    Harabeck

    Joined:
    Mar 27, 2012
    Posts:
    10
    And how do you suggest getting the list of ProceduralMaterial objects?

    FindObjectsOfType(typeof(ProceduralMaterial)) as ProceduralMaterial[];

    ...returns nothing.
     
  32. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    This should work :

    (ProceduralMaterial[])Resources.FindObjectsOfTypeAll(typeof(ProceduralMaterial));
     
  33. Harabeck

    Harabeck

    Joined:
    Mar 27, 2012
    Posts:
    10
    Thanks, Jerc. That does answer may question, although it only works with this syntax: Resources.FindObjectsOfTypeAll(typeof(ProceduralMaterial)) as ProceduralMaterial[];

    However, this hasn't resolved my overall issue (preventing the player from ever seeing the blue incomplete textures). Right now, I have three scenes: Station, Loading, and Sector01 . The player will start in Station (which has no procedural textures at the moment), then click a button to go out to space, the button calls LoadLevel("Loading"). Loading (which is essentially an empty scene) takes over and calls LoadLevelAsync to load Sector01 . At no point can Loading detect the materials. Another script in Sector01 can, but only after a few frames have gone by (judging by debug print outs in the update of a script). So, I have no chance to use a loading screen to cover up the loading of the materials. In fact, even though "Generate on Load" is checked for all materials, I still see the blue incomplete textures if I load up Sector01 directly from the editor.

    Any suggestions?
     
  34. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    A script that takes an array of procedural materials and in it's Start method runs RebuildTexturesImmediately on each of them?
     
  35. Harabeck

    Harabeck

    Joined:
    Mar 27, 2012
    Posts:
    10
    Something like this?

    if(!rebuiltTextures)
    {
    mats=Resources.FindObjectsOfTypeAll(typeof(ProceduralMaterial)) as ProceduralMaterial[];
    Debug.Log("TestMaterialLoad Found "+mats.Length+" procedural materials.");

    if(mats.Length>0)
    rebuiltTextures=true;

    foreach(ProceduralMaterial pm in mats)
    {
    Debug.Log("rebuilding texture: "+pm.name);
    pm.RebuildTexturesImmediately();
    }
    }

    It has to go in Update() (thus the boolean to stop it) because if I do it in Start() nothing is returned (It usually runs for two frames before finding them). The result of this code, whether I load it up from another scene or directly from the editor, is that the ship shows up with the blue textures, and the game is frozen for a few seconds while the textures are built. Also, it assumes that all of the Procedural Materials will be loaded in the same frame, and I wonder if that's a safe assumption. I suppose I could throw up a loading image in a Start(), and then have this bit take it down, but that seems a bit sloppy to me and would prevent a proper load bar. Surely there's a way to make sure the textures are pre-loaded and appear complete upon displaying the level.
     
  36. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    It should work in the start() function, that's where we call it in all of our Unity projects. The other way would be to create the array manually in the editor, of course if you have more than 10 -15 substances, it can be tedious.
     
  37. Harabeck

    Harabeck

    Joined:
    Mar 27, 2012
    Posts:
    10
    Ah, it should have been obvious to me. In my game the player's ship isn't part of the scene. It's built dynamically after start from a save file. I guess I will have to use some sort of static image.
     
  38. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Just a quick bump to tell you that we now have a UserVoice website for you to give us feedback or ask for a feature on anything substance related.

    Head over HERE and tell us what's on your mind :)
     
  39. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Ask for a feature? Simple - get it running on mobile devices. Done.

    Gigi.
     
  40. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Hi! I'm profiling my application, and here what I stumbled at. I have substance file created, which uses other textures as inputs. All seems file, but I need to reference this file somewhere in the inspector, to call out :

    original_outputs.SetProceduralTexture

    later on.

    The problem is - my substance assigned in the inspector to ProceduralMaterial slot eats around 260 mb of memory 0_0 Is that normal? It has no input textures assigned yet ,generates only 3 dummy textures, still 260mb goes away. I hope it is a bug and can be fixed :)
     
  41. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Substances should take up any more memory than standard textures. During the generation, the memory footprint can be higher but it should revert to normal as soon as the substance has been generated.
     
  42. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    I see. So actual sbsr file should not take memory at all? I'll file bug report then and see, because 260mb out of nowhere is too much. I also have one idea - maybe it is reserving cache or something on load, will check it before filing bug report too
     
  43. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Well, even without an input texture assigned, it's still going to generate output textures I think. How big are the textures it's generating? One thing you could do is uncheck "Generate on Load" and and manually trigger the generation after you SetProceduralTexture. That might result in the behavior you're expecting.
     
  44. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    It is generating 3x2048x2048 textures, well, they are also compressed. Can they somehow eat 220mb? I tried with unchecked "Generate on Load". Same stuff. The reason I mentioned input textures, is because I norice my other substances with less texture imputs, eats less memory, so I though, maybe very input is reserving space or something. Also, if I delete object on play, memory still stays eaten, it is not cleaning up. Very suspicious. I submited bug report anyway this morning, too bad no response so far
     
  45. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Hey, Liatti.

    What is the current status on procedurally in Substances on mobile targets (e.g. iOS)?

    Is that working yet?
     
  46. Liatti

    Liatti

    Joined:
    Mar 21, 2011
    Posts:
    63
    Hi Marty!

    We are really sorry that it took us longer than expected. We are currently in the final stages before launching a closed beta (setting up the build system, etc.), it will happen in the coming weeks.

    Cheers!
    Nicolas
     
  47. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    No need to apologize (but it's still awfully nice of you) - I'm sure you guys are taking your time in order to do it right. ;-)

    If you need any more beta-testers, feel free to tap me!
     
  48. stimarco

    stimarco

    Joined:
    Oct 17, 2007
    Posts:
    721
    Hi Nicolas,

    C'est merveilleux!

    It'll be interesting to see what levels of performance we can expect on various platforms.
     
  49. Liatti

    Liatti

    Joined:
    Mar 21, 2011
    Posts:
    63
    Hi Guyz,

    A quick post to remind you that the Unity Bootcamp Offer for $690 is ending tomorrow: Substance Designer 2.5.1 + 250 .sbs + Bitmap2Material 1.5 for $690 instead of $1600: http://www.allegorithmic.com/unitybootcamp !

    Cheers,
    Nicolas
     
  50. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    At last! :) AWESOME!!! :)
     
Thread Status:
Not open for further replies.