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. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    Thanks Jerc, glad to hear that - hopefully integration into a more affordable host will come to fruition soon.

    I've already placed my vote on what package I feel is a good first choice.

    -Will
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Thanks for the various inputs on Substances, great informations :)


    Has Substance Designer 2 removed the limitation that you can't sell the substances? (that being said: I've turned the page upside down twice, back then and when 2.x was released and never found a single line that legally bound anyone to that mentioned limitation in any legal form as there is no such thing mentioned on the page)
     
  3. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    I would like to set my terrain's heightmap at runtime from the current state of a Substance texture. Can't seem to find a way to do it though since there is no Texture2D and no GetPixels(). Is there a way to do this that anyone can think of? Or if it's simply not possible, that would be informative to hear too. thanks!
     
  4. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    Just started using Bitmap2Material and the sample substance but found some tradeoffs.

    Bitmap2Material does a nice job of upscaling a 512x512 texture to 1024x1024 with spec/bump/height. It looks much better than the original material. The 'cost' of this is approximately 0.2 seconds on a fast CPU.

    I tried two of the sample substances (concrete_049, Stones_01). For concrete_049 the goal was to just use the diffuse channel as a detail map, so I figured I could get a 1024x1024 detail map for free. And since it is a pure substance, I generated 2 different ones for some variety.
    It turned out very pretty:
    http://www.nplay.com/images/Relief.jpg

    However, generating the concrete_049 substance on a fast CPU took 2.23 seconds. And since I made 2, it went upto 4.5 seconds. The stones substance took 0.83 seconds.

    So for all the procedural textures it added an extra ~7 seconds to the load time. But many players don't have top end CPUs so we have seen 30 seconds to just under 2 minutes.

    I ended up 'baking' the concrete_049 diffuse map by expanding its preview in unity, doing a printscreen and saving the file, not the nicest way to bake a texture but couldn't find any other way. And just used the single variation instead of 2.

    It might be slow to generate pure substances since they always generate the Diffuse/Spec/Norm/Bump/Disp/Height maps even if you only need the diffuse, not positive. I have the trial for Substance Designer Lite, but you can't import .sbsar files to change them, and the sample ones don't come with the .sbs sources.

    So the Bitmap2Material filter is awesome, and I want to like the substances, but its hard when downloading the texture is faster than generating it.
     
  5. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Hmm, I could have sworn there was an export option in the last version for the generated textures, but I can't find it now, maybe they took it out. Should be able to write a script to save out the data I suppose, sucks that you'd have to do that though.
     
  6. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Hi Proton,

    I'll give you some answers to your issues.

    - About the generation time being slow: the generation time depends on the substance and its complexity. Some generate faster than others, we recommend using the Free Substance Player to profile the generation and see exactly which substance is faster to generate.
    As a general rule, all substances are extremely fast to render in 512 while 1k textures can get a lot slower to generate depending on the Substance complexity.
    We are currently working on heavy optimizations to allow fast generation of high resolution substances.

    - You are right about the substance generating all the outputs even when you only need one of them, we are aware of this and it is actually already fixed for the future 3.5 release.

    - You can import sbsar files in Designer lite by creating a "New Layer from Substance" but you will need Substance Designer Full if you want to get and modify the sample substances sources (the .sbs files are shipped with Designer Full only, including the Trial version).

    - You can export the Substance Outputs as bitmaps through the Substance material inspector in Unity. Click on the small gear icon on the top right corner of the inspector, there is a "Export Bitmaps" option.
     
    Last edited: Oct 1, 2011
  7. ANTROPO

    ANTROPO

    Joined:
    May 26, 2010
    Posts:
    51
    Hi everyone,

    I am working on procedurally generated content and can see some use in substances, as fe. a lot less manual texturing work and used texture memory, although I couldn't find out how to properly prepare the models for use with substances. I will try to explain on an example how the object is supposed to be textured, and if anyone could give a hint on how it could be done with a substance (preferably allegorithmic staff :) I would first of all be very grateful, and second will instantly buy the substance designer ;) as all our models are done and are about to be textured, and this could be a potential time saver. (By the way allegorithmic video tutorials do not mention many many things and are not really tutorials (the TV video that says lets create a substance and then it jumps to where it is almost finished with no real information about how the TV model was setup in 3d modeling app so that it could be textured like that in substance designer)

    Thanks a lot for any info. Here's the example:

     
  8. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Set up your model the same way you'd do it if you were using just a normal texture. Then you can use a layer graph to create a substance that matches the layout of the normal texture.

    I'd be happy to make a video tutorial showing you how if you'd post a texture that you'd like to replicate as a substance.
     
  9. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    You can easily create that kind of texture in Substance Designer by creating 2 layers from 2 different substances or bitmaps, then drawing a mask to blend the two textures, using a shadow fx on one of them and adding a bit of procedural dirt using the shadow as a mask.
    The cracks could be hand painted through the vector graphics painter or created with one of the noises shipped with Designer.

    We know we lack tutorials and we are working hard to get you more of them very soon !

    EDIT: niosop was faster :)
     
    Last edited: Oct 3, 2011
  10. ANTROPO

    ANTROPO

    Joined:
    May 26, 2010
    Posts:
    51
    Hi guys, thanks for the answers, I will try to discuss this with the person who will do the texturing.
    niosop, the problem is the texture is not done yet, only the models, and if it was done, it would be a large atlas of different options. Something we are trying to avoid here ;)
    Basically, It is just 4 main polygon areas with tilable textures with some fancy stuff here and there. The point is just as I said to have a lot of controllable differentiation.
    Is this possible with the mentioned masks, is this controllable with individual objects while working with the same one material that uses only one substance? Is it possible to create one substance material, that we will be able to tweak for each object that is using it individually?
    Once again, thanks.
    Still trying to figure this out.
     
  11. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Yeah, it should be totally doable with the layer graph. Basically you're creating a different substance definition for each layer, then using vector masks to make each one show through in the desired region. You can assign different parameters to each of the different layer substance definitions so you can tweak each section individually. Along the top of the substance inspector panel in Unity there is a strip that will allow you to make copies of the substance and tweak each one to look differently, then assign these different copies to different objects.

    One thing to keep in mind is that generating a multilayer texture like this could take a couple seconds depending on the complexity of the substance. And a different texture set will be generated for each variation, so depending on how many you have, there will be some load time impact.

    Also, when defining your layer graph, make sure to only specify the outputs that you are going to use. If you don't need normal and height maps, remove them when doing the initial layer graph creation step so that they aren't generated. This should save some processing time.
     
  12. ANTROPO

    ANTROPO

    Joined:
    May 26, 2010
    Posts:
    51
    Thanks niosop, I will give it a test, sit with my colleague and see what results we can get. I'll post back ;)
     
  13. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    I'm evaluating Substance Designer 2 trial to see how it fits my pipeline. So far I think I hit a limitation?
    I have around 12 large texture maps in my Substance, I'm using those for various mixes. But as I can see, substance is not cooking. When RAM memory hits 1200+ limit, I just get 1kb sbsar file as output.
    On my another PC, it even do not start publishing at all - so I guess, I have to stick to lesser texture sizes or there are some other options?
     
  14. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    What are your specs ? I already ran into the 1kb sbsar issue a few times, even on very light textures, but restarting Designer and cooking again works on my side when it happens.
     
  15. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    8gb ram, 512 mb video card (maybe that is critical?), 3.5ghz processor. I'll try examining it more, usually reducing texture size/compression to jpg helps.
     
  16. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    > cooking again works on my side
    That helped me too, when I have texture limit "so-so" nearly. After reloading application, especially if I _NOT_ load the graph instantly (version 1 wirks this way), I can cook, as I guess ram memory space is not taken by this time.

    I think this needs to be patched up somehow, probably it is a bug after all?
     
  17. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Do you have a 64bits OS ? If so, it's probably a bug as 8 GB of ram is more than enough to handle any kind of substance graph.
     
  18. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Yes, I am on windows 7 64 bit.
    I wonder, memory usage never goes more then 1300, around near that point application drops working (CPU resets to 0 resting), and generates 1kb file. So maybe a bug. Well, I'll postpone my testing for a while and will see, if next release is going to fix that.
     
  19. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    I forwarded your issue to out tools programmers. Could you provide me by PM with one of the substance that causes the issue ?
     
  20. WillBellJr

    WillBellJr

    Joined:
    Apr 10, 2009
    Posts:
    394
    I was briefly playing around with Bitmap2Material demo today (using the player) and I thought you would be able to export your material as a sbsar file (hence "bitmap to material") which I could use back in Unity?

    I see only the option to export bitmaps - or can sbsars only get exported by using B2M within designer?

    -Will


    PS - I see to get the discount for Designer you have to provide your Unity serial number? I'm always leery with giving out my SNs - I'm assuming this is okay with UT?

    -Will
     
  21. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Import the sbsar into Unity and tweak the settings there instead of in Player. The material will be generated inside Unity.
     
  22. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Don't worry, we won't keep your serial, and if you really don't want to send your serial, you can just send us your purchase/invoice number or any other proof that you are a paying Unity customer.
     
    Last edited: Oct 10, 2011
  23. elias_t

    elias_t

    Joined:
    Sep 17, 2010
    Posts:
    1,367
    Would it be possible to combine substances to form a texture atlas?

    In a forthcoming project I will be using a lot of models that are going to use 4-5 big texture atlases.

    Can substances help in that? Because if I dodn't use texture atlasing the draw calls will be high.
     
  24. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    You can either generate the atlas at runtime from the Substance generated textures, or use the layering system in Substance Designer to create a Substance that is a texture atlas.
     
  25. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    Thanks elias_t and niosop - I was wondering the same thing! I am using Substances to render SVG files (nearly 400 of them!). I don't understand how generating an atlas at runtime would really help though, because each Substance in the scene will use 1 draw call to begin with. For the latter suggestion- using composite layering to make an atlas- this sounds interesting. I'm just learning Substance Designer. Are there any examples around, that are kind of similar to this idea?
     
  26. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Not sure what you mean by this. A Substance on it's own doesn't use any draw calls, only if it's applied to something. But by just using the generated textures in code to generate your texture atlas and not applying them directly to anything, you wouldn't incur any additional draw calls.
     
  27. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    Ah yes, I was confused. Thanks
     
  28. Liatti

    Liatti

    Joined:
    Mar 21, 2011
    Posts:
    63
    You can check doors.sbs and jockguy.sbs in the samples provided with Substance Designer 2. Those are kind of atlas examples.
     
  29. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
  30. Gruhm

    Gruhm

    Joined:
    Sep 9, 2011
    Posts:
    80
    I've read this thread and saw mention of baking the substances for use on mobile devices. Can you give me a little insight into how this is accomplished? I freely admit my total ignorance on the topic, but the technology is so impressive I'm wondering if it is something I can use now or need to wait for.

    Specifically can I use them as I would normally without any procedural changes at runtime and they would automatically be bake during the build, or is the baking a separate process that I need to do either in Unity or Designer?

    Again, forgive the nievity of the question. I'm a coder who has limited experience with traditional texturing let alone this. I can just see a ton of possibilities with this and even if I can't yet benefit from procedural changes I'm guessing I could achieve some really cool things even if the end result is standard textures for the time being.
     
  31. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Exactly :)
     
  32. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    hey there! Any estimate, when new version of substance designer is going to be released?
     
  33. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I've just spent a day experimenting adding a substance to my game, it all worked great on the PC but then I ported it to the iPad and bang, it doesn't compile. Did some searching and came across this thread and discover that I can't use the real time aspect on IOS. All I can say is BUMMER! This thread talks about it coming soon from last April, well it's nearly the end of the year and still no mobile support.
    When can we use dynamic substances on IOS?
     
  34. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    I checked with the Allegorithmic rep at Unite11 and the Substance engine doesn't support mobile platforms yet, but will soon. I'm sure Unity will support it in their next release after that.

    You are right it's a huge bummer! :( Some effects can only be achieved with real Substances and not "baking". For example I'm using Substance designer to create SVG file textures that I can set the resolution to rasterize the SVGs at runtime. I am using ~400 .svg files and this is a gigantic size savings in the app. Basically this app cannot get ported to iOS and Android until Substances are supported. :mad: I have found no other reliable way to render SVGs in Unity. The newer mobile devices are plenty powerful CPU-wise so I hope this happens soon.
     
  35. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    Substance is available to Unity users only since July, give it some time :)
    We are still working on it and will enter beta stage in a few weeks.
     
  36. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I'd also appreciate some clarification on that. I found it rather strange and disappointing that I should not be allowed to sell something that I've created with a tool that I paid quite a bit for - and really liked that this was supposed to be changed.

    So ... can I put substances that I created myself using Substance Designer 2 on the asset store, and/or other portals?
     
  37. mindlube

    mindlube

    Joined:
    Oct 3, 2008
    Posts:
    993
    That's great news! :cool: :cool: :cool:
     
  38. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    For now we cannot allow the reselling of your own substances but this is temporary and Allegorithmic is committing on making this happening as soon as possible
    We are currently setting up the technical and legal infrastructure to support it, this is a request from the community and it's on our priority list :)
     
  39. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    I'm not sure if this thread is to have a rant about Unity's short comings but there is a huge one IMO that substances highlights rather well.
    If a feature is not supported on all platforms the missing platforms should have the functions, types and methods stubbed out! I shouldn't have to litter my code with #if UNITY_STANDALONE_WIN etc.

    The whole idea or paradigm of Unity (the name gives it away) is you write code once and it works on all platfroms, if a feature isn't available or doesn't work on a specific platfrom it should be stubbed out so the code compiles and works still on all platfrorms, obviously minus the missing feature. Shame because I really like Unity, but sometimes it sure does infuriate me.
     
  40. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
    Arkon the alternative was to suspend release until there was total integration across all platforms, which would have been absurd. The inline compiler directives are awesome - previously you had to use a pant load of if statements and to be honest, this should be far less pervasive if you're using the right code patterns.
     
  41. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    I'm going to have to disagree here. I would rather have it fail at compile time than to have unexpected behavior at runtime. The compiler directives are the way to go. What you should be doing is replacing calls to functions that aren't available on all platforms with calls to your own functions that have the compiler directives in there. That way you have control of what happens on different platforms, directives are centralized in one location and not littered all over, and you still get compiler errors to let you know when you've forgotten to create a helper function for something that isn't available on all platforms.
     
  42. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    it's probably my fault, but I read some of the blurb for it which basically said it was ideal for reducing the foot print in mobile, so I naturally used it on my mobile app, only to then discover by error that it wasn't supported yet. Ok, I should have read the manual, but hey I'm a bloke, Whats a manual?
     
  43. arkon

    arkon

    Joined:
    Jun 27, 2011
    Posts:
    1,122
    We are going to have to agree to disagree. I've spent 25 years having to write code that worked on multiple hardware platforms (in a different industry) and you could never have got away with having a compile or link break on some platforms. It should gracefully compile and link but let you know through debug statements or some other mechanism that that functionality is missing, but fundametally should compile and link error and warning free.
     
  44. pinkhair

    pinkhair

    Joined:
    Dec 17, 2010
    Posts:
    141
    What about selling unity assets that use(original) substance based textures? Obviously they could be baked, but that would lose a lot of the benefits of using substances.
     
  45. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    We are ok with people shipping substances in their packages as long as you play fair and don't sell a package with only a plane and 15 substances ;)
     
  46. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    That's good to know, but why is it taking so long to change the license agreement as promised? It can't be technical issues as it's just a file that's already easy to transfer. And even though you've posted this, do people feel safe basing their work on a forum post that contradicts the published license?

    The technology is awesome, but the current licensing kind of leaves me in limbo about actually using it for paying clients. Since they're paying me, any Substance I create to use in the project kind of falls under the restriction of not being able to:

    - Reproduce, post, promote, license, sell, publicly perform, publicly display, digitally perform, or transmit for promotional and commercial purposes.

    Even a small licence change allowing Substances to be sold as part of a larger project where the Substances are not the primary product (as you described) would work fine until the final license is changed.
     
  47. pinkhair

    pinkhair

    Joined:
    Dec 17, 2010
    Posts:
    141
    That is good to hear!
     
  48. Jerc

    Jerc

    Joined:
    Sep 24, 2010
    Posts:
    300
    You are right, we are modifying it as I write this :)
     
  49. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    Awesome! We love you guys. One quick quibble:

    "Without a publisher license, the actions below are prohibited if substances are not used into Incorporated Content:"

    the "into" should be "in" I think.

    This change puts my mind at ease, thanks so much, you guys rock!
     
  50. alln2themusic

    alln2themusic

    Joined:
    Feb 3, 2011
    Posts:
    46
    Can someone explain to me if there is a trick to get substances to work with multi-material objects? I made a model in 3ds Max, set up all the materials and assigned them to certain parts of the mesh, but when i go in to Unity and try to assign the imported substances to the mesh, it doesn't seem to map to the correct part of the mesh. Do you have to do something special to get the correct assignments of the substances to your mesh?

    Thanks!
     
Thread Status:
Not open for further replies.