• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

3D, is this a valid trianglestrip for cube?

M

maelstrom

Guest
GM 1.4

Wondering if I can build a cube from a triangle strip, is this image below valid?

Before anyone asks, its not strictly a cube I'm building

 

TheSnidr

Heavy metal viking dentist
GMC Elder
Why would you though? I don't see how it would be possible without either overlapping or zero-area triangles. Also, it'd be hell to texture! :p
 
M

maelstrom

Guest
Why would you though? I don't see how it would be possible without either overlapping or zero-area triangles. Also, it'd be hell to texture! :p
i'm not using any texturing - its just a small project - was wondering if this was the best way to construct a cube from a triangle strip?
 

Binsk

Member
What's the best way to drive a car down the freeway blindfolded? We don't know because it is a case where normal people say, "You don't" and thusly haven't experimented.
 
Isn't a strip just a simpler (in a few cases) way to create models? I mean, I don't think there is any performance benefits?
 
D

dannyjenn

Guest
Maybe he just wants the experience of generating a low-poly model from a trianglestrip? I personally would like to try that some time. I haven't really explored that sort of functionality before and I think it would be good to know... or at least fun to learn. I think I understand the concept, but I really haven't played around with it much and I've never gotten it to work.
 

slojanko

Member
Isn't a strip just a simpler (in a few cases) way to create models? I mean, I don't think there is any performance benefits?
The performance between trianglelist and trianglestrip is actually quite big. After submitting the first 2 vertices you can add a new triangle with only 1 vertex.
 
S

Sinaz20

Guest
That image comes directly from a paper on generating optimized geo through triangle strips. It is linked to from the first hit in my Google search, "procedural cube geo triangle strip," linking to a stack overflow question with further answers and Opengl code.

So, yes. It is valid.

Now go make it!
 
D

dannyjenn

Guest
@maelstrom - I tried it myself and got it working :) Everything except the textures. So I can confirm that it is a valid trianglestrip for making a cube or similar polyhedron.
 
The performance between trianglelist and trianglestrip is actually quite big. After submitting the first 2 vertices you can add a new triangle with only 1 vertex.
I know it wasn't working that way behind the hood in previous versions of gm so it actually a performance change when you render the model now?
 
M

maelstrom

Guest
The performance between trianglelist and trianglestrip is actually quite big. After submitting the first 2 vertices you can add a new triangle with only 1 vertex.
As a kid I wrote assembler, so every byte counted - I did suggest a triangle strip with optimisation in mind, as the 'cube' would be part of a larger construction, created programmatically. Texturing isn't an issue

workflow from something like 3DS Max is a total pain with GM, so I like the purity of creating the model I need in code, especially as the models are simple geometry and iterative
 
Last edited by a moderator:
M

maelstrom

Guest
I know it wasn't working that way behind the hood in previous versions of gm so it actually a performance change when you render the model now?
I was advised triangles are the best approach for cross platform compatibility
 

GMWolf

aka fel666
Oppose to what? I don't mean to sound rude, I'm actually interested because I thought quads and polygons were just triangles in the end
Some hardware support quads, aad even ngons, but internally, they are simply rastered using the normal triangle rasterizer (generally).
These days it's often largely ignored. Quads are only used by artist in order to keep workable topology.
Engineers only care about triangles that can be rendered efficiently.

Luckily, you can split your quads into tris.
 
Some hardware support quads, aad even ngons, but internally, they are simply rastered using the normal triangle rasterizer (generally).
These days it's often largely ignored. Quads are only used by artist in order to keep workable topology.
Engineers only care about triangles that can be rendered efficiently.

Luckily, you can split your quads into tris.
Thanks for clearing that out
 
Top