Jump to content

Multi material on a cylinder


Recommended Posts

Hi all,

I'm currently going through Temechon's book, which I must say is very good, however at the point of playing around with multimaterials I seem to be pulling my hair out, here is a link to a playground I put together http://playground.babylonjs.com/#1K3BTQ, I looked at DK's tutorial on MSDN ( http://blogs.msdn.com/b/eternalcoding/archive/2013/07/10/babylon-js-using-multi-materials.aspx ) but I'm unsure of where the numbers come from to define the indice parameters 

sphere.subMeshes.push(new BABYLON.SubMesh(0, 0, verticesCount, 0, 900, sphere));sphere.subMeshes.push(new BABYLON.SubMesh(1, 0, verticesCount, 900, 900, sphere));sphere.subMeshes.push(new BABYLON.SubMesh(2, 0, verticesCount, 1800, 2088, sphere));

I don't suppose someone could maybe assist me on this and explain what I'm doing wrong, I'm fairly new to the world of 3D so maybe I'm just misunderstanding how it's meant to work.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...