Soundbomber's picture

Simple Objects

As an aside to my post on Cut Outs, as an alternative to using C.S.G to model my holes/cut-outs, I could also model the geometry using a model editor, thus hard coding the cut-outs into the model. My problem is this, so far to successfully model a 3d object, i have had to create individual vertices for EVERY triangle that makes up that model, so for example a cube-instead of only requiring 8 vertices, would require 6 faces*2 triangles*3 vertices=36 vertices. When I use the minimum of 8 vertices I only see certain facets of the cube shape.
Any ideas as where I am going wrong?

Inline Images


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Check the documentation, too. VBOs can be quite annoying to get right at first, but their design makes sense afterwards.

Soundbomber's picture

Thanks All for your help. Celeron, you may be a newbie but you solved the problem, thanks again.

Soundbomber's picture

I now have a problem with normals (I think). If you take a look at the attached screenshots, the normals where an internal edge meets an external edge appear incorrect. I have calculated the normals using the normalised sum of all the normal vectors for a given vertex, thus:

             Dim oTempVector As Vector3 = Nothing
            iPosition = 0
            For Each oIndex As UShort In oTempIndices
                oTempVector += oNormalVectors(oIndex)
                iPosition += 1
            oVertices(iIndex).Normal = Vector3.Normalize(oTempVector)

Does this look like familiar behaviour to anybody?

cube1.JPG13.18 KB
cube.JPG16.54 KB