Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Spiderweb Generator

Discussion in 'Assets and Asset Store' started by kalagaan, Mar 10, 2017.

  1. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680

    Spiderweb generator is a tool for designing spiderweb within the unity editor.
    You can create spiderwebs which fit exactly with your scene. The geometry tool is really easy to use, the UI is displayed in the scene view for a fast design.

    The procedural shader generates unique customizable spiderwebs in no time!
    You can choose to use the procedural shader or bake it into a texture and share it between spiderweb objects.
    Each spiderweb can cast shadows, this really improves the visual of your game.



    Asset store link
     
    Last edited: Mar 31, 2017
    P_Jong and NA-RA-KU like this.
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Comming soon on the assetstore :)

    Edit : Available HERE
     
    Last edited: Apr 3, 2017
  3. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Here a screenshot of the UI

     
    P_Jong likes this.
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,781
    Cool!
    Do you have an example of the web strung between only two surfaces, like the ceiling and a wall, or a tree limb and tree trunk?
     
  5. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Here a screenshot ;)
    this demo scene is included in the package.

     
  6. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
  7. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    452
    Looks really good. Do you have an idea on the price?
     
  8. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I've submitted it to the assetstore : 20$
    It should be available next week :)
     
  9. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Here a lighting test :)

     
    Last edited: Mar 11, 2017
    P_Jong and punk like this.
  10. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Available at the asset store :)
    HERE
     
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,400
    This looks nice! I imagine it would be difficult, but any chance this could be used in real time, like a giant spider that creates webs?
     
  12. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    This is a procedural shader, so you can modify it in real time :)
    I could try to update the shader if you need a specific feature ;)
     
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,400
    Are the web shapes always on a plane, or could they be more 3D, like a cone?
     
  14. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    365
    Ah dude, you make the most useful plugins! bought
     
    kalagaan and hopeful like this.
  15. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    You can move each control points (borders & center) , so you could create a cone :)
    It's really easy to add and to remove control points with the tool.
     
    hopeful likes this.
  16. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Thank you!
     
    Last edited: Apr 2, 2017
  17. ZeroKuhl

    ZeroKuhl

    Joined:
    Sep 4, 2015
    Posts:
    2
    It looks like a great package.

    1. Are the assets mobile ready?
    2. Do the webs have motion - like moving in the wind?

    Thanks!
     
  18. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    1. Yes, it works on Android (didn't try on iOS):
    geometry is really low poly and the procedural shader works.
    You can also bake the spiderweb to a texture or use another shader ;)

    2. Not yet, I'll add this feature in the next version ;)
     
    hopeful and punk like this.
  19. ZeroKuhl

    ZeroKuhl

    Joined:
    Sep 4, 2015
    Posts:
    2
    Great.
    Thanks for your reply.
     
  20. altugs

    altugs

    Joined:
    Jan 14, 2017
    Posts:
    15
    Just bought the asset, and unfortunately it does not work. The web shape is in complete purple and I have many error messages related to generator and its shader. Is it a compability problem for unity 5.6? (My scene is in linear lighting and deferred rendering path.)
     
  21. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I did additionnal tests on unity 5.6.0f3 and 5.6.2f1, all works as expected (linear/gamma & forward/deferred).
    Could you try to import the package in an empty project?
    If you still have the problem, please, send me an email (contact@kalagaan.com), I'll help you to fix it.;)
     
  22. altugs

    altugs

    Joined:
    Jan 14, 2017
    Posts:
    15
    New project works fine, thanks. (mailed you the errors from my project)
     
  23. Marquessa

    Marquessa

    Joined:
    May 28, 2017
    Posts:
    3
    Is there a way to make it tear if something walks or moves through it?
     
  24. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    No, in the current version spiderwebs are static.
    But I think that I could create some kind of tearable spiderweb with the cloth component.
    I'll think about it ;)
     
    P_Jong, hopeful and punk like this.
  25. Rumbleboxer

    Rumbleboxer

    Joined:
    Dec 26, 2012
    Posts:
    20
    Hey man how goes it with the cloth component? I'm looking for a solution where the spiderweb is indeed able to be affected by the wind or has it's own flowiness.
     
  26. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I won't use the cloth component, it's not very stable for each unity version...
    I'll work on a wind FX in the shader (performances will be better than using cloth), but this is not yet available.
     
    StevenPicard and mons00n like this.
  27. AvalonGamingZone

    AvalonGamingZone

    Joined:
    Jul 23, 2017
    Posts:
    5
    This asset is really cool and procedural ! Has a Substance Designer user I know that you can achieve a lot with something procedural ^^ I currently have two issues with this asset... if placed between two light source, the transparent part become not fully transparent... Dunno why... The second issue with it is maybe not an issue by itself is the fact that the control point are moved in function of the view and it is not very easy to place them correctly in the 3d space but I imagine that with a bit of training I could achieve what I want ^^ Bydaway thanks for your excellent work !
     
  28. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Thank you ;)
    Could you send me an email (contact@kalagaan.com) with some screenshots of the lighting issue ?
    I can add a "3-axis control point" option ;)
     
  29. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    I've pushed a new version to the asset store with a 3-axis handles option. ;)
    Edit : The version (1.0.5) is already available! the asset store submission was very fast :)

     
    Last edited: Feb 5, 2018
    hopeful likes this.
  30. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    89
    Could you please demonstrate some code of adding a new web with anchors given vector3 world positions. I have these points (5 to 6 of them) but am struggling on how apply the positions to anchors update the procedural shader.
     
  31. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Here a sample of a procedural spiderweb generation ;)

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using Kalagaan.SpiderwebGeneratorExtension;
    4.  
    5. public class GenerateSpiderweb : MonoBehaviour {
    6.  
    7.     public SpiderwebGenerator m_generator;
    8.     public int refreshCount = 0;
    9.  
    10.     void Start () {
    11.  
    12.         //create a new spiderweb
    13.         m_generator.m_spiderWebLst.Add(new SpiderwebGenerator.SpiderWeb(gameObject));
    14.  
    15.         //modify the anchors
    16.         Vector3 worldPos = Vector3.one;
    17.         m_generator.m_spiderWebLst[0].m_anchors[0].m_position = transform.InverseTransformPoint(worldPos);
    18.         //add new ones
    19.         worldPos = new Vector3(1,1,0);
    20.         SpiderwebGenerator.SpiderWeb.Anchor anchor = new SpiderwebGenerator.SpiderWeb.Anchor();
    21.         anchor.m_position = transform.InverseTransformPoint(worldPos);
    22.         m_generator.m_spiderWebLst[0].m_anchors.Add(anchor);
    23.  
    24.         //change the center of the spiderweb
    25.         Vector3 center = Vector3.zero;
    26.         for (int i = 0; i < m_generator.m_spiderWebLst[0].m_anchors.Count; ++i)
    27.             center += m_generator.m_spiderWebLst[0].m_anchors[i].m_position;
    28.         m_generator.m_spiderWebLst[0].m_center = center / (float)m_generator.m_spiderWebLst[0].m_anchors.Count;
    29.  
    30.         //Generate mesh & renderer
    31.         m_generator.m_spiderWebLst[0].GenerateMesh(transform);
    32.         m_generator.m_spiderWebLst[0].GenerateRenderer(m_generator, 0);
    33.  
    34.         //generate and change the shader parameters
    35.         m_generator.m_spiderWebLst[0].m_shaderParams = new SpiderwebGenerator.SpiderWeb.ShaderParams();
    36.         m_generator.m_spiderWebLst[0].m_shaderParams.color = Color.green;
    37.  
    38.         //Update the shader
    39.         m_generator.m_spiderWebLst[0].UpdateShader(true);
    40.  
    41.     }
    42.  
    43. }
     
    NeatWolf and hopeful like this.
  32. Seoyeonchoi

    Seoyeonchoi

    Joined:
    May 8, 2018
    Posts:
    1
    Hi, sorry to bother.
    Is there any simple tutorial? Could you please tell me how to use this plugin?
    and can I bake the light map with this plug in?(if can, how??)
     
  33. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Have a look to the documentation (Assets/SpiderwebGenerator/Doc/),
    it explains step by step how to use the plugin. ;)
    - Create a new GameObject
    - Add the SpiderwebGenerator component
    - enter the edit mode and use the sliders and the Handler to edit the shape and the shader's options.

    If you want to bake the spiderweb shadows in the lightmap, you have to set the Render mode to 'TEXTURE'.
    And you'll have to set the spiderweb gameobject to static.
    In the current version, each modification will modify the static flag, because the gameobject of the spiderweb is generated. I'll fix it in the next version, it will copy the static flag from the SpiderWeb generator.
     
    hopeful likes this.
  34. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    the version 1.1.0 has been submitted to the asset store and should be available soon :)
    It includes the windzone support.



    Here a GIF
     
    StevenPicard, hopeful and punk like this.
  35. Palanai

    Palanai

    Joined:
    May 3, 2017
    Posts:
    10
    Is it possible to set up spider webs as re-usable prefabs?

    I'd really like to generate a few of them between trees and boulders, save the group as a prefab and then re-use them to decorate the map.

    Right now each time I set them up as a prefab (both with baked textures and in material mode), the actual web is missing if I drag a prefab into a scene. The mesh is missing, and the web is no longer tied to the game object with the spiderweb generator script.
     
    Last edited: Jul 13, 2018
  36. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    Thank you for the feedback,

    In the current version the web meshes are not generated when the prefab is instantiated.

    Here a fix for the script SpiderwebGenerator.cs :

    Code (CSharp):
    1. void Awake()
    2.             {
    3.                 m_lockedPosition = transform.localPosition;
    4.                 m_lockedRotation = transform.localRotation;
    5.  
    6.                 for (int i=0; i<m_spiderWebLst.Count; ++i )
    7.                 {
    8.  
    9.                     //here the fix
    10.                     if (m_spiderWebLst[i].m_mesh == null)
    11.                         m_spiderWebLst[i].GenerateRenderer(this, i);
    12.  
    13.                     m_spiderWebLst[i].UpdateShader(false);
    14.                 }
    15.             }
     
    StevenPicard and hopeful like this.
  37. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    738
    Hi there!

    I've been keeping an eye on your asset, pretty unique, and it's great to see how it got better and better! :)

    I haven't purchased it - yet ;) Yet, I'd love to know (yup, I'm very shader focused lately, sorry about that :p ), since the material+shader pair play a great part in the whole asset:
    Note: please take this in the most positive way possible, this is kind of a wishlist, since a lot of this could be already there :p

    1) Is the shader PBR ready?
    2) Is it double sided only?
    3) Is improving the included shader a priority at the moment? That is, are we going to be able to work with randomized world-space textures which seamlessly blend with probes and the native lighting system, possibly with some soft-particle attenuation (Z depth) near the edges?
    4) Is the shader both shadow casting, shadows receiver, 2 sided, normal mapped and, soft-edged with proper depth sorting? :p
    5) Translucent and back-shadow receiving? (well, ok, I know that's a lot of wishes)
    6) Capable to generate textures of given resolution, with H number of hooks and L number of loops, with T thickness?

    I see that some basic coding is required, but I feel that would be great if it worked like (I can't know how it works at the moment):
    a) Drag a prefab in the scene, set position and orientation
    b) An integrated component automatically raycasts against geometry according the indicated plane (OnDrawGizmo), and a few parameters like number of hooks, max Distance, random position offsets using the spiderweb local space
    b2) ...and templates for that, to use and reuse the same settings consistently
    c) Ready to use methods to add a single (or more) hooks at runtime - single call.

    extending this to a new level of automation, would be also cool if
    d) Could procedurally automatically spawn inside a volume, crawling and looking for crevices, in a way similar to AO.

    finally

    e) Realtime in-editor preview of b) :p (that is, reflecting the changes as you rotate/move the dynamic raycasting prefab around)

    Have you got a roadmap of features you'd love to implement?

    Please don't hate me :D
    EDIT: I found the docs, apparently a lot of my wishes are already ready out of the box :)
     
    Last edited: Sep 5, 2018
  38. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    680
    1) Yes the shader is PBR
    2) this is 2sided only
    3) I'll continue to improve the shader. The shader is based on the standard lighting.
    4) the shader cast shadows, I'll add a normal map.
    5) no translucent and back shadows yet.
    6) you can bake the texture in different size from 64x64 to 4096x4096 :D
    You can set a lot of parameters like with, radius, shape...

    The process is really simple :
    - add a generator to an empty object.
    - add a new spiderweb object
    - move it in the scene and add some anchors with the tool.

    There's no automatic raycasting tool.
    It would be a lot of work for this kind of tool I guess... :confused:

    You can duplicate spiderwebs, or copy/past the parameters.

    Don't worry, I don't hate you :p
     
    Last edited: Sep 6, 2018
    NeatWolf likes this.