Jump to content
Sign in to follow this  
Guest

Concave/convex question

Recommended Posts

Okay, here I go with another uninformed newb question. I've seen a lot of references in this forum and others to concave and convex polygons. Can someone explain what this means with regard to 3D object creation? I understand the greater meaning of the terms, but am not sure how they would apply to, say, a ground poly.thanks,


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites

Convex is an 'outie' and concave is an 'innie'.A concave shape can usually be split into 2 or more sub-shapes to make an 'outie' ( convex ).Convex = goodConcave = bad

Share this post


Link to post
Share on other sites

Wow, that's easier than I thought, Dick. Thanks for the explanation! It's just the sort of thing that one misses when diving into a program like gmax with no prior 3D experience. So, using your above illustrations as a reference, how about these:Is poly 1 convex? How about poly 2? Just for clarification.thanks,


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites

Hi Bill.Actually both shapes have concave elements.Any shape that could be rotated to form a cup, has a concave area.If it holds water, it's concave. All concave shapes can eventually be broken down into convex sub-shapes... The triangle is the most basic convex sub-shape.Some aspects of FS are pretty forgiving about concave shapes. The newer TDF polygons are very forgiving.Dick

Share this post


Link to post
Share on other sites

Gotcha. Good analogy with the cup.


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites
Guest christian

You should be using gmax by now anyway. It seems like FS2004 will only support triangles (which gmax does)...The reason for only using convex polygons is that graphics renderers (like opengl or directx) only can deal with convex polygons. If you use concave polygons they look wrong. Previous FS versions have dealt with concave polygons, by 'tesselating' them (ie split them into triangles). This costs valuable rendering time, so just using triangles is the best way...The exception are the new lwm and vtp masks. These aren't polygons in a classical sense but rather texture masks that get blended over terrain. Using concave polygons for this scenery shouldn't cost you any framerates, in fact the less polygons you have, the better your framerates (this is just an educated guess, but would make sense)...Cheers, Christian

Share this post


Link to post
Share on other sites

Yeah, because I'm a newcomer to scenery design I have the advantage of having started with Gmax... nothing to relearn! But some of the terminology is still lost on me, hence the question.


Bill Womack

------------------------------------------------------------------------------------------------------------------------------------------------------

Visit my FS Blog or follow me on Twitter (username: bwomack).

Intel i7-950 OC to 4GHz | 6GB DDR3 RAM | Nvidia GTX460 1gb | 2x 120GB SSDs | Windows 7 Ultimate 64Bit

Share this post


Link to post
Share on other sites
Guest

Hi there Bill one thing to keep in mind a single "simple" polygonmade up of two faces(triangles) is NOT concave (or convex) the most it could be is "V" shaped as the building blocks (faces) in polygonal meshes are always flat surfaces made up of 3 vertices (points) and the lines that connect them like AB,BC and CA. So to get something close to a curve let alone a concave surface takes a lot of poly's all made up of the above mentioned triangular faces. I just thought I would mention the above so people understand that we have to be carefull about using curved surfaces as your poly count can skyrocket if you use curved surfaces with out thought as to how complex concave shapes really are. Also it might be possable by the time 2004 is out that we will be able to use patch modeling in addition to polygonal modeling (something else to think about). Dan

Share this post


Link to post
Share on other sites
Guest

Hi guys,Let's make this easy...If you trace a line on a poly(in all possible directions...) and you only cross 2 lines, then this is a Convex poly, otherwise is Concave.Rafael Sanchez

Share this post


Link to post
Share on other sites
Guest

Well sorry but what if those poly's are "flat" one could cross manyedges and never get any amount of curve. What I was trying to get across sir is that in standard polygonal modeling the building blocks(faces) are always flat. Of course just about angle one cares to mention is either concave or convex but all I was trying to get across was to be carefull about using curved surfaces that's all.And maybe let some people here gain a little knowledge on the geommetry behind what we all love to do. Dan

Share this post


Link to post
Share on other sites
Guest

