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

[RELEASED] WORN EDGES - Generates a worn look for your props

Discussion in 'Assets and Asset Store' started by Steven-1, Oct 9, 2013.

  1. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    USE THIS VERY GOOD TOOL ALSO FOR MAKING GLOW MAPS

    Hello, I know that this tool is mainly for making worn edges and worn textures, and it does this really very well as I have put in the quote below,

    But also you can make separated maps individually, so you could render a Sharpness map, so I have found an alternative and different use for this tool that makes vey good and well do e sharpness maps, and is to use these maps as a glow map for the available glow shaders in unity, I have tested it myself and works very well

    Worn_Edges_with Sharpness_Map_using_MK_Glow_512.jpg

    Here is an example of how is used and the results you can get using the free MK Glow available on Asset store and using the demo material included MKDemoMat2 with the Worn Edges Sharpness map as glow map. See below at end for a bigger image

    UV MUST NOT HAVE OVERLAPPING TRIANGLES?

    I want to prepare in the best possible way, the 3D model for making only the Sharpness map with this tool, but really do not understand this you have put

    The bold part is what I do not understand, sorry that I am a noob in UV and have very little knowledge about UV maps

    What does it mean that it can not have overlapping triangles?

    Tiling textures is the same as overlapping triangles, if these triangles use the same texture pixels?

    How must be then the UV map to be used with this tool?

    Thanks very much for any help[
     

    Attached Files:

    Last edited: Sep 7, 2015
  2. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    ah, ok, let's see if I can explain it better;

    Each vertex has UV-coordinates , they define how textures are mapped on the mesh.
    So for each triangle in the mesh, there is also a triangle in the UV-layout, which defines what part of the texture is used by that triangle.

    Capture.PNG Capture2.PNG

    This means that if 2 triangles overlap in UV-space, they will use the same part of the texture.

    overlap.PNG

    So what I was saying was basically just that triangles should not overlap if the generated map(s) would provide a different result for both triangles.

    Now about uv's outside of 01-range. This means that the uv-coo lies outside the texture. Generally (when Texture Wrap mode is set to Repeat), the texture will repeat outside this range. That way triangles can still use the same part of the texture, without the triangles actually "physically" overlapping in the UV-layout.

    outside.PNG

    Tiling textures will basically scale the UV-coo, generally causing uv-coo to go outside the 01-range.

    It all basically always comes down to this: Different triangles should not use the same part of the texture, unless you are certain the generated result would be (more or less) identical for these triangles.
    But other than that there are no other consequences or anything about having overlapping triangles (in case you were wondering), if you are happy with the generated maps then everything's fine.

    I hope this helps,
    I know I'm not the best at explaining things :s

    If anything is still unclear, don't hesitate to ask.
     
  3. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Worn Edges will be the 24Hour Deal on Thursday September 17, 2015
    40% off!
    https://www.assetstore.unity3d.com/en/#!/content/10674
    As far as I can tell, it should start at 2 pm UTC on the 17th, and end the next day on 2 pm UTC. (But I would advice to check the store to be sure)
     
    ImpossibleRobert likes this.
  4. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    I notice one review from a few months ago says that this tool is too slow to be practical to use with many objects.... has anything been done to address the performance since that time? Thank you!
     
  5. ZenMicro

    ZenMicro

    Joined:
    Aug 9, 2015
    Posts:
    206
    Ah bugger.. I missed the sale, I was checking it out and added it to my possible list and now i realize it's the best bet i have at aging a vehicle that was created for me that does not have texturing, just a material which i can change the color of easily, but it is so shiny and new it's unrealistic for my purposes... this would take care of that if i'm not mistaken.

    It does work on an untextured mesh right?
    Does it now also do bump mapping?
    And what about an effect like mud splattered along the side of the vehicle? maybe that would require a decal application instead, just wondering, if it also supported decals that could be baked, that would be awesome :)
     
    Last edited: Sep 20, 2015
  6. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Hi guys, sorry for my late reply, I was away on holiday.

    Rendering to giant textures can take some time (depending on the map type), and 4096x4096 really is huge, but IMo it still saves a lot of time over doing it manually.
    But no, performance hasn't been improved since then. I would if I knew how to.
    You should just try to not rerender maps unnecessary, you can easily save and reuse generated maps in it, so its best to do that. When I use Worn edges for an object, I initially create a couple of maps, but after that I generally experiment with how I combine them, without letting it generate the maps again.

    It does work on untextured meshes, just make sure it's unwrapped. (or use the lightmap uvs)
    No, no bump mapping.
    You can create mud splatter using Worn Edges (using the noise, angle falloff, distance, and/or other maps), but there's no decal system.
     
    eridani likes this.
  7. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    For me one way around the loading times would be to test render at lower resolutions.
     
  8. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    this looks too awesome. Thanks for supporting 4.x platform. Jumped to nº1 on my priority list. I'll be using these to wear military equipment such as tanks.
     
  9. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    Hi, I'm just getting started with WornEdges and having a little problem. The mesh in question has subtle bevels on its sharp edges. I need WornEdges to apply its effects to those beveled edges, as if all the sharp edges were worn away. Instead it sees the edges on either side of the bevel surfaces as the place to effect--causing a sort of misplaced double-edge issue. So I wondered if there's a tolerance setting of some kind that might help?
     
  10. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    been a while since i used it but i am sure i remember that there is an angle setting somewhere
     
  11. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Hi Barliesque,
    I'm not sure I understand the situation correctly, could you provide a screenshot to illustrate the issue?
     
  12. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    Here's the mesh with a plain shader so you can see what's going on in the geometry; the Sharpness Map is where I end up with the double-edge problem.


    I've fiddled with the settings and got better results than this, but always there's a concentration along the outside of the bevel, rather than *on* the bevel where I really want it to land.
     
  13. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Huh, that does look strange, I don't immediately see any reason why it does that.
    I'll try to reproduce this and see what can be done about it. (Don't have much time now, but I'll heck it out in a couple of hours)
     
  14. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Can't seem to reproduce it.
    no mater what the settings are.
    test1.PNG
    test2.PNG

    Is that part of the texture maybe used by an other part of the mesh as well?
     
  15. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Oh wait, I think I got it:
    test3.PNG

    I increased the Ray Bias,
    is that what you did?

    In general you shouldn't change the ray bias, it really needs to be rather small (but still bigger than zero), it's kinda like the shadow bias for directional lights in Unity: you want it to be as small as possible without giving any strange artifacts.

    I would have hidden that parameter if it wasn't for the fact that in some strange situations you might need to have to alter it.

    In retrospect I guess I should have hidden it behind an "advanced" flag or something.

    I hope that solves it.
    Let me know if it does (or doesn't), or if there are any more issues.
     
  16. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    I think that's probably it. Thank you! -- I'll check it out later this evening and let you know how it goes.

    Maybe, rather than hiding the parameter, you might use a slider to keep it within a valid range. Actually, that could be a good choice for other parameters as well.
     
  17. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    ...and to confirm, yes that was definitely the issue. Weirdly, I can't see any difference at all using values anywhere from 0.001 to 1e-32 ...so I'm not sure what values would be worth putting into a slider.

    Anyway, thank you very much for your assistance, and for this excellent tool!
     
  18. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    big up
    any know if shader can do this trick
    thank's!
     
  19. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Hi kilik128, what exactly are you asking?
     
  20. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    just for know if edge can be done by shader or substance maybie for dynamics real time rendering

    thank's for this tool is amazing ! genuis stuff
     
  21. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    Anyone tested this in 2018.4? I allways whanted to get this asset but was too busy with finishing the game. Now that I'm done I would like o improve some models that look kinda dull.
     
  22. Jroel

    Jroel

    Joined:
    Oct 25, 2013
    Posts:
    14
  23. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    After all these years, finally another update to Worn Edges! :D

    Update:
    version 1.6 now available


    Most notable changes:
    - Made everything work correctly again in the latest versions of Unity. (previously a small part of the tool didn't work anymore in the latest Unity version)
    - Improved the Ambient Occlusion and Sharpness map generation, which makes the results more accurate.
    - Drastically improved the blur operation for the Ambient Occlusion and Sharpness maps, allowing you to set the blur as high as you want without causing texture bleed, causing a much smoother result.


    For anyone interested, I'm going to release a new separate package focused solely on creating Ambient Occlusion maps, which will be a cheaper package, for those only interested in making AO maps.
    But no worries, you will be able to upgrade the AO package to Worn Edges for the difference in price.
    (Worn Edges can ofcourse create AO maps as well, but it can also do a lot of other things)
     
  24. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Here are some examples of the improved AO:

    crateAOsmall.png
    houseAOsmall.png
    lionAOsmall.png
     
    TokyoWarfareProject likes this.
  25. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    I can't believe I missed this for so long!
    I'm interested, but does this need to run on it's own scene and press play (as in the videos) or can it run on any scene without pressing play, just as an editor tool?
     
  26. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Hi atomicjoe!
    It doesn't need it's own scene, nor do you have to press play, it is indeed a normal editor tool.
    I don't know what videos you're referring to? I never press play to use Worn Edges.
    Edit: are you referring to the animated car-rust video? that was just running in play-mode to demonstrate the dynamic rust.

    Sorry for the late reply, I didn't get a notification for your post (even though I'm subscribed to this thread)
     
  27. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Awesome!
    Yes, that one. ok then.

    More questions:
    1 - Is the ambient occlusion calculated per vertex or per pixel?
    I mean, I have other utilities to bake the ambient occlusion per vertex, but I would rather have something more detailed than that.

    2 - Can it cast ambient occlusion from several meshes or does it have to be all the same single mesh?
    I would be using this to bake the ambient occlusion for characters as textures, and the characters have multiple different meshes that should cast ambient occlusion on one another.
    All the meshes are children of the same parent object, but they are in different skinned renderers.

    3 - Does it support skinned meshes in a specific pose? (I have to bake the character's AO in a neutral position that is not the default T-Pose to cast good shadows)

    4 - Does it include the source code? (to integrate it in my pipeline if needed)

    Thanks :)
     
  28. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    1. It is calculated per pixel and stored in a texture.
    2. Not at the moment, it all has to be a single mesh (it can have submeshes though, meaning a multi-material mesh)
    3. Also not at the moment, so it will be calculated for the mesh's binding pose. (to be honest, I don't think it should be very difficult for me to change it so it does work on posed skinned meshes, so I may look into that)
    4. Partial source code is included; the main calculations are in a dll, but all user-interactions is in c#-scripts, so that should be fine for integrating in any pipeline, but you wont be able to make any changes to the actual AO calculations.
     
    atomicjoe likes this.
  29. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Well, 2 and 3 are no-goes for me. But I'll keep an eye on this and keep subscribed to this thread in case you implemented it in future releases :)
     
  30. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    No problem, I understand.

    I do intend to release a package that only creates AO maps (as worn edges does a lot more than that), for a lower price, and I might add these features you want to it. (can't promise it though)
    I'll post it here when/if I do!
     
    atomicjoe likes this.
  31. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Lars-Steenhoff likes this.
  32. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    603
    How do I make this work with URP?

    I just bought it but I didn't realise it depended on BIRP, which makes it pretty difficult for this project.
     
  33. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    603
    Code (CSharp):
    1. Assets\Worn Edges\Scripts\Editor\Helper.cs(70,97): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    2.  
    3. Assets\Worn Edges\Scripts\Editor\Helper.cs(80,29): warning CS0618: 'TextureImporterSettings.textureFormat' is obsolete: 'Texture format can only be overridden on a per platform basis. See [[TextureImporterPlatformSettings]]'
    4.  
    5. Assets\Worn Edges\Scripts\Editor\Helper.cs(81,17): warning CS0618: 'TextureImporterSettings.textureFormat' is obsolete: 'Texture format can only be overridden on a per platform basis. See [[TextureImporterPlatformSettings]]'
    6.  
    7. Assets\Worn Edges\Scripts\Editor\Helper.cs(83,17): warning CS0618: 'TextureImporterSettings.textureFormat' is obsolete: 'Texture format can only be overridden on a per platform basis. See [[TextureImporterPlatformSettings]]'
    8.  
    9. Assets\Worn Edges\Scripts\Editor\Helper.cs(90,16): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    10.  
    11. Assets\Worn Edges\Scripts\Editor\ExtendTexture.cs(245,29): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    12.  
    13. Assets\Worn Edges\Scripts\Editor\CreateGradientRamp.cs(357,9): warning CS0618: 'TextureImporterSettings.textureFormat' is obsolete: 'Texture format can only be overridden on a per platform basis. See [[TextureImporterPlatformSettings]]'
    14.  
    15. Assets\Worn Edges\Scripts\Editor\CreateGradientRamp.cs(357,28): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    16.  
    17. Assets\Worn Edges\Scripts\Editor\CreateGradientRamp.cs(371,9): warning CS0618: 'TextureImporterSettings.textureFormat' is obsolete: 'Texture format can only be overridden on a per platform basis. See [[TextureImporterPlatformSettings]]'
    18.  
    19. Assets\Worn Edges\Scripts\Editor\CreateGradientRamp.cs(371,28): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    20.  
    21. Assets\Worn Edges\Scripts\Editor\Map.cs(165,27): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    22.  
    23. Assets\Worn Edges\Scripts\Editor\Map.cs(177,27): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    24.  
    25. Assets\Worn Edges\Scripts\Editor\BakeWornEdges.cs(876,9): warning CS0618: 'TextureImporterSettings.textureFormat' is obsolete: 'Texture format can only be overridden on a per platform basis. See [[TextureImporterPlatformSettings]]'
    26.  
    27. Assets\Worn Edges\Scripts\Editor\BakeWornEdges.cs(876,28): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    28.  
    29. Assets\Worn Edges\Scripts\Editor\BakeWornEdges.cs(999,36): warning CS0618: 'TextureImporterFormat.AutomaticTruecolor' is obsolete: 'Use textureCompression property instead'
    30.  
    31. There are inconsistent line endings in the 'Assets/Worn Edges/Shaders/Unlit_UV2.shader' script. Some are Mac OS X (UNIX) and some are Windows.
    32. This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.
    33.  
    34.  
    Getting a lot of import warnings in 2021.
     
  34. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    603
    I just loaded this up in a demo scene and tried it on a few small objects. Unfortunately I was really disappointed.

    The speed is incredibly slow and the UX is really rough. I have a $4000 beefy PC and it’s struggling with 1024 pixels and a hundred triangles. All the curves require rebaking, and I simply wasn’t able to get results similar to the example objects. I did see the review warning about speed, but I thought a hefty 2022 PC would make a big difference.

    I really feel like this asset needs an example video without time skips to make it clear what the experience is like, because this does not seem usable or time saving. If you know the tool very perhaps you can guess the result but it seems incredibly to get good results in less than 30-60 minutes.

    Will you honour refunds?
     
  35. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    I have no idea what BIRP is and google did not come up with any usefull results.

    This package was made before URP, and I never use URP and apparently I wrongfully assumed everything should work fine in it. The tool itself actually works, but the preview shaders don't. I'll try to fix that as soon as possible.
     
  36. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Yeah, Unity changed the texturecompression. Currently these warnings are harmless (but admittedly annoying), they just mean I have to change it to the new system. I'll see to that as well.
     
  37. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    I honestly never really understand the complains about speed, no map ever takes more than a minute or 2 to generate, and that's on my 10 year old pc. Some people complained about it back when I initially made the tool in 2013, but as you said, a strong 2022 pc shouldn't have any problem with it. Maybe it depends on graphics card, I honestly don't know.
    How long does it take for you to generate a map?
    Maybe you changed some of the settings that increase calculation time? (like rays, and supersampling)

    by the way, the polycount of the object barely affects the calculation time, it's mostly the amount of rays (depending on the map), the texture size, and supersampling, that affect the duration.

    The example videos honestly barely cut out any time. But it's true that you need to get used to the tool to make best use of it. I can imagine someone new to it will lose a lot of time recreating maps often.
    Although honestly I rarely need to alter any settings, the default ones are 99% of the time good. So I also rarely need to create a specific map more than once. The only thing that needs tweaking on a per object basis is the "combine curves", but you don't need to regenerate the maps when tweaking these. Only the combined map, but that one takes no time to generate, which is explained in the help file, maybe that wasn't clear?

    Can you show some example of what objects you tried it on? I'm curious cause you said you can't get results similar to the example objects, but these all just use the default settings as well. (more or less at least)

    And yes, you can get a refund. I'm sorry you had a bad experience with it.
     
  38. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    603
    @Steven-1 Thank-you for the detailed reply. I have sent a DM to arrange that refund.
     
  39. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Just wanted to give a quick status update:

    I'm working on making Worn Edges compatible with URP and HDRP
    (as stated before, the tool itself already works in these, but some of the preview shaders don't)
    While working on this I noticed the preview shaders give an incorrect result in linear colorspace, so I will fix that as well. (and that might explain why some people had trouble getting the desired results in the past)

    The speed issue is honestly not a big issue IMO. Any map shouldn't take more than a couple minutes on a normal pc. If you have a different experience, please do let me know (with the proper info regarding what you are doing so I can try and see what's wrong)
    And once you get a little bit more familiar with the tool and the settings, you won't have to regenerate any maps more than twice at most. Making the time lost generating maps not that big of a deal.

    I do feel the tool itself might be a bit confusing to use at first, and I would like to improve that, but I honestly don't really see how.
     
    chuckyluv869 and one_one like this.
  40. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    455
    Update:
    version 1.7 is now available


    Most notable changes:
    -Made the preview shaders compatible with URP and HDRP
    -Fixed the sRGB texture flag for the textures to get correcter results in linear color space
    -Fixed the texture importer warnings

    Edit:
    Due to a bug in Unity, Unity versions prior to Unity 2020.2 don't correctly import the new URP shaders. I'll see if there is anything I can do about it.
     
    Last edited: Mar 16, 2022
    chuckyluv869, adslitw and DrMeatball like this.