Adding Height Segments to a polygon..!!

leodeus
Unregistered
 
Post: #1
Hello Everybody.
In OpenGl can i modify (not create) a polygon or a scene, adding some Height Segments (more faces)???
Exist a command or a rotine to this?...

Thnaks all Wink
Quote this message in a reply
Moderator
Posts: 529
Joined: 2003.03
Post: #2
If you want to subdivide an existing model, you have to write the code yourself.

Most modelers will do this for you though.

Or do I totally not understand your question?

"Yes, well, that's the sort of blinkered, Philistine pig-ignorance I've come to expect from you non-creative garbage."
Quote this message in a reply
leodeus
Unregistered
 
Post: #3
Supose this:

I import a cube model from another program (3ds, obj, etc).
The cube have 8 vertices and 12 faces.

Can i adding height segments in this imported cube... (for example if i add 3 height segments result 16 vertices and 28 faces)...

How?...commands??
Quote this message in a reply
Moderator
Posts: 529
Joined: 2003.03
Post: #4
Are you trying to duplicate the cube?

If that's the case, you'd just draw the cube more than once with calls to gltraslatef in between to position the copies where you want.

"Yes, well, that's the sort of blinkered, Philistine pig-ignorance I've come to expect from you non-creative garbage."
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
What do you mean height segments?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #6
Are you talking about adding a height map to the top of a cube?
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #7
Why is Height Segments in bold, why do you think we know what it means?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
UnifiedMac
Unregistered
 
Post: #8
Quote:The cube have 8 vertices and 12 faces.
=/ Doesn't a cube only have 6 faces? Its a polygon if it has more right?
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #9
I think he is using two triangles for each face, but being very unclear with his questions.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
leodeus
Unregistered
 
Post: #10
Sorry people i was out, so that i can't post....

So:
1º - I use a imported models (3ds, obj, etc) and they using a triangulation ( so that the 12 faces in a example cube...),
2º - Height segments is the way to increase more faces (and poligons) to a object, by sub-divide the object in height sections.... (This ca be do in much programs like 3D Studio, Maya etc...
3º I need this to help me in detection a perpendicular face by a top and ortographic view ......

Thanks
Quote this message in a reply
Moderator
Posts: 365
Joined: 2002.04
Post: #11
OpenGL doesn't have any built in features which will do what you describe. Its core functions are only concerned with drawing, not modelling.

You can of course write your own code to subdivide your models, but OpenGL itself won't be any help in this respect.

Neil Carter
Nether - Mac games and comic art
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #12
Again you mention Height segments and Height sections, assuming I dont know these words, could you exlain what you actaully want to do this way people who have already tackled the problem may be able to help you.

+ Not sure what °3 is, but have a look at calculating face normals.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 365
Joined: 2002.04
Post: #13
unknown Wrote:Again you mention Height segments and Height sections, assuming I dont know these words, could you exlain what you actaully want to do this way people who have already tackled the problem may be able to help you.
I think he's referring to 3D Studio Max's notion of height segments. For example, adding height segments to a cylinder means that there will be extra divisions and faces along its length (as opposed to adding segments around the circle or across the caps).

Neil Carter
Nether - Mac games and comic art
Quote this message in a reply
leodeus
Unregistered
 
Post: #14
NCarter is right.
I will try resolve the problem with calculating face normals, but is more heavy...

Thanks a lot all.

Leodeus
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  iPad Virtual keyboard height = 352 Baldock 0 4,423 Feb 3, 2011 04:36 AM
Last Post: Baldock
  Polygon budgets Kerome 1 2,870 Mar 7, 2010 04:55 AM
Last Post: mikey
  glut polygon winding strangeness OptimisticMonkey 2 3,061 Sep 7, 2009 06:27 PM
Last Post: OptimisticMonkey
  Getting the Normal for a polygon. Jaden 3 5,756 May 1, 2009 01:47 PM
Last Post: Nosredna
  Is there anything like polygon offset for GL_LINES? TomorrowPlusX 2 3,661 Jan 24, 2007 02:57 PM
Last Post: TomorrowPlusX