CountVertices question..

Blitz3D Forums/Blitz3D Programming/CountVertices question..

FlagDKT(Posted 2008) [#1]
i was wondering why:

CountVertices(GetSurface(CreateCube(),1))=24

every quad poly splitted?


KillerX(Posted 2008) [#2]
Every polygon in blitz is a triangle. A quad is made up of two triangles.


Rob Farley(Posted 2008) [#3]
Yep it's how it's got sharp edges


FlagDKT(Posted 2008) [#4]
Every polygon in blitz is a triangle. A quad is made up of two triangles.

I know, but a quad is made up of 4 vertices not 6.

Yep it's how it's got sharp edges


So the smoothing group is the only reason for splitting up the faces of the cube?...uhm...


Gabriel(Posted 2008) [#5]
I know, but a quad is made up of 4 vertices not 6.

Nevertheless, there is no such thing as a quad as far as videocards are concerned.

So the smoothing group is the only reason for splitting up the faces of the cube?...uhm...

No, the reason for doing that is your videocard doesn't know what a quad is.


Ross C(Posted 2008) [#6]
4 verts * 6 sides :o) Funnily enough though, you can't texture each side individually, unless you make your own cube i believe,


Rob Farley(Posted 2008) [#7]
I could be wrong here, however...

Every vertex has a normal (the direction it's facing), the only way to get a sharp edge is by using 2 vertices in the same place otherwise you'd need a single vertex with 2 normals


big10p(Posted 2008) [#8]
What Rob said.

If all the sides shared vertices, the lighting gets smoothed across the edges, instead of giving a sharp, flat-shaded appearance. You can see this by doing UpdateNormals on a cube to view the awfulness.


FlagDKT(Posted 2008) [#9]
Then what's the reason to add BrushFX 4: FLATSHADED option?


Rob Farley(Posted 2008) [#10]
Flat shaded will give a similar result, however, you will not get smooth shading across faces (triangles). Also this will apply to a whole mesh not just individual components of it.


FlagDKT(Posted 2008) [#11]
It this is the reason, I think it should be an option when creating a cube.


Rob Farley(Posted 2008) [#12]
If you're that bothered you can write your own create cube function. I think given that the majority of people are happy with the standard createcube function as is then one would assume it's generally ok.


big10p(Posted 2008) [#13]
The flat-shaded FX won't help here. Flat-shading uses surface normals to light tris, which aren't supported by B3D (or, maybe it's DX7 itself).

The flat-shading option of B3D uses a vertex normal to light each triangle, which isn't ideal and usually ends up giving less than desirable results. Take a look at a 'flat-shaded' cone, for example.