Search Unity

[Unity5] CompositeMap - Unity3D Editor Extension for texture composing

Discussion in 'Assets and Asset Store' started by PetrSevostianov, Feb 5, 2015.

  1. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Hi everyone,

    Let me introduce you CompositeMap, the utility for fast and easy texture processing in Unity Editor.

    CompositeMap allows to create and edit the whole set of object textures and real-time evaluate the result of their joint applying. It allows customizing hard-visualizable textures like Reflection, Glossiness, Self-Illumination, etc.

    CompositeMap edits the textures using the masks of materials similar to CompositeMap map in 3ds Max or Layered Texture in Maya.

    Available at the Unity AssetStore

    UPD: Unity 5 supported now.
    The package include optimized low-poly model of Mini Cooper with full set of material masks


    UPD2: Ingame usage supported.
    You can see this sample compiled for Unity Web Player here: http://nttl.ru/compositemap/ at the bottom of the page.




    How it works:



    Tutorial:



    It is very easy to use the utility:
    • Create the asset CompositeMap and add the layers to it
    • Press Save button — the texture file with the same name as asset will be created
    • Apply the texture to the object of Unity scene
    • Return to the CompositeMap and tune the layers
    In the Viewport you can real-time see the result of all your actions.

    All the textures created with CompositeMap could be used by the third-party Unity 3D tools and plugins, which can significantly broaden the abilities of the Editor.

    You can create the masks of materials automatically with the MaskBaker script for 3DsMax (it is free).

    "

    Thanks for taking a look! Feedback and ideas for improvement are always welcome!

    Visit our website: nttl.ru
     
    Last edited: May 13, 2015
  2. johan.akesson

    johan.akesson

    Joined:
    Feb 19, 2015
    Posts:
    7
    Pretty nice! Especially last 2 samples in tutorial. But I see too many masks there. I bet this couldnt run on mobile.
     
  3. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Thank you! ) The number of masks is irrelevant in this case. CompositeMap just composed the texture which could be applied to the model. It works in editor mode and don't need to be included into the final build at all
     
  4. johan.akesson

    johan.akesson

    Joined:
    Feb 19, 2015
    Posts:
    7
    Nice! Does it mean that I'll get a one texture file as a result of plugin work and then could just remove the plugin from assembly and leave and further just this texture file?
     
  5. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Yes. You can create many textures of the object (Diffuse, Reflect, Self-illuminaton, etc), then apply all of them to the object and see the result of their joint applying. You can realtime edit these textures and see how will be looked your object with all shaders and scene settings. When you will satisfied you can just leave these textures and exclude tool code and masks from the project.
     
  6. kimwu

    kimwu

    Joined:
    Feb 24, 2015
    Posts:
    1
    Hi, guys! Nice tool! Could you modify your MaskBaker script and allow to bake only selected materials, not all?
     
  7. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Done! You can download MaskBaker 1.1 from our website!
     
  8. Kim Wu

    Kim Wu

    Joined:
    Feb 27, 2015
    Posts:
    1
    Thank you, guys!
     
  9. KhaledM

    KhaledM

    Joined:
    Sep 29, 2013
    Posts:
    41
    Does this support Unity5, and is it useful for making dirt texture (that will be applied ingame over the main texture) another usage is to let the player apply vinyl for his car, is that possible too?
     
  10. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Hi KhaledM, we are going to release Unity5 support in nearest time. What about changing texture: of course, you can use our code for ingame features. Our tool can mix different textures like layers in Photoshop and as a result generates the texture which could be applied to the object. You can reuse this mechanism in your application.
     
    KhaledM likes this.
  11. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Hi again! We've made a Unity 5 support!
    Enjoy!
     
    KhaledM likes this.
  12. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    306
    Hello,
    I'm using Your plugin to bake glossiness texture into alpha channel of albeido texture. As a input to relief terrain pack.

    But I'm fighting with one thing:
    I create first layer with albeido texture I set it to normal, use mask.rgba, enable r,g,b.
    Second layer with glosiness texture I set it to normal, use mask.r, enable alpha (use mask.rgb would be preferred)

    Basicly this works. But it will only bake red channel of glosiness texture into alpha chanel of result texture. Would it be possible to enable use mask.rgb option?

    Or I'm doing something wrong?
    Thanks
    Peter
     
    Last edited: Apr 27, 2015
  13. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Hello, Peter!
    Could you provide us more information for clarifying the problem, please?
    What do you want to get as a result? How many textures? Which shader do you use?
     
  14. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    306
    I simply want to bake glosiness texture into alpha channel of albeido texture.

    So I have 2 inputs and I want to do this mapping:
    albeido texture
    RGB -> RGB

    Glosiness texture:
    RGB -> ALPHA

    Just take rgb channel from first texture (albeido texture) and bake RGB channels from glosiness texture into alpha of result texture.

    And I want it for RTP shader (it awaits glosiness in alpha of albeido texture):
    https://www.assetstore.unity3d.com/en/#!/content/5664
     
  15. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Okay, Peter!
    Let's do the following:
    On the import of Glossiness texture please select Texture Type 'Advanced' and select Import type 'Alpha from Grayscale'


    Then create 2 layers: for Albedo and for Glossiness and use it like you see on this picture: put Albedo texture on the bottom layer an use it as usual (RGBA) and next set the Specular texture with the grayscale in Alpha for the top layer and it will just overwrite Alpha channel.



    I hope it will help you!
     
    Last edited: Apr 29, 2015
  16. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    hopeful likes this.
  17. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    ZJP likes this.
  18. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,190
    So regarding memory and draw calls, the Composite Map is saved as one texture, or holds a reference to all the textures that are used by it?
     
  19. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Hi Ben!
    Yes, the CompositeMap generates one result texture. So you won't have a problem with a draw calls
     
  20. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    306
    Thanks, yeah trick with alpha from grayscale make it works. Still not sure if I'm doing it wrong. But I get good result only with albeido on top? (if albeido is bottom layer result is too dark)
     
  21. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Great!
    Peter, obviously order doesn't a matter if you are using 'Normal' mode. Top layers completely overrides channels for bottom layers.
    You also could pay attention to the following thing: in the screenshot you are using your textures like a mask. Try to put them onto right squares - to the texture place (Texture 2D). It is ideologically more correct and could get you better results )))
     
  22. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    306
    Arrhs I see that I was completely lost. :)

    So I have changed slots of textures. But still get different result dependant on what is on top?



    P.S.: I have made screenshots with Add operation but result is same with Normal operation.
    Thanks
     
    Last edited: Apr 29, 2015
  23. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Quick question: can your asset be used ingame, to compose textures with a players choice of colors?

    So can I use it to create a player customization system?
     
    hopeful likes this.
  24. Crivens

    Crivens

    Joined:
    Jul 30, 2012
    Posts:
    34
    Yeah I second this question. I used another long un-updated plugin to basically allow colour customisation in-game. Unity 5 stopped that working, so I need another solution.

    If the author can give us confirmation that this can all be done in code at runtime, then I'll buy it in a heartbeat. Preferably before the sale finishes today!

    Cheers
     
  25. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    gian-reto alig, Crivens,
    We will implement part of code for texture generation in 1-2 days and it will be available after AssertStore will approve our commit. It should take about 1 week. In this version we will implement ingame texture processing mechanisms and make a sample how you can use it.
     
    Last edited: Apr 30, 2015
    ZJP and hopeful like this.
  26. Kolgrima

    Kolgrima

    Joined:
    Feb 2, 2009
    Posts:
    38
    Sold! can't wait to see this implemented... it will make it very powerful indeed!
     
  27. Crivens

    Crivens

    Joined:
    Jul 30, 2012
    Posts:
    34
    Yep me too. Bought while still in sale too. Not bad!
     
  28. gian-reto-alig

    gian-reto-alig

    Joined:
    Apr 30, 2013
    Posts:
    756
    Sounds great, Petr.... can you already say something about how Long will take to bake a texture from 2-3 layers ingame?
     
  29. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Hi Peter!
    We tried hard but we cant reproduce this bug. Changing order of layers causes no difference on Normal or Add Mode.

    The only thing we've found is that result texture icon (only icon, the texture is fine) renders incorrect in Linear Space (in Gamma Space it is ok). It is internal Unity magic and we can't fix this.

    If this bug is critical for you we can try to connect to you with remote desktop and tried to catch this.
     
  30. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Hi!
    Coming soon! CompositeMap version 1.3 with support of ingame usage and sample is commited to the AssetStore and waiting for approval now.
    Now you can see the sample of ingame usage on our webpage http://nttl.ru/compositemap/ It used the Unity Web Player and placed at the bottom of the page.

    We are waiting for your review !
     
    hopeful likes this.
  31. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Processing the heap of 2D textures is very fast, but the main idea of CompositeMap is that you need to bake the texture only once during tuning process. After this you can texture the model with the result texture and enjoy. No problem with draw calls, no problem with complex 3D calculations. Fast 2D texture processing only.
     
  32. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Thanks for the reply.
     
  33. PetrSevostianov

    PetrSevostianov

    Joined:
    Nov 26, 2012
    Posts:
    18
    Hi!
    CompositeMap version 1.3 with ingame usage support just has been published on the AssetStore! You can download and try it!
    New version package contains a sample which shows how the CompositeMap could be used ingame.
    You also can see this sample compiled for Unity Web Player on our website http://nttl.ru/compositemap/ It is located at the bottom of the page.
    If you have any questions, suggestions or thoughts, you are always welcome!

    And please rate the CompositeMap if you like it!
     
    gian-reto-alig likes this.
  34. Cereal_Killa

    Cereal_Killa

    Joined:
    Oct 20, 2013
    Posts:
    205
    Does this software create the maps or do they need to be created manually in photoshop?
     
  35. mm_ASH

    mm_ASH

    Joined:
    Nov 15, 2013
    Posts:
    175
    Bug in rendering of layers in Linear color space makes it totally useless for me =(
    Can you pls fix that?
     
    Last edited: Oct 21, 2015
  36. hensoup

    hensoup

    Joined:
    Jan 13, 2014
    Posts:
    31
    is there a way to change uv offests in certian layers say for offests and tiles withen a texture layer? mainly using this to merge 8 textures to 1 without using atlas baking.
     
  37. arapps3d

    arapps3d

    Joined:
    Jan 13, 2015
    Posts:
    17
    Hello, thank you for the plugin, it is great.
    [Edited, found a solution for the first problem by myself]

    Is there a scripting documentation for the plugin?
     
    Last edited: Apr 22, 2016
  38. nomax5

    nomax5

    Joined:
    Jan 27, 2011
    Posts:
    340
    I am getting the following error while trying to replicate what you are doing in your demo video

    Unsupported texture format for ReadPixels - needs to be RGBA32, ARGB32, RGB24, RGBAFloat or RGBAHalf
    UnityEngine.Texture2D:ReadPixels(Rect, Int32, Int32)
    CompositeMap:Render() (at Assets/CompositeMap/CompositeMap.cs:137)
    CompositeMapEditor:OnInspectorGUI() (at Assets/CompositeMap/Editor/CompositeMapEditor.cs:323)
    UnityEditor.HostView:OnGUI()

    I am wondering if this is something to do with a more recent release of Unity I'm on 5.5 currently
     
  39. morbraz

    morbraz

    Joined:
    May 22, 2013
    Posts:
    1
    Hello, Work nice !
    Only one problem for ingame usage, I need to free memory from all layers accumulated. Seem that resources.UnloadAsset doesn't work outside of compositemap source ?
     
  40. jacobhaigh1143

    jacobhaigh1143

    Joined:
    Aug 26, 2015
    Posts:
    4
    Any plans to update this for 2017? I'm having an issue where just feeding in a diffuse map with no masks will darken the texture in output.

    edit: Found the issue that causes this. in 2017 try setting sRGB to false on the texture.
     
    Last edited: Oct 8, 2017
    ledbetterman likes this.
  41. halit23

    halit23

    Joined:
    Apr 12, 2018
    Posts:
    13
    Hello

    Can i use this for creating terrain just like MTE ? several maps above each other. Each one has diffuse map + tiling + offset setting and a multilayer alpha texture. I watched the video and i am afraid there is only color + mask but no diffuse, tiling nor offset control option
     
unityunity