Sure Bob Patch modeling is kinda half way between poly modeling andNURBS modeling (the math that underlies patch modeling is very different than with poly modeling.) To keep things getting out of hand here is that patch modeling is based on surfaces called "Patch Objects" that allow one to build very complex curved surfaces form"flat" patch objects buy pulling on vertexes(one way for example). I will post a pic in a little while. I beleve that gmax "does" Patch modeling BTW I know that 3DS max does(and several other progies as well). I would suggest that you play with patch objects in gmax (it's great fun). BTW you can NOT use patch objects in 2002. Hope this helps you Dan

Share this post


Link to post
Share on other sites
Guest christian

Sorry to intercept here:NURBS will also give triangles in the end. The only difference is that the hardware will calculate the triangles for you. If NURBS are supported in the hardware, this saves some storage space since you don't have to save all the triangles, but just a few control points.But, NURBS will also give triangles, so except for the storage place there is no real advantage over a high triangle count model...Cheers, Christian

Share this post


Link to post
Share on other sites
Guest

You are right Christian in regards to NURBS(Gmax does not "do" NURBS)A patch is Like I said halfway between NURBS and polygonal modeling(well sort of)LOL but is much less compute intensive than NURBS ogjects are. I am going to post a pic in a min for those that are interested. Dan

Share this post


Link to post
Share on other sites
Guest GerrishGray

With the greatest of respect, I think that we're getting rather wildly off topic here guys. Often these meandering threads can lead to some useful and interesting discussion that helps push forward our knowledge of FS scenery design techniques. But I'm awfully sorry Dan, your patch dolls and NURBS, whilst very interesting, aren't a lot of use to us if they are not, as you say, supported by FS2002 anyway!Poor Bill who posted the original question wanted to know about concave polygons in FS. There have been some useful and precise replies about what is meant by a concave polygon - Rafael's being, not unexpectedly, the most exact.Now let's explain the rest of the significance to Bill, eh. BTW, please excuse my use of SCASM notation, guys - I know I'm a terrible old dinosaur and it would be so much more trendy and impressive to quote the BGLC equivalent, but I prefer to keep my feet on good old Mother Earth and my head out of the clouds so that everyone can understand what I'm talking about - if they're interested![ol][li]As Christian has explained, all rendered surfaces have to be reduced to a series of triangles before they are drawn on screen.[/li][li]The older FS drawing commands such as Poly(), TexPoly() etc. very kindly allowed us to specify surfaces as multi-sided polygons, and the scenery engine did the work of breaking this down into a series of triangles for us.[/li][li]This is a very straightforward process if the polygon is convex. One just starts at the first vertex and draws a 'fan' of triangles connected to each of the other vertices. Any n-sided polygon is quickly reduced to (n-2) traingles in this way.[/li][li]But if the polygon is concave, this simple approach, using a 'fan, probably won't work unless you are very lucky. The polygon can still always be broken down into (n-2) triangles, but the 'origin' of the fan has to be carefully chosen - and for some concave shapes a simple fan isn't good enough and we may need more than one fan with different origins. The good old FS scenery engine would still solve this problem for us, be we had to warn it that the polygon we were about to ask it to draw was concave, and needed extra analysis.[/li][li]In the more recent Scenery SDK's, MS have sensibly advised us that it would be better if we broke our concave polygons down into two or more convex ones so that we don't have to ask the scenery engine to do the work for us, because it can be time consuming and slow frame rates. But the facility to draw concave polygons is still there for the moment if we need it.[/li][li]In the interests of performance, the next generation of FS is going to use DirectX-friendly drawing techniques exclusively (i.e. CFS3 onwards). FS2002 is a transition version that allows us to use both the old methods and the new side-by-side. Models contstructed with gMax use the new method exclusively, other existing tools are still using the older, much slower, methods.[/li][li]An important part of the new approach is that we are going to have to do the triangulation process ourselves at design time (or get our design tool to do it for us), rather than leave it to the scenery engine. This is very sensible because working out the triangulation is not a task that should be left to the scenery engine to endlessly repeat every time it draws each surface on screen. This is one of the principle reasons why models designed by gMax are so much less hungry on frame rates than those drawn with older tools.[/li][li]This doesn't mean that gMax always gets it right though. From what I have seen so far (not a lot, admittedly!), gMax seems to have a talent for creating more triangles than are strictly necessary. As I said before any n-sided surface can always be reduced to n-2 triangles, however concave its outline, and also even whether it is flat or is curved in 3D space - as long as we are talking here about straight-sided polygons and not genuinely curved surfaces - but gMax often manages to create more polygons than are really necessary. And one of the features that provokes this mistake is when the surfaces we have drawn in gMax are, surprise surprise, concave polygons. But even that doesn't matter, because the newer drawing methods are so much quicker than the old ones anyway ...[/li][/ol]Anyhow, I'm in danger of wandering off topic myself here :-) but I hope this helps explain the issue of concave polygons, Bill (looking back over what I have written, paragraphs 1-5 were probably enough ... :-lol).Kind RegardsGerrish

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...