Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Substance answers !

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

Thread Status:
Not open for further replies.
  1. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    i'm not sure if it's related but i get the assetimporter is referencing an asset from the previous importer a lot as soon as i try to use animating textures and i have to retry / reimport multiple times before it fixes itself (with the result being that nothing displays untill i get lucky). Non animating textures don't seem to be affected (never had it on one, and had it multiple times on each of the 4 ones i tried to check animate).

    I also have a bug but i really don't know how to reproit, i'm assuming it's a memory leak somewhere, when i use the DB and try substances 1 by 1, usually ending up puting them at 2K and tweaking them multiple times, after 10 or so textures i get a unity editor crash.
     
  2. Bagless

    Bagless

    Joined:
    Jul 3, 2012
    Posts:
    4
    Figured out a short term work around where I use a surrogate game object in the scene with the substance materials assigned, I then use custom materials on the primary game object with the substance material textures assigned. Low and behold editing the surrogates substance properties updates the custom materials textures. Happy days.:D
     
    Last edited: Jun 7, 2013
  3. Samhayne

    Samhayne

    Joined:
    Jun 15, 2009
    Posts:
    45
    Hey, =)

    hmm... since we updated to Unity 4 (or some later version) Unity became very unstable.
    I guess it's somehow related to prefabs with substances.

    Clicking around on prefabs without substances, everything is fine.
    Clicking different prefabs with substances works out a few times and then all of a sudden Unity crashes...

    Unity Log:
    The behavior feels for me like some sort of race condition... which corresponds with the much faster substance building
    introduced some releases ago (wasn't this achieved by parallelism?).

    Known issue? Anyone having the same problems?
    Uncle google gave me rather sparse info.

    edit:
    Also get to see these errors quite often when starting up the scene:

     
    Last edited: Jun 25, 2013
  4. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    Samhayne, Im getting these errors to

    m_ThreadedObjectActivationQueue.empty()

    ms_IDToPointer->find (obj->GetInstanceID ()) == ms_IDToPointer->end ()

    I get these when using the Bitmap2Material_2_RealTimeMobile.sbsar on a model with other shaders that I swap at runtime.

    But like you say, at the load of a scene.
     
  5. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    I am sure this is a basic question but can you take the outputs from substances and load them into a texture atlas at runtime to take advantage of batching? I've got a large tile grid I'd like to use different substances on but only use one material, my understanding(which may be flawed) is that if I use multiple substances I'll break batching on the tiles.
     
  6. cjubb

    cjubb

    Joined:
    Dec 17, 2012
    Posts:
    7
    Yes I'd also like to know how to take a generated substance and create a texture from it.
    I tried using this but I get a blank texture (all the colors are 0,0,0,0):

    Code (csharp):
    1.  
    2. // mMaterial is a ProceduralMaterial
    3. mMaterial.isReadable = true;
    4. ProceduralTexture tex = mMaterial.GetGeneratedTextures()[0] as ProceduralTexture;
    5.  
    6. Texture2D cached = new Texture2D(tex.width, tex.height, TextureFormat.ARGB32, false);
    7. cached.SetPixels32(tex.GetPixels32(0,0, tex.width, tex.height));
    8. cached.Apply(false);
    9.  
     
  7. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    I also get the errors indicated above, and would also be interested in atlasing options for substances. :p
     
  8. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Make sure your substance outputs are set to Uncompressed in the substance inspector. You can't read a dxt compressed substance.

    About atlasing, there is no way that I know of for creating atlases automatically in Unity using Substance. Are there such tools on the asset store (for bitmaps)?
     
  9. metalouis

    metalouis

    Joined:
    Sep 28, 2011
    Posts:
    12
    When generating new variants of substances at runtime (using the previously recommended method of assigning to a game object's renderer.material), the generated textures look washed out on rebuild:

    $SubstanceLinearProblem.png

    I'm using linear lighting in my project, and it looks like the original textures are correct, but the rebuilt instance is using gamma colour space.

    Has anyone else encountered this? Am I missing a function that allows generation in linear colour space or is there at least a workaround?

    Thanks!

    Louis
     
  10. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    4.2 has just been released, and it includes a ton of improvements and fixes for substances, could you try after updating ?
     
  11. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    733
    Hi Jerc,
    did you have any news?
    I don't see yet any update in my substance pack inside my allegorithmic user account.
    Did you fixed the bugged substance with no flow map loop?
    I did some test in the new 4.2 update but the issues is still present!
    Regards
    Max


    (Substance250 package)

    (water_flow)
    - ground_001.sbsar
    - ground_011.sbsar
    - ground_017.sbsar
    - bricks_026.sbsar
    - concrete_029.sbsar
    - rock_002.sbsar
    - stones_001.sbsar

    (flow)
    - fire.sbsar

    (rain_flow)
    - roofing_002.sbsar
     
  12. PatBGames

    PatBGames

    Joined:
    Mar 28, 2009
    Posts:
    120
    I've just installed 4.2 and tested the Electric_Liquid from the Substances_Free pack and I have no more bug.
     
  13. metalouis

    metalouis

    Joined:
    Sep 28, 2011
    Posts:
    12
    Sadly, the 4.2 update doesn't appear to have fixed run-time instancing of procedural materials in linear lighting. Is anyone else having problems with this?
     
  14. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Again in 4.2 electric animated materials cress why this happen because in unity 4 it's work fine.
     
  15. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Can you make sure the asset store version of the substance database is updated at the same time as the out of unity version? I see a lot of nice improvement on the website (smart tiles volume 1 included among other things) and i'd really like to have those asap!
     
  16. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Before I bother investing time into using Substances I'd like to know how you update from 1 version to another without losing all your substances. From what I've read when you import the new version you lose your substances. Is this true? What's the process to update? This wasn't answered in the below topic either.

    http://forum.unity3d.com/threads/99013-Substance-Bitmap2Material/page9

    I don't want to end up using 20+ substances then have a chance of losing them all due to updating.
     
  17. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Could I get some official response on this please? Is there risk of losing my substances somehow? I seriously don't want to design my entire game with them and then they screw up and lose all my settings.
     
  18. IcyPeak

    IcyPeak

    Joined:
    Dec 1, 2009
    Posts:
    377

    I upgraded by simply using the new scripts since the sbsar didn't appear to have changed, but why wouldn't you try and just restore from backups if it fails?
     
  19. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    I haven't had an issue. I'm simply wanting an answer if it's possible for such a thing to happen as others have reported it can. If for example you import the new substances, do you lose all your materials? My game is on GIT so I've no data loss risk, but it's still a valid concern if this can even happen.
     
  20. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    In addition to my previous questions; How many materials can I have in a substance? Is it ok to add all my materials or should I clone the substance and break it into chunks?
     
  21. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Could I please get a reply regarding my questions above? I've began replacing all my materials with substances now and they work fine as well as look great, but the above is still a concern for me.
     
  22. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Are you sure you actually upgraded? The package is basically just sbsar files and a script for batch application. It must be the substances that are new.
     
    Last edited: Aug 1, 2013
  23. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    I would advise not to put more than 5 materials in the same substance, then duplicate if you have more than that, for stability sake.
     
  24. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    What's the best way to duplicate and split it up without losing my dependencies? I have like 60 materials in my B2M substance now and all being used.

    Maybe also worth noting I don't keep the substances. I bake and discard the substance so there shouldn't be any memory impact, correct? I assumed it baked when I built my project.
     
    Last edited: Aug 5, 2013
  25. IcyPeak

    IcyPeak

    Joined:
    Dec 1, 2009
    Posts:
    377

    Ugh, you are right. I was half asleep when doing it and writing that post.... I'd love to know if there is a way to split up a large sbsar since I packed most of my materials into the one archive, as well as if there is a simple way to upgrade in the future (I went through the process of redoing all of them into the new version substance, but that wouldn't have been too feasible if I were further along in that project).
     
  26. Loius

    Loius

    Joined:
    Aug 16, 2012
    Posts:
    546
    We have ~a lot of materials derived from a single substance. Making a change to one of those substances in the SubstanceImporterInspector works fine, but then when the inspector closes, it rebuilds the entire set of substances, which takes a "massive" amount of time (~10 seconds or so during which Unity hangs). Is there any way to disable the rebuild or shove it into a separate thread, or what kind of trouble will we run into, having many materials per a single substance?
     
    Last edited: Aug 6, 2013
  27. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    There is currently no way to split materials cloned in a single substance into multiple ones. If it runs fine with all these instances, then good for you, it means the fixes and improvements we added for 4.2 are actually working :)

    Loius> I'll check with the engineer in charge of that part.
     
  28. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Can you check up my post from earlier about the asset database on the store being up to date? It's pretty important to me.
     
  29. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    In the same vein, can we get confirmation that upgrading B2M shouldn't erase materials in the substance?
     
  30. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    We are waiting for the validation on the Asset Store for the new database, it should be up at the end of the week.

    I will run some tests for the B2M update to be sure it works properly.
     
  31. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Great news! So we should be getting the auto tiling new textures then? yippy!
     
  32. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    When I export to bitmap it doesn't seam to export properly. My diffuse shader is completely messed up and missing several color channels. I end up with it being 90% transparent. It also exports as TGA. Can I not export as PNG? I don't have Photostop and GIMP doesn't seam to open TGA properly.
     
    Last edited: Aug 10, 2013
  33. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Chance of a followup? I didn't know I should've been cloning substances and splitting my materials up into groups. So I have like 60 materials all in 1 B2M substance now.

    Could we please have a response regarding this?

    Any idea how to export to bitmaps as PNG instead of TGA? The TGA will not open correctly in GIMP.
     
  34. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Any update in substance redux?
     
  35. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    About the substance material splitting, it's unfortunately not possible. However, having a lot of clones should not be an issue with the latest changes we introduced in 4.2.

    Now for B2M updates, updating fro 1.6 to 2.0 WILL break materials as the number and name of outputs have changed. However updating from 2.0 to 2.1 should not cause any issue. You should back up your meta files anyway just in case.

    As for the export format, it is limited to TGA right now indeed, I'll see what we can do about it. you can convert TGA to PNG with XnView or any other image viewer in the meantime.
     
  36. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Looks like you can clone the B2M by selecting it in project view and pressing Ctrl + D. It even keeps the materials. You'll need to assign the newly cloned materials though, but at least you don't have to reconfigure them. What I'm doing is cloning B2M and splitting it into groups of 10 materials per substance. I hope this will keep performance most optimal.

    Is this the case even if you have say, 60 materials in a single substance? That seams like a lot to me. Maybe there is a way to write a script that could slice the substance down to smaller sets while keeping meta data? Is that even possible?
     
  37. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    You could probably create an editor script that copy all material properties of one clone and psate it in a new one from a new B2M instance, then delete the original clone, but it might be quite complicated :/
     
  38. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    bump
     
  39. DangerFro

    DangerFro

    Joined:
    Oct 18, 2012
    Posts:
    2
    Hello everyone,

    I'm trying to animate an exposed variable within a custom built substance in Unity, so that we can line up its effect with an animation imported from Maya. However, whenever I attempt to animate the substance within the animation editor it reads as an "Invalid procedural material" within the inspector and none of its variables are shown.

    I can't seem to find anything regarding the subject in any of the forums or anywhere else in Google, and as far as I can tell substances should be animation friendly. I'm currently using unity 4.1 and substance Designer 3.6, any information would be much appreciated.
     
  40. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Could you please contact your programmers and have them help with the following topic.

    http://forum.unity3d.com/threads/19...or-split-substance-help?p=1338537#post1338537

    I'm trying to write a script that will split a substance. For example if you have 60 materials in a substance it begins to take forever to load. I want to split this up into batches of 10 materials. I'm trying to write a script to automate this, but the documentation is more than lacking (thanks Unity!) for accessing and modifying substances. I really don't want to have to do this manually.

    I also recommend warning users before they are stuck in my same situation of too many materials in a single substance. I didn't know it'd be a problem. It makes editing a material in my substance a nightmare as it takes forever to refresh.

    Edit: Seriously, this is crazy urgent. It takes like 5 minutes for my scenes to load. Please tell me how to best split a substance up and please warn people before they end up in my same situation.
     
    Last edited: Aug 25, 2013
  41. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    You can't access a substance parameter directly through the animation editor.
    The way to go is to create a script with a variable that you animate, and then regularly push the value of that variable to the substance parameter through the script, every 2 or 5 frames for example.
     
  42. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
  43. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    I wonder if someone from Allegorithmic may know a little more about Unitys Substance usage and perhaps API calls. I'm trying to figure out a way to mass export bitmaps basically with materials. I've managed to create a material and copy the shader properties to it. I've also managed to 1:1 export textures. My problem is normals are exported as grayscale and not exported like they are when using Export Bitmaps. I'm using GetPixels32 and SetPixels32 to export the textures, but I really could use some help getting the Normal to export properly. Below is my topic regarding this with my current progress.

    http://forum.unity3d.com/threads/20...al-to-Material-Possible?p=1359861#post1359861

    I would love to know if someone from Allegorithmic maybe able to chime in and possibly offer up some advise. I'll of course share the end result as I did with my Split Substance script.

    My reason behind making a batch Export Bitmaps is I have 122 materials in my substance. That's A LOT to export 1 by 1 and setup with their materials 1 by 1. So I really, really, really, need to have a way to batch process this.
     
    Last edited: Sep 18, 2013
  44. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Is there a filter that I can add to change the direction of a normal map? They look fine in Substance, but as soon as I output it to Unity it's upside-down. Or is there another method to get them to export correctly? I remember watching a tutorial in which he said that he created a node base to do it since Substance was DirectX and Unity was OpenGL.

    Also I have a character mesh in which I have 2 diffuse maps; one for the head and one for the body. I was able to drag that model into the 3D View, and assign each Output to the correct part of the model. When I export the Substance, only the body of my mesh gets the maps assigned, the head doesn't. How can I get that one Substance to be assigned to both channels (body and head)?

    Finally, I want to use one HSL node to change the hue of both the head and body diffuse outputs. Is that possible?

    Thanks!
     
    Last edited: Sep 19, 2013
  45. Ashamen

    Ashamen

    Joined:
    Oct 8, 2013
    Posts:
    20
    From my understanding you can not use 1 HSL node to colorize two outputs. For your situation though what you could do is create 3 float 1 variables at the root of the graph, call them Hue Saturation and Lightness or such. Then create two HSL nodes to do what you want, colorize the two outputs. Instead of exposing the values from the HSL nodes create empty functions for each value you want modifiable. In each function use a Get Variable node to grab the value of the variable you just created at the root of the graph. If you do this for both HSL nodes, and they grab the same value for say Hue, then both will have the same Hue applied to their respective outputs.

    Tony
     
  46. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    The Substance Designer "normal node" has a button True/False for Directx or OpenGL. Does that not fix your normal direction?
     
  47. GlanDeas

    GlanDeas

    Joined:
    Sep 4, 2013
    Posts:
    6


    Yes!!! I agree with you. It is really very good.


    ______________________
    Kopi Luwak
     
  48. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Dear Substance,

    Because my rebuildtexture() get more than 1 second on tablet, there is any method to query info until rebuild is completed?

    I want to load a texture animation until loading is not completed to help user to understand the waiting ...

    Thanks
     
  49. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Do you plan any free version of designer, sorta like Unity Free?
     
  50. LTE_

    LTE_

    Joined:
    May 31, 2013
    Posts:
    19
    can i use the substance player for commercial?
     
Thread Status:
Not open for further replies.