Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Can UnityWebGL handle mesh creation like Three.js does

Discussion in 'WebGL' started by Shibli, Aug 17, 2016.

  1. Shibli

    Shibli

    Joined:
    Feb 9, 2015
    Posts:
    6
    I'm looking up Three.js tutorials and noticed that instead of having 3D models as .fbxes the models are being generated programatically by creating cubes and combining them into meshes. The results are low poly and perform really well.

    I wanted to know if I should follow the same practice in Unity.

    For example, in Three.js you can create a mesh and then animate the vertices of the mesh too for some wave like effects, should I:
    1. Create a mesh in Unity and animate the vertices?
    1. Have a pre-defined mesh that I attach a shader to that animates the vertices in the same way.

    Any help from the gurus would be appreciated.
     
  2. Shibli

    Shibli

    Joined:
    Feb 9, 2015
    Posts:
    6
    This entire game is made using models generated programatically when the game starts. Pretty cool:

     
  3. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Both options are possible - if you can animate the vertices in a shader it will be much much faster that way, though, so when possible, that is the preferable solution.