Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Whither the lowly polygon

Douglas Douglas
Registered User
Join date: 13 Dec 2006
Posts: 29
05-10-2007 16:50
Hi,

Is there anyway to create a simple polygon? Four vertices. Nothing more. It really bugs me that I need to create 8 vertices when all I need is 4.

Cheers,
Doug
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
05-10-2007 17:05
There is no way to render a 2D object in a 3D world.

The best you can do is set Z to 0.01m.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
05-10-2007 20:07
If you really want to cry about vertices, turn on wireframe rendering and take a look at a simple cube. You'll see each face has a hell of a lot more than 4. I believe it's 32x32 per face if you have your object detail set to high, and you zoom in for highest LOD.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Douglas Douglas
Registered User
Join date: 13 Dec 2006
Posts: 29
05-11-2007 03:44
Chosen,
Dude, now you really bummed me out. That is just nuts. Now I see why everything in SL gets so laggy.

Jacques,
My question refers to vertex count not dimensionality of those vertices. As you know triangles are the workhorse for many modeling systems and most rendering systems devour triangle meshes.

Cheers,
Doug
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
05-11-2007 09:29
Sorry, Doug. Didn't mean to depress you.

For what it's worth, I wouldn't be too concerned about it. Although that excess geometry is certainly a factor, I believe SL's slowness has far more to do with poor texture management on the part of users than with the number of vertices per prim. In any case, it can be presumed that those vertices are necessary in order to accommodate things like cuts, dimples, hollows, twists, etc., although I haven't tested to see if they do in fact line up with those things. It would be nice if the system were smart enough to reduce the polys when those parameters are set to zero, but oh well.

I do agree with you though. It would be great if we could have a simple 2D plane as a prim. That would solve a lot of problems.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
05-11-2007 16:31
From: Chosen Few
I believe it's 32x32 per face if you have your object detail set to high, and you zoom in for highest LOD.
At max LOD, an unmodified box prim has 18 polys per side. (3x3 grid, divided into triangles)
Douglas Douglas
Registered User
Join date: 13 Dec 2006
Posts: 29
05-11-2007 16:51
Sigh ... a vertex is a terrible thing to waste.

I'm less concerned with the rendering hit since today's graphics cards easily handle zillions of textured/lit/z-buffered vertices. I'm thinking more about things like collision detection and other aspects of the physics engine. Grrrr...

There is hope though, when sculpties go live we'll be able to do triangles and polygons. Yay!

-Doug
Margarita Nemeth
Registered User
Join date: 22 Mar 2007
Posts: 34
05-11-2007 18:12
From: Douglas Douglas
Sigh ... a vertex is a terrible thing to waste.

I'm less concerned with the rendering hit since today's graphics cards easily handle zillions of textured/lit/z-buffered vertices. I'm thinking more about things like collision detection and other aspects of the physics engine. Grrrr...

There is hope though, when sculpties go live we'll be able to do triangles and polygons. Yay!

-Doug

The graphics cards can, but a visit to the avarage mall in SL would explain the problem with bad texturemanagement quitewell:
1MB textures on vendors and signs, avatars walking around with a couple of megabytes worth in textures on a rather skimpy outfit. Just teleporting into the middle of a mall can give you a 20+ MB bandwidth hog without a problem.
All these textures take bandwidth. Furthermore, they not only take bandwidth from your T5+ connection, but many times that from the servers' bandwidth. Not to mention storagespace, with HD's racing back and forth to get all those textures. Sure, a lot of it is stored directly in a servers' memory. But even that takes time to cough up, memory size, amount of texures in memory and amount of simultanious queeries adding up to your waiting time.
If Linden were to have a fun day where there were no textures available, only basic coloring, then the result would be an almost lagfree day, no matter how many customers logged in. Sure, collisions and such still need to be calculated, but the resources gained would take a huge chunk out of all the usually generated lag, allowing for much faster calculation processes.
_____________________
Every time you sit on a camping chair, a kitty dies... Trashbin diving FTW!
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
05-11-2007 19:26
From: Deanna Trollop
At max LOD, an unmodified box prim has 18 polys per side. (3x3 grid, divided into triangles)

Thanks for that, Deanna. Looks like I was way off. Also, upon experimentation, it looks like my theory behind the why was incorrect as well. As near as I can tell, there's no correlation whatsoever between the specific number of vertices, and the way in which things like cuts and twists work. I should have looked at that before posting my guess. Sorry if anyone was confused.

Doug, I agree. A vertex IS a terrible thing to waste, especially in this amount. I really don't know why there are so many. It does seem pretty excessive.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Dnel DaSilva
Master Xessorizer
Join date: 22 May 2005
Posts: 781
05-12-2007 02:41
At max LOD, the megaprim boxes I see have only 12 triangle per side, and for some strange reason, decrease to 4 triangles with any amount of taper on them.

Edit: Just did some experimenting, a regular box decreases to only 2 triangle per side with tapering. A tapered box is always more triangle efficent even when combined with other deformatins such as hollow and cut. Seems really weird to me.
_____________________
Xessories in Urbane, home of high quality jewelry and accessories.

Coming soon to www.xessories.net

Why accessorize when you can Xessorize?
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
05-12-2007 03:30
From: Chosen Few
A vertex IS a terrible thing to waste, especially in this amount. I really don't know why there are so many. It does seem pretty excessive.
I believe it has something to do with evening out lighting effects. If a box prim face only has 4 verts, then when the effect of multiple lights on that face are calculated, the shading is essentially a single gradient from one corner to the next and across the single diagonal. When large boxes are used for construction elements like walls and floors, this can look pretty cruddy. Adding 12 more verts per face allows a somewhat finer resolution of shading, essentially.
Douglas Douglas
Registered User
Join date: 13 Dec 2006
Posts: 29
05-12-2007 04:45
Deanna,

Not so. A football field sized rectangle will texture map and light just fine assuming the graphics card is doing proper interpolation which these days they all do. There is NO need to increase vertex count to improve visuals. Here I'm assume all vertices are co-planar which is easy to ensure if SL coverts everyting to triangles before they are fed to the graphics card.

Margarita,
I think you nailed it. Texture schlepping is the issue.

Cheers,
Doug
2k Suisei
Registered User
Join date: 9 Nov 2006
Posts: 2,150
05-12-2007 05:11
From: Douglas Douglas
Deanna,

Not so. A football field sized rectangle will texture map and light just fine assuming the graphics card is doing proper interpolation which these days they all do. There is NO need to increase vertex count to improve visuals.

Cheers,
Doug


SL uses vertex lighting. This relies on vertices being present. I'm sure there are more sophisticated lighting methods available on the latest cards. But how many of SL's residents are using the latest graphics cards?. I suppose Linden Lab chose the lighting method that would benefit the most users.
Douglas Douglas
Registered User
Join date: 13 Dec 2006
Posts: 29
05-12-2007 08:25
2k,

Actually, from what I can tell, the illumination model is indeed modest (pretty much basic lambertian). I was actually referring to texture mapping (distinct from ilumination) issues where poor interpolation can cause distortion.

Cheers,
Doug