Search Unity

Auto Fence Builder [Released]

Discussion in 'Assets and Asset Store' started by Two_Click_Tools, Oct 18, 2014.

  1. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Auto Fence & Wall Builder v 2.2 on Asset Store

    This is mainly a maintenance release addressing some Build issues.

    Improves fake mitring of corners on fat walls.

    Contains example of calling AFWB from your own scripts, either in Editor or at runtime.
    As the question about runtime has been asked often, then we're pleased to give an unequivocal 'yes' to this now - AFWB does support runtime use.

    As you'll know if you already have AFWB, but for those considering purchase, building in the editor is done by shift-clicking in the scene. This is fast, simple, and just works, (while building), but this is almost certainly not the way you'll want your player to do it at runtime because:
    • You may already have all mouse movement and clicks in use, for your gameplay.
    • Your player may not have a clear top-down view of where to place the key building points for the wall or fence.
    • There's no shift-clicking on mobile/consoles

    So for runtime, there will inevitably always be a little coding in order to invoke the fence-building in a way that suits your gameplay and controls. (approx 10 lines, depending on what you need).
    However, it's as simple as providing AFWB with a list of nodes (Vector3) which represent the click-points, and the name of the fence design preset you want to use.
    For any artists non-coders we'll happily provide the script you need if you let us know details of your gameplay, and how you would like your player to invoke the building process.
    We'll try to add further runtime examples when we get feedback as to how devs want to use it.

    Thanks

    Joe
     
  2. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    New Features in Auto Fence & Wall Builder 2.3 (Submitting to Asset Store next week)

    1. Adding Parallel walls & fences. It's just a one-click operation to add a parallel run, with a setting for the distance between, and which side to place it.



    Thanks

    Joe
     
    lundon, radimoto and julianr like this.
  3. LeakySink

    LeakySink

    Joined:
    Apr 9, 2012
    Posts:
    128
    So I just bought this asset, seems solid but I'm confused about something.

    In my project I have a ton of fences, but I don't want to finalize them in case the terrain/buildings move etc. Is there a way I can keep them open for edit without having a million auto fence builders open and scanning through every one?
     
  4. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi, yes there's a way to have the best of both worlds.
    When you've finished working on one for the moment, do finalise it (Finish & Start new), and make sure you note which preset you used, or if you made/modified your own, save that preset with a unique name. So let's suppose you called that "Finished1"
    If you later want to change it, drag the Finished1 folder in to the 'Copy Layout' of the inspector. You can choose the same design preset again or choose a different one.
    (You can then delete or disable the original)

    Joe
     
  5. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    306
    Hi,
    is it possible to generate fake fences that would act only as colliders. But nothing will be rendered?

    You sometimes just need to create invisible barriers and auto fence builder is very efficient for this.
    I can manually disable renderers, but maybe more supported way exists or could?

    Thanks
    Peter
     
  6. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi Peter

    Yes, if you email the support address I'll send you a script to automatically disable the renderers.

    Joe
     
    camel82106 likes this.
  7. camel82106

    camel82106

    Joined:
    Jul 2, 2013
    Posts:
    306
    Incredible support like always. In few hours I have working solution with invisible fences based on Joe's script. So I'm able to create invisible bounds for player.

    Very powerfull asset even for other things like fences.
    Thanks!
     
    hopeful likes this.
  8. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Thanks for the feedback, we'll add a simple 'don't render' option to the next update, for people wanting to create invisible boundaries.
     
    camel82106, hopeful and julianr like this.
  9. Der_Kevin

    Der_Kevin

    Joined:
    Jan 2, 2013
    Posts:
    507
    hey, just something about the runtime feature.
    is there any demo scene included?
    i know you said it depends on the gameplay but i just need a simple sample, the rest i can figure out on my own
     
  10. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi, yes there is, it shows how to call the main building functions from your own script. If you try it, you can contact support if you want any help setting it up for your gameplay.

    Joe
     
    Der_Kevin likes this.
  11. ataberk

    ataberk

    Joined:
    Dec 29, 2013
    Posts:
    2
    Hey! I was researching for fence-like collider generator and i saw this update note few threads above. I guess this is not released yet. I'm considering buying the asset, would you send me that "disable renderer" script as well?
     
  12. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Yes, drop us a line at the support address and I'll send it out. Apologies for the delay in adding this to the latest release.
     
  13. ataberk

    ataberk

    Joined:
    Dec 29, 2013
    Posts:
    2
    Cool thank you very much!
     
  14. Vontarga

    Vontarga

    Joined:
    Oct 14, 2014
    Posts:
    99
    Auto Fence Builder is an amazing tool and one of the best assets in Unity. Plus (and just as important) support is the best I have ever found in Unity Store.

    I have been plagued with one serious problem from the time I first used this, right through the latest version of Unity 5.4.1f1. Most of the time, when I select Finish and Start New (and then hit "save" in Unity), when I play the game my fence has disappeared.

    At times I have made five or six fences before one will "take," and stay in world.

    Today, I am using AFB for the first time in 5.4.1f1, and while the fences are instaling perfectly, I have yet to have one remain in world.

    Am I doing something wrong? How can I correct this serious and VERY annoying problem? I create very complex builds in our virtual world, and at times we are talking about a LOT of very detailed work just vanishing. :(

    All my existing fences are fine, and were unaffected by the upgrade to 5.4.

    Thank you. :)

    Still a LOYAL customer and promoter!
     
  15. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi Reid, yes, sorry, that does sound very annoying! So, you go in to Play mode from the editor, and the fence is missing in-game, and the when you go back to the editor, is it gone from there too? Or just missing while in Play?

    Haven't had reports of this before, so I'm sure we can find a quick fix.

    Are you on version 2.2?

    Are you getting any Error messages as you go in to Play?

    In your edit/player settings, are you using Static batching? If so make sure AFB's combine mode is set to Static also.
    (you'll find that setting near the bottom of the AFB inspector)

    Can you try dragging the Finished fence (top level folder) in to your Assets folder, this will create a prefab, this might hint at what the problem is.

    Look forward to hearing from you.

    Thanks

    Joe
     
    Vontarga likes this.
  16. ArchoTek

    ArchoTek

    Joined:
    Jun 28, 2016
    Posts:
    2
    Hey guys!
    We were just looking for some fence-related stuff and came across this. Looking great! One question: Can we make roads using this system? We were also looking into EasyRoads, but it'd be great if we could just get this and use that instead for roads - it's very nicely priced!
    Victor
     
  17. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi, thanks for your interest!

    Although AFWB allows you to use any mesh or model for each section, it's not ideally suited for roads because of the extra width. With fences and walls, each section meets at a pivot point at the centre of each end, and because you're not typically not looking down from directly above, any overlap at the meeting point is barely noticeable. With road sections where pieces meet at a sharp corner, it might look a little ugly to see the overlap.

    I'd love to sell you a copy ;), but in this case it's probably not perfect for your job.

    If you happen to have a prefab of a road section you would like to use, send it to the support address and I can upload an image to show you how it would look inside AFWB

    Cheers

    Joe
     
  18. Vontarga

    Vontarga

    Joined:
    Oct 14, 2014
    Posts:
    99
    ZOIKS! I just scared myself half to death. I thought I had the latest version (everything downloaded and installed fresh when I upgraded top 5.4.1f1), but when I checked the read me file it stated 2.1. So, without thinking, I decided to do a fresh install and deleted Auto Fence Builder. Suddenly, the dread "purlpish pink" missing textures showed up all over our vitual world! Fortunately, when the re-install was complete everything went back to normal. WHEW!

    The read me file still says 2.1, so it just must be an older read me doc in the 2.2 folder.

    Joe, I appreciate your fast and spot-on response (as always). I may need to have my CTO take a look at this, as some of it is over my head. In answer to your questions:

    1. It vanishes in Play mode, and is gone for good.

    2. I NEVER get error messages with Auto Fence Builder.

    3. Everything else works absolutely perfectly, other than this one "minor" issue. ;)

    4. It took me a while, but I found that Static Batching is selected.

    THAT DID IT! You the man, Joe!

    I worked through your list and discovered I had Static Batching set in Unity, but NOT in AFB Inspector. Changed this, made two test fences, and everything is working FLAWLESSLY.

    Wow. You are good. First time you encountered this issue, and you targeted the correct cause and solution in your first response.

    If I could have only three tools in Unity, and NOTHING else, AFB is one of the three ... tied for first place.

    Thanks, man. :)
     
  19. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Thanks for the detailed reply, it helps a lot. I'll make sure to put a warning in the next update if the Static settings are mismatched.

    Good luck with the project.

    Cheers

    Joe
     
    Vontarga and hopeful like this.
  20. jaiverma

    jaiverma

    Joined:
    Nov 8, 2013
    Posts:
    10
    I have a question I would like answered please.

    When I am laying down any fences (be it a custom fence or even pre-loaded ones), it randomly scales them horizontally based on the distance of my next mouse click. What if I want uniform fences (say for my custom object) and not scaled in any way. What should I do? Is there an option?
     
  21. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi, the distance between each post, which gives the horizontal scale, is set by the Interpolate: Distance Between Posts control. For instance, if this was set to 4m, and you clicked once at the beginning, then again 40m away you would get 10 equal sections of 4m each. I'm not sure how you're seeing random lengths... could you post a screenshot (or email the support address)?
    If your clicks were to be 41or 39m apart, then the length of each section would get adjusted slightly to fit, i.e. 4.1 or 3.9m, but still uniform and not random. In other words, it will find the closest length possible to your 'Distance Between Posts' in order to fit a whole number of equal-length sections. Is this what you're seeing?
    Would you be able to post an example?

    Thanks

    Joe
     
  22. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    670
    I have a suggestion unrelated to your asset. You should consider assigning an image to your profile. That would make it easier to read through your forum, because your own posts would stand out from the posts of users who likewise have not selected an image. Sometimes I read through entire forum threads for asset developer comments, only.

    For example, mine is a photo. It's not a special logo, but it is unique and can easily be seen at a glance. I would like to see your posts at a glance, too. ;)
     
    Vontarga and Two_Click_Tools like this.
  23. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Nice suggestion, thanks... I should have thought about that before!
     
    Vontarga and wood333 like this.
  24. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    670
    Great choice! It really pops and is clearly the official Auto Fence Builder designer post.
     
    Vontarga likes this.
  25. ThomasBKat

    ThomasBKat

    Joined:
    Jul 21, 2013
    Posts:
    3
    really like the concept TCT ... a simple question ... can I build tee'd fences as a single instance?
     
  26. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi, sorry, not sure what "tee'd" means?


    Joe
     
    Last edited: Dec 18, 2016
  27. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184

    Auto Fence & Wall Builder is currently on sale in Unity's 'Holiday' sale for $15 - 60% off.
    :)
     
    Last edited: Dec 19, 2016
    julianr likes this.
  28. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Following an update to Unity 5.5, If you see a request to update the API, you can safely do this.
    (AFWB works perfectly in 5.5. This updates one line of code, an obsolete call to 'random'. This will be modified in an imminent update as soon as the 3-day Unity sale is over)
     
    julianr likes this.
  29. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,114
    Go grab Auto Fence & Wall builder if you have not done so already... a worth while and time saving asset that will add value to your scenes as well as make it look more lifelike :)
     
  30. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    401
    Hi, I had tried procedual 3d softwares like Houdini and end up with painful. Does this asset requires any skills like that?
    I also notice this asset has scary package size, 1.6GB, the biggest one I'd ever seen! Would it blow up my game size?
     
  31. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi Zhuchun, no this is extremely easy to use. After you import it, all you have to do is shift-click in the scene to place your fence/wall. There is nothing to learn, just click! Then you can choose different fence styles from a menu.
    Of course, if you want to create your own designs you can use the controls in the inspector, but it's not necessary in the beginning.

    It is a big package size because of the huge number of fence styles available, all of which have meshes and artwork.
    This will NOT increase your game size; when you are ready to build, there is an option at the bottom of the inspector
    "Unload Unused Assets". This will remove everything except the ones you are using. A typical fence design with 4 or 5 components might add around 10-20 Mb to your build size. You can also use your own parts if you wanted to design a fence that only used very small textures to keep the size even smaller.
     
    Last edited: Dec 19, 2016
    zhuchun likes this.
  32. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Thanks, glad you've found it useful!
     
  33. UnityRocksAlt

    UnityRocksAlt

    Joined:
    Dec 28, 2015
    Posts:
    138
  34. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi, after finishing a fence there is a button marked 'Finish & Start New'. This turns the fence from a procedural model into ordinary Unity Game Objects, meshes, materials and textures. If that tool you mentioned works with regular Unity Game Objects etc., then there's no reason why it shouldn't work.

    That said, I just quickly tried it and although it created the combined mesh perfectly, the materials appeared to be missing when I imported the .obj back in to Unity. Does that tool usually work with Multiple PBR textures?

    UPDATE:

    Testing in Unity 5.5, Mac 10.11, the "Scene OBJ Exporter Tool" you linked on the Asset Store does not seem to export textures correctly. Creating a simple sphere in Unity, then adding a material with textures, then exporting: the resulting .obj file has no textures when re-importing in to Unity, or opening in a modelling app. As mentioned, it does export the meshes perfectly, whether individual parts of the fence, or combined.
    (If the textures work on your setup on other game objects, I'm sure it'll work on fences once you finalise them)

    Thanks for the question.

    Joe
     
    Last edited: Dec 21, 2016
  35. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    I read through the thread but didn't see anything about gates. I could theoretically add them where I need them before placing the fence, with a gap for each gate, right? Or is there a different way?

    Cheers
     
  36. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi, when laying the fence you can create gaps by holding down modifier keys. Or, you can complete the fence and then create the gaps afterwards. At all times the fence remains editable, so the posts either side of the gap for your gate are moveable either during or after creation. So if for instance, you wanted to try different sized gates, then the tool can easily adapt to the new sizes or positions, and all the sections will automatically adjust.

    Edit: Also, if you remove a gate later, then the gap can easily be re-filled.

    Cheers

    Joe
     
    IFL likes this.
  37. UnityRocksAlt

    UnityRocksAlt

    Joined:
    Dec 28, 2015
    Posts:
    138
    Bought your asset.

    Congratulations, Joe.
     
    julianr likes this.
  38. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Thanks! You can email support if you need any help.

    Joe
     
  39. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    198
    Is it possible to use AFB to create a wall with different sections?
    For instance, a castle wall with random broken wall sections.
     
  40. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Yes. The way you would do this is first create the main wall, then clone it using whatever variation/broken section you want to use. You then remove sections from the main copy where you want the variation to show. We found this to be easier than you having to define where the broken section are. The other benefit is that you can repeat this cloning any number of times for unlimited variations, though this depends on the user creating the broken variations, either in Unity or with a modelling app.

    Another method is to create gaps in the wall as you are creating it (by holding the control key), and then those gaps can be filled with anything you want later.

    If you decide to get it and want more help with this, drop us a line.

    Thanks

    Joe
     
    Last edited: Dec 22, 2016
  41. Rod-Galvao

    Rod-Galvao

    Joined:
    Dec 12, 2008
    Posts:
    198
    It seems to work when creating editor time wall/fences.
    What about creating them at runtime?
    Would it be better to use a set of wall/fence prefabs instead of just one? They could be randomized to create more realistic situations. Perfect walls/fences get visually boring quickly.
     
  42. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Yes, you make a good point. AFWB was designed as a editor utility, and a runtime demo was only added in the last update, so the runtime aspect has only the core functionality.

    We're looking in to adding the option for the user to link 3 prefabs per part, that can be swapped out randomly.
    Ideally the parts need to re-use the same textures to keep the asset size down, and as you know, there are a lot of parts so it's a big job. We can start by adding the variation prameters in the inspector, and let the users provide the variation prefabs, and call them from their runtime script. We'll add this in the next update.

    Thanks

    Joe
     
    Rod-Galvao likes this.
  43. Christopher-Kaminski

    Christopher-Kaminski

    Joined:
    Oct 26, 2016
    Posts:
    15
    Hi!

    First of all Fence builder is an awesome user friendly tool, and it already saved me a lot of time and effort.

    However I've encountered a problem when creating custom fence, problem occurs on a corner section.
    The corner creates a gap between fence parts like seen on 1st screen. 2nd screen shows how corner should look.
    Corner1.jpg Corner2.jpg

    Also, would it be possible to create objects in gaps that would work as gates, entrances etc. ?
    I've tried using extra game objects but they're assigned to post and rail/wall only, and I couldn't achieve the desired result.

    Thanks in advance.

    Chris
     
  44. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Hi Chris

    Thanks for your comments.

    A couple of questions about the corner issue so I can try to replicate it...
    It looks like you have a combination of Posts, and 2 Rail types, and they are custom parts, is that right?
    Does that happen on all corners, or just some?
    Does it happen with preset fences?

    Gates...
    So you're able to create the gaps (shift-control right-click) when laying the fence, and you'd like to be able to specify a Prefab, such as a gate, that would be used to fill each gap?
    This sounds like a good feature that I will look in to. One limitation would be that the user would need to make sure the gaps are the appropriate size so that you didn't get very squashed/stretched objects. Though, as you know you can freely move the posts to adjust the gap size after creation. If you'd like to drop us a mail at the support address I can send you a beta when we test this.


    There is a way of doing what you want now, but it takes a bit longer:
    1. Create fence with gaps, and finish the fence.
    2. With a new empty fence, clone the original by dragging it on to the clone area near the bottom of the inspector.
    (You can temp disable the original if it is in the way)
    3. Change all the rails/panels menu to be the object you want to use as a gate in the gaps. Have no posts etc.
    4. Switch 'Allow Gaps' off in the preferences, so now all the gaps are also filled, then finish the fence.
    5. Finally in that 2nd finished fence, delete all the parts that are not gaps, so now you are left with just the gate objects.

    Although that's a couple of minutes work, it's still much quicker than trying to position, rotate, and size them by hand.

    This is the same sort of method I suggested to Rod (above) for creating variations in walls and panels

    Let me know if that works for you.

    Thanks

    Joe
     
    julianr likes this.
  45. Christopher-Kaminski

    Christopher-Kaminski

    Joined:
    Oct 26, 2016
    Posts:
    15
    Hi Joe,

    Thank you for your reply.

    As for 1st issue, yes problem occurs on every corner. Fence consist of 1 post prefab and 1 rail prefab, and yes they're custom parts. I'm guessing the issue might be in post part itself since it has only that curved metal part which is insufficient to hide the corner connection.
    As for now, I'm using a workaround where I create straight sections, finalize them and align with corner prefab.

    As for 2nd issue, your suggestion is very helpful and it works.
    I'm guessing i'm not the only one that suggested a gate option :D

    Thanks again for your help,

    Chris
     
    Last edited: Jan 20, 2017
  46. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    The fence panels should meet at the corner anyway, so any chance you could export a post and a rail as prefabs and mail them to us, I'd like to figure out why it's failing.

    Thanks

    Joe
     
  47. Christopher-Kaminski

    Christopher-Kaminski

    Joined:
    Oct 26, 2016
    Posts:
    15

    Hi Joe,

    Apologies for lack of response, I've been quite busy lately.
    I've sent the package with prefabs to support e-mail.

    Regards
    Chris
     
  48. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    In case anyone else sees this when using your own custom objects, this was a compound wall with nested sub-meshes inside a game object; Select the sub-meshes in your custom object and apply a small Transform Position z offset in its inspector.
    This allows you to align either the inside or outside edges, rather than the default centre.
    Then drop your modified prefab back in to AFWB.
     
  49. highfade

    highfade

    Joined:
    Feb 13, 2016
    Posts:
    2
    Firstly, this is an awesome asset! So easy to use.

    I have question. I've done all my fences and want to remove AFWB from my project folder but worried I might delete something used like a texture or so? I'm using my whole project folder for back-ups it it is now quite big.

    I get the "unload unused assets" but I need to remove the whole file.
     
  50. Two_Click_Tools

    Two_Click_Tools

    Joined:
    Oct 9, 2014
    Posts:
    184
    Thanks for the feedback. This is actually a great question, because as with any Unity assets, if you remove the whole asset including the required meshes and textures, then Unity will not be able to reference them. The only way around this is to create a separate folder or package containing only the needed resources, before deleting the originals.

    So here's the steps required to maintain a link to a copy of the needed meshes/textures. [If you can spare 10 minutes, can I persuade you to practise this once on a new empty project, just in case ;) ]

    1) For each fence you've created, make sure you've finalised it using the 'Finish & Start New' button.
    2) In the Inspector of the 'Finished AutoFence' folder you just created, activate the 'Create Merged-Mesh Copy'.
    (This step is needed because you're about to delete the folder that contains any procedurally generated meshes)
    3) Drag the newly created 'Finished AutoFence Merged Mesh Copy' folder from the Hierarchy in to the top level Assets folder. This will create a prefab copy of it.
    4) On this prefab do an Export Package (Recommend making a 'Fence Exports' folder in your top level Assets folder for these, (*NOT inside AutoFenceBuilder) )
    5) If you're sure you're finished with AFWB, and have exported all your fences in steps 2-4, then you can safely remove AFWB from both the hierarchy and the Assets folder. At this point your fence will appear to be missing, but there is still a reference to it in the Hierarchy.
    6) Import the fence package you exported in step 4. Your fence will be restored, and a new 'Auto Fence Builder' folder will be in your Assets folder, containing only the required resources.

    I just tested this. If you need any help with this, by all means contact support.

    Cheers

    Joe
     
unityunity