Jump to content

Explanation of UVKind


jacquesr
 Share

Recommended Posts

Hi Jacquesr!  You can probably find the answer to your 2nd question... on the web.

Here is a nice Jerome "howdy-do-dat?" demo... where I have added a few alerts into the playground scene.  Close all the alerts and any errors, and then press RUN (again).

http://www.babylonjs-playground.com/#1H7L5C#27

Take notice of lines 88-96.  Line 88 shows that there are 180 positions in this model.  It takes 3 values to create a vertex position... so I divided positions.length by 3.

Line 89... here I divide the uvs array by 2.  It also reports 180.  So we know it takes 2 UVs values per vertex.  Careful here.  I think a SINGLE UV has 2 values... by its very nature.  So there are 180... "pairs" of values.  First a U, then a V, then a U, then a V, etc.  :)

Lines 91-96... I am dumping each UV (x/y) on a line of its own... in the alert.  'U-V-W' can be thought-of as X-Y-Z for textures.  :)

Ok, that's all I know.  Hope this helps.  Hope I didn't say anything stupid or wrong.  Smarter people than I... are nearby.  They'll comment soon, as needed.  You can use our cool playground searcher to get links to LOTS of demos that use uvKind... http://doc.babylonjs.com/playground?q=uvKind

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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