acceptable poly count

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

acceptable poly count

Post by floater eater »

how many polys per model are acceptable for a large scale multiplayer game?

to give you an idea of what i want, here is a screenshot:

Image

it has 7,328 polygons. I'm guessing this is too big, to say the least.

i have a lot of these high detail models, which i made in wings3D. Though i cannot yet start to work with ogre (need admin rights to set up STLPort on these computers) i need to know if i can use these models before continuing.

its not that ive never worked on a game before, i have made some pretty advanced ai code for Starsiege: Tribes in the past among other things, but until now i have only been a scripter.
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

There is no polygon limit in Orge, please run a search on this. From what I have seen it is not how many polygons you have in your scene but the number of separate objects (static vs. moving), number of animated objects, number of lights, shaders used, and number of seperate scene nodes. Take a look at some of the ogre demos and notice how the terrain demo with ~150,000+ polys gets good frame rates while some of the shader intensive ones are quite slow or the same speed with about ~5000.

I do like the model. I am not a modeler, but I do have some suggestions :). The engine on the back and the inlet on the front could probably be using at least half the number of polys and still look just as good once they are textured.

What kind of game are you thinking of working on?
User avatar
Chris Jones
Lich
Posts: 1742
Joined: Tue Apr 05, 2005 1:11 pm
Location: Gosport, South England
x 1

Post by Chris Jones »

well, from how i read what he said, i thought he meant, is it an acceptable limit, that will work for most decentish computers, you cant just develop a game that runs on your on pc

if you want to lower the poly count, why dont you create a normal map for it
sgrgc
Greenskin
Posts: 130
Joined: Thu May 12, 2005 1:42 pm

Post by sgrgc »

for sp ~7500 is not bad
but for mp i think you have to reduce a lil bit
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

Chris Jones wrote:well, from how i read what he said, i thought he meant, is it an acceptable limit, that will work for most decentish computers, you cant just develop a game that runs on your on pc

if you want to lower the poly count, why dont you create a normal map for it
What I was trying to say was that other factors besides the number of pure polys in a scene will affect its performance. I have seen some space games that use roughly that amount of polys and they played just fine. Yet, they didn't use any heavy duty effects either.

EDIT: You can always include good art and then include LOD settings and effect options for the end user so can scale back the graphics to get a better experience online. It is also useful to remember that by the time you finish people will be able to handle better graphics then they today.
Last edited by Game_Ender on Wed Sep 07, 2005 12:50 am, edited 1 time in total.
sgrgc
Greenskin
Posts: 130
Joined: Thu May 12, 2005 1:42 pm

Post by sgrgc »

without knowing the system nothing can be said
maybe the game will run on a p3 then even 1000 polys can be a problem
User avatar
Morrog
Greenskin
Posts: 105
Joined: Wed Aug 24, 2005 11:24 pm

Post by Morrog »

If Ogre is smart, and I do hope it is, all/most meshes end up on the video card, so poly count has little effect at that point unless you're going really, really high.
Like said the real problems are the effect applied to those polys and the pixels drawn as a result of the model.
Do know though that the more polys the more memory it takes up on the video card, and it's not like the polys are free. A poly is a poly.

Something to note: There's been a move away from high poly models in games. Games like Half-Life 2, Far Cry, stuff like that, use lower poly meshes with normal maps generated from the original high poly mesh. It's really hard to tell the difference. The only indication is the outline of the model.
This certainly makes collision easier. You basically have to do nothing to the model before throwing it to the collision engine since it's already low poly. And low poly models are easier on skinning algorithims and such like that.

Normal mapping is easy in Ogre, so if your target machine supports it give it a try!
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

The high poly versions they use are around 500,000 to 1,000,000, I am not a modeler but I do believe that it requires a different set of skills to do those kind of models. So I am not to sure if many hobby game makers will be making use of it.
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

Post by floater eater »

well, ogre wont run on this comp, and its going to be about a month till i get a computer that it will run on.

i was hoping to use cell shading, actually. that is a feature of ogre isnt it?

anyhoo, i dont know how to implement a shader. like i said, i'm a big newb. all i know how to do is program.

//----------------------------
Well, i have been reading on this stuff for a few weeks now, and i find most of the tuts to be unhelpful. so, i know these are newbish questions but im going to ask them anyways. excuse me this indiscression.

so, what is a shader? how does it work? how do i implement it? if i want to use cell shading (for that cool comic book effect) is there anything special i will need to know before setting it up? will it take more system resources?

