Search Unity

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

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

  1. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    It's indeed just a plane with an unlit material with the baked texture on it. As it uses the same texture as the robot, every time I baked the results, it would overwrite that texture, displaying the result immediately.
    I just did that to show the resulting texture to the viewer.

    (On a side note, I would advice to set it to not overwrite existing textures, that way you can always go back to a previous version if at any time you don't like the new result after baking.)

    The alpha channel of textures is often used for specularity, for that reason Worn Edges allows to alter the alpha channel of textures, not just the RGB color channels.

    If you want the alpha to be 1 (white), simply use a Color ramp texture where the alpha is 1. (Note that a texture without an alpha channel has an alpha value of 1, so it's the same as it having a complete white alpha channel)

    Photoshop always displays the alpha channel of a png as the opacity of the image. However the color value in the transparent pixels is not lost, simply go to Layer -> Layer Mask -> From Transparency to seperate the alpha into a layer mask. (Then right click this layer mask and disable it to view the colors of the texture).

    I'm not sure what you intend to do with the textures afterwards, so I can't say if this is a problem or not (the fact that the specularity is baked into the alpha channel), but I hope this bit of info helps.
     
  2. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    im using cs4 so no layer mask from transparency but it does load into photozoom2 so i am using this to convert it to a bmp,

    so far with a couple of days practising worn edges has beaten my expectations and is a total time saver after spending ages trying to age textures for models, anyone reading this who is thinking of purchasing worn edges just go buy it you wont regret it.

    cheers steven
     
    Last edited: Apr 13, 2015
  3. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
  4. Tanoshimi2000

    Tanoshimi2000

    Joined:
    Feb 10, 2014
    Posts:
    46
    This looks like a fabulous tool. Saves me from building one as a script, myself! I did have two recommendations that would cinch it for me to buy it.
    1. The video shows a lot of playing with curves and gradients. It looks way too complicated. Would almost seem faster to follow a photoshop tutorial or use a plugin. My recommendation is that you simplify it. Maybe add preset in dropdowns for the best or most common settings. Sure it should still have that level of control, but for those who need this because they're not that good with textures, how about something as simple as selecting a color or texture, then applying the effect to it?

    2. Maybe drop the price to $20 or $25. I can see you put a lot of work into this, but it's still pretty expensive. Again, considering the learning curve, and tutorials on roughing up textures. No offense, it's a great product, just a bit pricey.
     
  5. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    @Tanoshimi2000 Hi i recently purchase worn edges and i can tell you that there are a lot of presets for rust,dirt,grass moss etc, and you can of course save any tweeking to the presets as new presets of your own names, at first i also hesitated over the price but for the amount of time it saves it is well worth it.

    if you have seen the videos and wonder what steven is doing on the 2nd screen that is not visible he just has the ramp windows and texture ramp windows open so that it is quicker to set them up, these can be seen in the other videos so you know what he is doing.

    the curves and gradients are a bit daunting when you first get to use the program but the instruction manual is very good and explains the way the gradients work, take a few days practising on basic geometry and you will soon get the hang of it

    remember that you MUST have uv's mapped on your model as if you dont then the noise map will just render as black,
    it can also save time if you are just going to use one colour on your model and then rust it or dirt it by not having to stitch your uv's beforehand hence saving time.

    one of the most useful assets i have purchased for unity and if you are orried steven will answer your emails and regularly checks this forum.
     
  6. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    @Steven1 function request, there seems to be no way of editing a saved ramp unless trying to copy it using the color picker which is very time consuming and not very accurate, could you please add a way to load a saved ramp into the editor as this would save alot more time when trying to edit a ramp.

    cheers
     
  7. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    1. I kinda agree with you that its rather complicated at first, but It's like Melonhead says, you just have to practice with it so you can get the hang of it. In the end every object is different and depending on which effect you want to achieve you'll need different maps and different settings. That's why presets wouldn't really work for this, when I use Worn Edges I always just start of with the default settings for the maps, and then just alter them where I see fit for the specific object and effect I'm working on.

    2. I always try to ask for a fair price for my assets, and I honestly don't think I'm overcharging for this package. I feel like there are a lot of packages in the store that do a lot less but cost a lot more.
    I'm sorry to hear you think it's pricey, but I don't make a habit of changing my prices often.
    In general the price I put up initially is the price it stays. (well except for this package actually, which originally costed 25 USD, but I changed it to 35 after some major updates which added a lot of functionality)
     
  8. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    I was actually working on this a while ago, but didn't entirely get it the way I wanted, the problem was that Unity has a limit of 8 color keys per gradient, and when importing a gradient from a texture it would sometimes ditch important color keys.
    Though I'm sure I can make it work some way.

    But since Unity4.something you can actually save Gradients in Unity in Preset Libraries, you could make a Gradient Preset Library for Worn Edges, that way you can easily reuse Gradients.

    I was also making it so you don't have to save the gradients to a texture if you don't want to, you could just assign it to Worn Edges directly from the Gradient Ramp window. (or at least that's the plan)
    Combined with those Gradient Presets that would be very usefull I think.
     
  9. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    i do like how it saves the ramps at the moment with the opacity seperate, but just a way to re-edit them would top off this asset but if unity is the problem with the 8 limit then it is not something that can be changed, certainly saving me a lot of time with my textures, cheers
     
  10. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    Well that keylimit is more of a hindrance than a real blockade, it doesn't make it impossible to get a gradient from a texture, it just means it won't always be a 100% correct (but close enough most of the time).

    I actually worked on this a lot this past week, and I managed to improve this gradient importing.

    But like I said, storing the gradients in Unity's gradient preset library functionality will be a lot more useful (then you actually don't have to load the gradient from a texture, you can just use the gradient directly from the library)

    I've made it possible in Worn Edges to use these gradients directly without saving them to a texture, that will be very usefull I think, as you then don't have to save the gradient ramps to textures all the time.

    I'll probably have an update available within a couple of weeks.
     
  11. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    @Steven1, is there any way to make the noise create random as it will always produce the same pattern when using the same settings, this would be great for texturing many models n a scene that are the same mesh but need slightly differing texture pattern of rust or dirt without having to keep slightly changing the numbers for generation of the noise map?.

    The gradient idea sounds good but please also give us a way to save/backup the gradients and ramps incase of crash or reinstalation, oh and can you give us a way of naming the curves when we save them.

    cheers
     
    Last edited: Apr 26, 2015
  12. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    Making the noise randomised (adding a "seed" parameter basically) was an option I always meant to add, but never got around to. I'll try to add it as soon as possible.

    The gradients can be stored in a separate file if you desire, you can the backup this file (if that's what you mean).
    Curves (and gradients for that matter) can already be named, you have to switch to "List" view to see it though (default is "Grid")
     
  13. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    The difference between the preview and the baked texture is that the baked texture just shows the texture as is, while the preview renders the effect at runtime, effectively applying the gradient ramps per screen pixel (rather than per texture pixel), which can be a lot more precise than the actual texture pixels (if you're looking close at the model).
    Basically the baked texture looks like that because the texture pixels are bigger than the screen pixels (because of the resolution of the texture, and the UV mapping).

    There is nothing I can do about that, I can not put more info into a pixel than just that one pixel.

    To get a better result you either need a bigger resolution for the texture, or optimizing the UVs (making sure no space is wasted, combining uvs of identical or mirrored parts of the mesh that can have the same worn result, make more important parts of the mesh use a larger portion of the UV-space, ...)

    I'm sorry for this misunderstanding, I didn't meant that the preview is exactly the same as the baked result, I didn't realise it could be interpreted that way. :s
    (I just meant that it previewed how the combined map and the gradient ramps translate to the end result)
    (IMO it's actually the preview that's incorrect, rather than the baked result, as it potentially shows more detail than is possible)

    You could also use the worn shader at runtime, then it does look exactly the same as the preview. The only real problems is that that shader might not be entirely what you want at runtime (as it's basically a modified bumped specular shader), and that it ofcourse only allows 1 effect (whereas you can bake multiple effects on 1 baked texture).


    And indeed small sharp transitions in the gradients can be smaller that a pixel, resulting in them disappearing in the end result. I would advise in that case to use multi-sampling for the baking (increase it to 2 or 3 should be enough), it will use multi-sampling when baking the texture then (meaning it will actually sample more than once for each pixel), it will make these small sharp transitions be lost less.
     
  14. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    @Steven true the shader option runtime is exactly as preview and is great when only using 1 effect, if i was you i would re-word the part in the manual as some people will misinterpret it, as usually in software a preview is usually not as good as the final output so like me i spent a while not baking but just practising with objects getting ramps and curves to look how i thought they would be in the final bake, now i know i will work around it but for some it will be misleading, everything else does render great except for the sharp edges or hard changes but for quikly dirtying and rusting a model i cant fault it.

    cheers, i have now deleted the posts
     
  15. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    433
    Do you offer any tutorials on how to use this? I haven't purchased yet but am looking into it, I have found no tutorials anywhere as of yet.
     
  16. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    just the 3 videos, bit hard to meke a tutorial because too many options and not knowing whatyou want to achieve, just practice...
     
  17. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    You're right, previews are generally less than the final, I'll change the description in the manual to make it more clear.
    I'm sorry for the confusion.
     
  18. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    There are a couple of videos showcasing how I use it, but no real tutorials no.

    You can see those videos here:



    and an old one (it showcases an old version of the tool, with less features, but the core is the same, so it could still be usefull to have a look):
     
  19. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    433
    Yea i already saw those videos but you go through everything so fast it's pretty hard to tell what your doing exactly, you may want to make some tutorials, if it's an asset you can do a lot with, it would be beneficial to display all the different approaches and uses.
     
  20. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    its not really practical for steven to create loads of tutorials as changing curves or ramps can change a lot of the effect, once you get the hang of the ramps and curves you will soon pick it up
     
  21. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    @Steven1 any chance of getting the random seed in for the next patch, an option to switch random on or off in the map section would be help also.

    cheers
     
  22. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    yes, the random will ofcourse be optional
     
  23. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    cheers, must say your customer support is excellent steven
     
  24. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    I second the tutorials, I saw directional occlusion and when I rendered it I couldn't quite tell what the final result was about.
    I think some basic tutorials on how to render each type of map "correctly" would be a good start. No need to go too in depth just give the users a point of reference.

    Also I want to make a feature request if this feature is not already in there. So far I have just purchased about a week ago but its slow rendering times did not make me happy especially since I run quite a strong processor, despite that though I am willing to overlook it for now. My goal is to basically make this like the Beast Lightmapper. Right now with the removal of beast in Unity 5 and the infancy of GI and it not being ready yet to replace beast theirs an opportunity for a really nice lightmap baker. Take a look at this demo to see what I mean, its absolutely beautiful, clearly it was made with beast and the lighting was baked....

    https://www.assetstore.unity3d.com/en/#!/content/36959

    Play the demo and see for yourself, physically based rendering cannot achieve that style and based on Unities roadmap it will be some time before that changes.

    Back to the basic question : Does your ambient occlusion render take into account penetrating objects such as the log on the ground where the AO is seen between the ground and the bottom of the log?

    Its either that or make an importer of the beast lightmaps into Unity 5....
     
    Last edited: Jun 7, 2015
  25. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    I have bought this and have to say that the results are very good and high quality and we'll worth surely the price and think is not expensive for what results you get, really time saving and useful

    Do not not judge the results from a few 3d models results, test it more and learn how to use it in the best way
    y, as the result will depend very much on the quality and shape of the source model
     
    Last edited: Jun 7, 2015
  26. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    I'm pretty sure that package you link to doesn't use lightmaps, but rather realtime shadows, screen space ambient occlusion (or obscurance) and some minor hand-painted ambient occlusion. I agree that it looks very nice though.
    Regardless, I don't see the relevance as Worn Edges is in no way a replacement for lightmaps.

    Regarding the directional occlusion map, it is similar to a shadow map in appearance, but is not meant as a replacement for shadows, just like all the other maps, it is meant as a way to determine how the source texture should be altered.

    Have you looked at the manual? Every map is described there with an example picture, the values there are the ones used to create that map, in general they don't differ much from the default values.
    I now it isn't much of a description, but it should give you an idea of what the map should look like, if it doesn't look anything like it, there must be some setting wrong.

    The values used (when describing size) in Worn edges, are not in meters or inches, but simply in units, and the default values where set for objects that range in size from about 1 to 10 units. Worn edges ignores the model's scale and other transformations in the scene (so it's best to set its's scale to 1 and rotation to 0 then), so if your models are scaled in the scene, you have to take that into account when using Worn Edges.
    A problem some people have had is that their units were set differently, which caused their meshes to either be really big or small (in units) without them noticing, causing worn edges to produce seemingly strange results.
    You could be having a similar issue.

    Regarding the Ambient Occlusion, yes it does work for penetrating objects, however, just like with the directional occlusion, Worn Edges is not meant as a replacement for Lightmaps or anything like it. just so you know.
     
  27. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    thanks :)
     
  28. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    I see. I am glad for the penetration aspect. Does that mean If I have a plane and put objects on top of it that when I render the AO map for the plane that the AO from objects on it will be there? These are seperate objects on the plane.

    I was hoping for a way to export lightmaps out of Unity 4 into Unity 5 since their seems to be no asset that can do this. Since you seem to be one of the only people I know who has the knowledge I thought you could benefit from making a good lightmap baking system since their is a demand.
     
    Last edited: Jun 11, 2015
  29. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    do your lightmap in your 3d application, do not rely on unity for it. i am sure worn edges will only lightmap the highlighted object, not seperate intersecting objects, i have been using worn edges for a few months now, i have not used it for lightmapping but pretty sure seperate objects cannot be lightmapped at once, it needs selected objects only, using beast from unity 4 will not be as quick or as good results as your dedicated 3d modeler/application.
     
  30. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    I have tried using my 3d app for it, and problems usually arise when creating intersecting objects. Most of the Unity models I have are assets I bought and I can't be expected to export all of them into my 3d app and light them there.

    So its definitely not faster. For me using beast was quicker and results were better. But I used some custom settings in beast allowing me to bake lightmaps in about 30 seconds. This also applies with the new GI system for baked AO too - 30 seconds.

    The main problem is the new GI system doesn't have that fantasy, painterly feeling seen here :
     

    Attached Files:

  31. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    ok, didnt realise you were using assets, this is a problem, now i am sure you can export lightmaps from unity 4 as i used to do it but this was with an early version of unity, prob 4.3 as after that i stopped exporting the maps and done mine in max, i am sure the lightmaps are saved into a folder that you can just copy the textures from and load into unity 5. i am sure this was also demonstrated in a youtube video somewhere, just search for unity export lightmaps.
     
  32. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Sure I will have a look for it, thanks.
     
  33. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    if i find the info in my old files i will post it here for you.as i say i know it can be done as i used to do it....
     
  34. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    Thanks very much!
     
  35. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    ok, unity 4.x saves lightmaps as a .exr file in the project folder, you may have to search for it using the start/search box, just type.exr you will then have to find the right one by right click on the exr and open file locaton or just go through all the project folders until you find .exr files, these are basically bitmap files that you can load into photoshop, and resave as a jpg or whatever you need, these will be using a seperate uv channel, so you should be able to just load the file into the lightmap slot on the models shader in unity 5 as long as you can keep the uvs on the models 2nd channel etc, or you can just render the lightmaps in unity 4 save the project and then open it in unity 5
     
  36. SilverStorm

    SilverStorm

    Joined:
    Aug 25, 2011
    Posts:
    712
    No way that seems really simple, I will have to look into that when I finish up my scripting stage! Thanks a lot! It sounds too simply to be true!
     
  37. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    lol many times i have been stuck on something for weeks until someone points out a simple solution.... let us know if it works out for you
     
  38. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    I forget to tell you, but I recently found a bug in the Directional Occlusion map, which could have made the generated map look weird.
    The bug was that the Direction Vector wasn't being normalized, which caused incorrect results when the vector has a length different from 1.

    I fixed it and it will be available in the next update (along with the extra gradient ramp functionality I talked about a while ago).
    The update should be finished soon.
     
  39. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    @Steven1 is there anyway to backup the curves as i have many custom saves but cant find where they are saved to make a backup?

    cheers
     
  40. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    Open the curves editor (open a curve),
    click on the icon next to the saved curves in the library (in the lower left corner),
    click on the button at the right side of the "Presets"-label (in the upper right corner),
    choose "Reveal Current Library Location"

    Unity will then either highlight the library file in the editor (if the file is located in the assets folder), or open an explorer-window (in Windows at least) to show the file (if it's stored outside of your project).
     
  41. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    cheers steven, i should have spotted that lol, i am still amazed at how much time worn edges has saved me.
     
  42. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
  43. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    @Steven1 Just realised a problem, i have only just started putting my textured objects into my first scene after spending weeks texturing, noticed that the worn shaders do not seem to be recieving shadows from point and spot lights can you please fix for us, they are recieving directional light shadows which is why i have only just noticed the problem as while texturing was using a directional light, hope you can sort this out soon. i am using unity 5

    regards
    dave
     
  44. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    I'll look into it
     
  45. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    Cheers, oh steven is there anyway to add the metalic and smoothness sliders to the shaders?
     
  46. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    Switching to deferred rendering should fix the problem (if that's an option).
    The worn shaders are based on the Unity (legacy) bumped specular shader, none of those (pre Unity5) shaders can receive shadows from point lights in froward rendering. In fact, according to the docs, Point lights can't cast shadows in Forward rendering at all, though that doesn't seem to be true (anymore), since the new standard shader can receive shadows from point lights. (though at the moment, it's a mystery to me how)

    The solution would be for me to create new worn shaders based on the new standard shader. Which would add the PBR functionality to these shaders as well .
    (I have never altered these new standard shaders before, so I don't know how long it will take for me to make these new worn shaders.)

    I've finally finished Worn Edges version 1.5, it should become available soon.
     
  47. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    Thanks, appreciate the work you are doing steven.
     
  48. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    Turns out fixing the shadows is super easy to do;
    In the worn shaders in the line #pragma surface surf BlinnPhong
    you just have to add fullforwardshadows
    And in some cases you also have to add the line #pragma target 3.0 underneath (or above, doesn't matter)

    Also, version 1.5 is available (I'll write the proper post about it in a sec),
    this update doesn't contain the fix for the shadows though. (the update was submitted long before I found the fix for the shaders)
     
  49. Steven-1

    Steven-1

    Joined:
    Sep 11, 2010
    Posts:
    471
    Update:
    version 1.5 now available

    • Gradients can be loaded from texture.
    • Added gradient and curve libraries. (as a reference, it is recommended not to alter these libraries, but instead copies or new ones)
    • Gradients can be assigned to Worn Edges directly (without needing to save it to disk).
      It is recommended to use this functionality in combination with a gradient library (instead of saving these gradients to png), as this is much more convenient.
    • Added noise seed functionality to the noise maps.
    • Fixed bug in Directional Occlusion map (it used to give incorrect results when the Direction vector wasn't normalized)
    • The RGB and alpha can be stored in separate textures in the final bake. (and alpha can be discarded)
    • When there's no source texture, the Final Bake will use the source material's color as background color. (instead of always white)
    • Final Bake can optionally be kept separate from the source texture (and have the mask in its alpha channel)
     
  50. melonhead

    melonhead

    Joined:
    Jun 3, 2014
    Posts:
    630
    @Steven1 thanks for adding the random seed, saving even more time from texturing.