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

[WIP] Fern Creator

Discussion in 'Works In Progress - Archive' started by DevYHeavy, Jul 23, 2016.

  1. DevYHeavy

    DevYHeavy

    Joined:
    Apr 28, 2016
    Posts:
    19
    I'm working on an editor script that allows you to generate Fern plants in a couple of clicks. This script generates the mesh, texture and material while giving you control over how the finished product will look.

    Recently added features:
    • ability to edit the bend of each leaf individually
    • ability to edit the mesh quality of each leaf individually
    • ability to change texture on individual leaves
    • Allow users to use their own textures that will end up getting batched into final product
    • Follow unity LOD naming conventions
    • Change color of the generated textures
    • Change width and height of individual leaf
    Video of added features.



    Main features are:
    • Generate Fern mesh
    • Generate Fern texture(procedurally generated with fractals)
    • Generate Fern Material
    • Generate Level of detail meshes with corresponding textures and materials
    • Combine each texture on each leaf into one texture and then generate a material for it
    • Control how much the leaves bend
    • Save all the meshes, materials, textures and game objects of all the Level of detail game objects and the base fern game object.
    Here's a video of it in action.



    Future planned features:
    • Add ability to add a spine to each leaf so the edges of each leaf can bend up or down giving the plant more depth
    • Create shader so it looks like the fern is swaying in the wind
    • Add ability to edit the texture quality of each leaf individually
    • Rework UI so it looks nicer
    • Instead of just ferns maybe make it possible to generate meshes such as flowers, grass and other plants.
    • Allow users to modify the final look of fractal texture(SORTA ADDED)
    Please leave any feedback you have.
     
    Last edited: Jul 27, 2016
    Arkade likes this.
  2. gurayg

    gurayg

    Joined:
    Nov 28, 2013
    Posts:
    269
    Hello,
    Looking good so far.Keep it up!

    I suggest you take a look at this page for Unity LOD naming conventions.

    Also some editable parameters for the generated texture might give help get variance.
    After all, texture is the most noticeable thing on the resulting object.
    or you might let users to use their own textures.
     
  3. DevYHeavy

    DevYHeavy

    Joined:
    Apr 28, 2016
    Posts:
    19
    Thanks for the feedback! I didn't know about those name conventions i will definitely add that. Right now when generating the textures there are some randomly inputted parameters that change the final look of the fern, but i was thinking of adding a way for the user to change those parameters themselves. As for the user added textures i haven't thought about that yet, but it definitely would be easy to implement so I'll most likely add that. Again thanks for the great feedback.
     
  4. DevYHeavy

    DevYHeavy

    Joined:
    Apr 28, 2016
    Posts:
    19
    UPDATE:

    Added features:
    • When saving everything is saved following unity's LOD naming conventions.
    • You can now randomly add your own textures to the fern while adding fractal generated textures as well.
    • You can now pick the fern color and another color for the edges of the leaves to fade into(only works on generated textures).
    • You can now edit each leaf individually(edit leaf bend, texture, height, width and number of bends in the leaf)
    Here's a video of everything that was added



    Please leave any feedback you have. Thanks!
     
    Last edited: Jul 27, 2016
    gurayg likes this.
  5. SAOTA

    SAOTA

    Joined:
    Feb 9, 2015
    Posts:
    220
    Very nice. You should definitely allow the user to use own texture. Good work.
     
  6. DevYHeavy

    DevYHeavy

    Joined:
    Apr 28, 2016
    Posts:
    19
    Thanks!
     
  7. gurayg

    gurayg

    Joined:
    Nov 28, 2013
    Posts:
    269
    Hello again,
    Do you think it might be better to put the leaf's game object to the middle of the last edge (it is now at the vertex position)
    That would let users for better width, height adjustments also rotation if you want.

    How about making each edge thinner towards the tip of the leaf?

    You might also consider rendering leaf textures from a substance file.
    If there is an API to use substance files in an editor script you can take the texturing to the next level.

    Good work.
     
  8. DevYHeavy

    DevYHeavy

    Joined:
    Apr 28, 2016
    Posts:
    19
    Thanks for the feedback again.

    Fixed the position. Here's a gif.


    As for the shape of the leaf, I didn't think it was necessary to do that, but it makes sense so you get more realistic collision with the leaves. That's something I'll think about adding.

    The substance file idea is interesting. I don't know anything about those yet but from what i can tell there should be some nice benefits if i do use those.

    Thanks for the ideas!
     

    Attached Files:

    gurayg likes this.