i'll research on how to reduce poly count before i ask...
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
User avatar
Morrog
Greenskin
Posts: 105
Joined: Wed Aug 24, 2005 11:24 pm

Post by Morrog »

so, what is a shader? how does it work? how do i implement it? if i want to use cell shading (for that cool comic book effect) is there anything special i will need to know before setting it up? will it take more system resources?
A shader is a program that runs on the GPU that modifies what the GPU normally does. In the case of celshading it modifies the GPU to do...celshading.
Ogre does not technically do celshading. It supports shaders, and it is the shader that does the celshading. Ogre's example programs come with a celshading shader so you can easily use that one. It's pretty easy to use shaders in Ogre. Just scan the example files, the materials, explore and you'll figure it out.
Back to the question. Shaders are compiled and sent to the GPU, which then runs it at the right time, giving it various data both GPU defined and data defined by your program. Shaders are handled quite well by Ogre. Ony our side of things you write or get a shader program, create a program definition in the material file (I believe), and then modify the material for your model to use that shader program. It's really quite easy.
I don't know for sure, but my best guess is that celshading is just a basic shader which will require nothing more than all the right materials and files, nothing needs to be done specifically in your program.

By the way, there are two kinds of shaders. Vertex programs, and fragement programs. Vertex programs do processing on a per-vertex basis, while fragment programs do things on a per-pixel basis.
Sometimes fragment shaders are applied to just certain models, and sometimes they're applied to the whole screen, completely depending on the effect.
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

Post by floater eater »

:shock:

...

:shock:

so how do i make the right materials? is it just a matter of having the right shininess etc or is there extra data used in cell shading that i'll have to use a separate utility (other than wings3D) to make?
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

The cell shader that come with ogre should work well with any model that is not to angular. That is what sinbad has said.
User avatar
Morrog
Greenskin
Posts: 105
Joined: Wed Aug 24, 2005 11:24 pm

Post by Morrog »

Ogre stores all materials in script format. If you open up an Ogre .material file you'll see for yourself. It's really quite simple. For celshading you just go in there and modify the material for your mesh and tell it to use the right shader.

Here's the cel shading material info:

Code: Select all

// -------------------------------
// Cel Shading Section
// -------------------------------
vertex_program Ogre/CelShadingVP cg
{
	source Example_CelShading.cg
	entry_point main_vp
	profiles vs_1_1 arbvp1

	default_params
	{
		param_named_auto lightPosition light_position_object_space 0
		param_named_auto eyePosition camera_position_object_space
		param_named_auto worldViewProj worldviewproj_matrix
		param_named shininess float 10 
	}
}

fragment_program Ogre/CelShadingFP cg
{
	source Example_CelShading.cg
	entry_point main_fp
	profiles ps_1_1 arbfp1 fp20
}


material Examples/CelShading
{
	technique
	{
		pass
		{
			vertex_program_ref Ogre/CelShadingVP
			{
				// map shininess from custom renderable param 1
				param_named_auto shininess custom 1
			}
			fragment_program_ref Ogre/CelShadingFP
			{
				// map diffuse from custom renderable param 2
				param_named_auto diffuse custom 2
				// map specular from custom renderable param 2
				param_named_auto specular custom 3
			}
			texture_unit
			{
				texture cel_shading_diffuse.png 1d
				tex_address_mode clamp
				filtering none
			}
			texture_unit
			{
				texture cel_shading_specular.png 1d
				tex_address_mode clamp
				filtering none
				tex_coord_set 1
			}
			texture_unit
			{
				texture cel_shading_edge.png 1d
				tex_address_mode clamp
				filtering none
				tex_coord_set 2
			}
		}
	}
	
}
Look big and confusing? Don't worry about it. You actually don't need to touch that at all. Just apply it to your models and Ogre'll do its thing.
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

Post by floater eater »

only confusing cause im not used to ogre syntax. thanks a bunch!
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
User avatar
Chris Jones
Lich
Posts: 1742
Joined: Tue Apr 05, 2005 1:11 pm
Location: Gosport, South England
x 1

Post by Chris Jones »

im just wondering, if your new to ogre and shaders etc, why are you starting off trying to get shaders to work with ogre, why dont u learn how to use ogre, and all about it, materials etc first, then try to add shaders later?
User avatar
Morrog
Greenskin
Posts: 105
Joined: Wed Aug 24, 2005 11:24 pm

Post by Morrog »

