[Solved] problem about rendering speed [updated]

Problems building or running the engine, queries about how to use features etc.
Post Reply
abanknote
Kobold
Posts: 39
Joined: Thu Dec 14, 2006 7:10 am
Location: Pittsburgh, PA

[Solved] problem about rendering speed [updated]

Post by abanknote » Fri Dec 29, 2006 12:03 am

hello,

I have an object exported from Maya. I placed a couple of them in a scene and found the fps just plummeted from a hundred seventy to around fifty to sixty something. But the number of triangle is only 15,xxx (the weird thing is that when I move camera to somewhere the triangle count is 19,2xx, the rendering speed came back to 16x fps). What could possibly be the reason for this huge decrease? My object used a 386kb .png for texture, does the size of texture matter a lot?

thanks

update:
some other thoughts, I checked out the converted xml version, and it has 2+28+68+32+76+56 = 262 faces. I know it's kind of ridiculous, but does it have to be that slow? by the way, my graphic card is Geforce 7900 GLX

here two screenshots
Image
Image
Last edited by abanknote on Fri Dec 29, 2006 11:20 pm, edited 3 times in total.
0 x

abanknote
Kobold
Posts: 39
Joined: Thu Dec 14, 2006 7:10 am
Location: Pittsburgh, PA

Post by abanknote » Fri Dec 29, 2006 12:16 am

I reduced the size of the texture map, and it still was very slow.
0 x

User avatar
hmoraldo
OGRE Expert User
OGRE Expert User
Posts: 517
Joined: Tue Mar 07, 2006 11:22 pm
Location: Buenos Aires, Argentina
Contact:

Post by hmoraldo » Fri Dec 29, 2006 12:31 am

How many submeshes has that mesh?
0 x
H. Hernan Moraldo
Personal website

abanknote
Kobold
Posts: 39
Joined: Thu Dec 14, 2006 7:10 am
Location: Pittsburgh, PA

Post by abanknote » Fri Dec 29, 2006 1:16 am

ahhh...
How to count the number of submeshes?
the only mesh data I could get was that tiangle count down the lower-left corner
0 x

User avatar
hmoraldo
OGRE Expert User
OGRE Expert User
Posts: 517
Joined: Tue Mar 07, 2006 11:22 pm
Location: Buenos Aires, Argentina
Contact:

Post by hmoraldo » Fri Dec 29, 2006 1:32 am

Use the xml converter and check the generated xml file.
0 x
H. Hernan Moraldo
Personal website

abanknote
Kobold
Posts: 39
Joined: Thu Dec 14, 2006 7:10 am
Location: Pittsburgh, PA

Post by abanknote » Fri Dec 29, 2006 5:09 am

bump up with update above
0 x

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos » Fri Dec 29, 2006 5:15 am

You are running the release version right?

The reason people are asking about submeshes is batching has a lot more to do with performance than numbers of triangles. In other words, there's overhead in every DrawPrimitive call (and the OpenGL equivalents).
0 x

abanknote
Kobold
Posts: 39
Joined: Thu Dec 14, 2006 7:10 am
Location: Pittsburgh, PA

Post by abanknote » Fri Dec 29, 2006 5:38 am

what is "the release version", release of Ogre ?

so, does that mean if I don't redo the model, the speed will keep sucking like this?
0 x

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos » Fri Dec 29, 2006 5:41 am

What did you compile your program in (Visual C++ Express, etc.?).

If you're on Windows, you definitely want to build a release version of your program as opposed to a debug version. Debug versions run MUCH slower.
0 x

abanknote
Kobold
Posts: 39
Joined: Thu Dec 14, 2006 7:10 am
Location: Pittsburgh, PA

Post by abanknote » Fri Dec 29, 2006 5:52 am

Thanks so much for pointing it out.
Yes, the release build starts at 7xx fps and falls down to fifty something after I placed about two hundred signs.
It makes me feel much better.
Thank you
0 x

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos » Fri Dec 29, 2006 6:41 am

Cool, it's a pretty common complaint (people freak out fairly often on the framerate the debug versions achieve).

By the way, your geometry seems a bit too complex for what you're doing. I think you'd be better served in the long run using a texture map on the sign. Currently the "paint" on your sign looks like it's using geometry to achieve an effect that would work well with texture maps.
0 x

psquare
Hobgoblin
Posts: 554
Joined: Tue Nov 14, 2006 3:26 pm

Post by psquare » Fri Dec 29, 2006 7:03 am

abanknote wrote:Thanks so much for pointing it out.
Yes, the release build starts at 7xx fps and falls down to fifty something after I placed about two hundred signs.
It makes me feel much better.
Thank you
Also, if you are using blending in the material, this will slow down performance.
0 x

User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: Princeton, New Jersey, USA
Contact:

Post by nikki » Fri Dec 29, 2006 8:40 am

Yeah, it should just have been two cuboids (the sign and the pole). A good texture would make it look better, and improve performance too.
0 x

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos » Fri Dec 29, 2006 8:44 am

In fact with your current setup, unless you took some extra precautions, z-fighting might become a problem (or a model that's slightly 3D when it should be flat).
0 x

abanknote
Kobold
Posts: 39
Joined: Thu Dec 14, 2006 7:10 am
Location: Pittsburgh, PA

Post by abanknote » Fri Dec 29, 2006 9:24 am

Is "blending" the term for the way I render signs with pure color?
If I just want to use one color on a surface, is applying a single color texture faster or using blending?
I'm really a newbie to 3D thing. An awful lot to learn.
Kentamanos:
By the way, your geometry seems a bit too complex for what you're doing. I think you'd be better served in the long run using a texture map on the sign. Currently the "paint" on your sign looks like it's using geometry to achieve an effect that would work well with texture maps.
I agree. Thanks so much for your help
0 x

User avatar
hmoraldo
OGRE Expert User
OGRE Expert User
Posts: 517
Joined: Tue Mar 07, 2006 11:22 pm
Location: Buenos Aires, Argentina
Contact:

Re: problem about rendering speed [updated]

Post by hmoraldo » Fri Dec 29, 2006 1:57 pm

abanknote wrote:hello,
some other thoughts, I checked out the converted xml version, and it has 2+28+68+32+76+56 = 262 faces.
As you are using 6 submeshes, every entity you create from this submesh is going to count something like 6 meshes for performance factors. 6 isn't a great number but well, everything counts for performance.
0 x
H. Hernan Moraldo
Personal website

Spanky
Halfling
Posts: 80
Joined: Mon Oct 07, 2002 2:45 am
Location: Ontario Canada

Post by Spanky » Fri Dec 29, 2006 7:36 pm

I think what Kentamanos was tryihng to suggest to you was that instead of modeling the detail of the arrows and the red circle on the sign as geometry, instead just make the thing a rectangle and paste a texture that contains these details over the rectangle. That way, the "sign" portion (without the pole) would only be a single quad for the front and would just map a single texture image, which has a white background on it and a circle in the middle with the arrow on it, over the quad to give this effect. That way, it's just a single quad (2 tri's) and a single texture map.

The z-fighting that was mentioned means that because all the detail you have in your model is at the same depth, there may be flickering of it depending on how far it is and the angle of viewing since you lose precision with floating point values so sometimes the arrow would be infront and sometimes the white background would be infront. (Or a mix of both overlapping eachother). This is refered to as z-fighting or z-wars or anything like that.

Hope that helps.
Shawn
0 x

User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos » Fri Dec 29, 2006 8:49 pm

Nice summary Spanky :).
0 x

Post Reply