Bigus

Members
  • Content Count

    3
  • Joined

  • Last visited

  1. THanks guys for the responses. Wingnut, that's a great explanation. Between that, and reading those pages Jeff suggested in the WebGL book, the relationship between points, normals and indices makes sense now. Initially, I was also wondering what was meant by [counter-]clockwise plotting, i.e: clockwise in relation to what? But I see now, in the case of my object (and the cube example in that OpenGL book) the plotting (or order of points as specified by the indices) is done clockwise round each face. Applying that, I now have whole faces looking OK (not sorted normals yet): http://jsbin.com/noquwehujudi/2/ I'm not sure I understand why it's necessary to plot the vertices in a particular order though. They just create a triangular polygon between 3 vertices in 3D space, so why does the order matter? Jeff, on that stackoverflow page, did you manage to translate that response from Shabbi into Javascript/Babylon? Thanks, Bigus
  2. Thanks for the reply. I did wonder about the order of the faces as there seemed to be no other logical explanation for it. I'll have a look at backFaceCulling too. With normals, what are the actual values expressed in? That is, are they radians or something else? Do they need recalculating when you rotates the object?
  3. HI All I'm a 3D and Babylon newbie and am struggling with normals. I understand the concept of them (I think) and that in Babylon terms a normal is defined for each vertex, but I don't know what values to use to define those normals or how to calculate them. Here is what I've been working on (a way of extruding an object from a 2d face): http://jsbin.com/noquwehujudi/1/edit The object is meant to be like a rectangular box with a rebate cut out of it and each "face" of that object is composed of 2 polygons but only one of which is "facing" the right way. I basically set all the normals to 1 _ I don't know what that 1 means, it's just a value used in one of the playground demos. I don't understand why some polygons are facing the right way (outwards) and some are facing inwards. Could someone tell me what I should be doing, in not too mathematical terms? Thanks Bigus