He won't be using Ogre for a month, so I'm guessing he just wants to get a feel for what is in store.
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

Post by floater eater »

yep :D
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
User avatar
ahmedali
Gnome
Posts: 302
Joined: Fri Feb 20, 2004 8:52 pm
Location: Lahore, Pakistan

Post by ahmedali »

ToTheTopic:
Lets assume that we have a total budget of 1,00,000 polys for a frame to render.

Now you need to do an analysis on your Ship model. Consider many cases to help you like...
- How much polys will be already rendered per frame. Minus this number from the total budget and you will get budget for you ships, say 40,000.
- How many ships like this, a player is going to see at once on the screen, say 5.
- Divide budgetForShips with the number of potential visible ships. And you will get the "max polys" for your ship. Now its 8000 polys/ship.

This is not a law, feel free to do desired analysis. This analysis may not be technically correct but atleast it guides to make decisions.

Note that you can also base the budget for ships on different factors like MemoryConsumed, MaxPolysToRenderPerFrame, TargetGfxCard factors etc. Its not difficult to do, you don’t need some economy simulation super computer to solve these problems.
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

Post by floater eater »

ok thanks that helps a lot.

i was hoping to be able to run 30 player models and about 10 ships. i suppose i will have to use my lower poly models to achieve this? i have been told that it takes a lot of power to run a large number of objects. how would i achieve these numbers?

the player models will also have to have guns, the ships will need turrets, plus explosions, celestial bodies, etc...

on the ground there will be all of the above (minus the celestial bodies) PLUS there will be terrain, weather, and buildings.

how many polys in this case?

my target machine is a 2500 MHZ, 256 ram, graphics accelerated.
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
User avatar
Morrog
Greenskin
Posts: 105
Joined: Wed Aug 24, 2005 11:24 pm

Post by Morrog »

my target machine is a 2500 MHZ, 256 ram, graphics accelerated.
Quick note: those are really vague specs. "Graphics accelerated"? Well my old Voodoo 3 is graphics accelerated. In fact, my calculater is graphics accelerated when I throw it out the window. ;)
256 RAM is really quite low these days (saddening as it may be). 512 is the new "minimum". I'm just saying. Maybe you really do want to target 256mb machines, I dunno.
And 2500MHZ means nothing as well. My processor runs at 1.8 Ghz...but it's an AMD Athlon 64 3000+. That last part makes the difference ;)

Anyway, all really stupid and this didn't help much, sorry ;)

Okay, I'll help now.
Do you know of a game that does basically what you want? Does it your on your target machine? Kay. :)

Anyway, here's what you want to do. When you finally get into Ogre make a little demo app that just shows the OgreHead mesh and shows FPS and poly count stats. Run this on your "target machine." Write down how many polys the ogrehead is taking up.
Then modify the app so you can press a button and add a new head within the view. See how many you can put on screen before you reach your desired minimum FPS, which should be around 30, no lower than 24, but best results are at 60.
How many did you get on there? Multiply by the poly count of the ogre head, and you've now got about how many polys you can put on screen at once.
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

Post by floater eater »

sweet. will do.

as far as the cell shading and materials go, i have a ship that i messed with today. i made all the colors using a seperate material for each. is this a good coloring approach?

Image

Image

its my first try, so be gentle.
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

I like the ship, but using a separate material for each color is not the most efficient way. There are many people on this forum more qualified than me to explain materials, but in general you want one material per ship. Each material defines the texture for the ship, as well as many other properties that can provide cool effects. Your mesh when exported properly will have what is called a texture map, the best being a uv texture map. This defines how the texture will be applied to the ship. Here is basically example of some texture mapping including the most widely used (at least for games) UV texture mapping method. This map lets you paint your ships texture as a flat 2D image in a program like photoshop and then have OGRE intelligently wrap that texture onto the model.

EDIT: Sorry I don't know how to "unwrap" a model in wings3d but someone here probably knows the way.
Last edited by Game_Ender on Mon Sep 12, 2005 9:37 pm, edited 1 time in total.
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

Post by floater eater »

so, does anyone know how to get UV maps from wings?
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
floater eater
Gnoblar
Posts: 19
Joined: Mon Aug 29, 2005 7:03 pm

Post by floater eater »

is that a dumb question?
(sig removed -- find something smaller)

"let me say this: i'm glad the forums aren't u" - what kind of egomaniac quotes himself?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

I didn't think Wings did UV mapping personally, but I'm hardly an expert. Aren't there any Wings docs you can check?
Post Reply