FOnline Development > 3D Development
Character Animations
pistacja:
Don't cut the textures, that would give you 0.000001 fps. They could be 6-8x bigger if dds (dxt) was used anyway.
The number of objects (meshes/batches) is the key. If every player is 4 objects (body, armour, gun, helm) then having more then ~75 players will be a big hit for the framerate. How often do you get more then 20-30 players on one screen?
Instancing could help with a lot of players. If there are 10 players that look the same and play the same anim, then telling the gpu to render one player 10x and offset his position in a vertex shader will not only save the gpu 9 state changes but will also save the cpu the need to animate 9 more characters.
500 000 more or less verts/polys is all the same for a 'modern' gpu, but the cpu has to animate them first... giving that task to the graphic hardwere can also give a big boost.
The problem with these is that it gives a boost on a powerfull gpu, for an old card it will have a negative impact.
If it runs at 30fps with 90 players then it's really ok.
Anyhow, nice job on the anims ;)
A
Karpov:
Hmm...I was not thinking about textures. That may be an important factor. I wil try dds. That format uses MIP maps , doesn't it? It could be good for this game. I know you said this a long time ago pistacja, now that I see your point.
The flame looks weird because it is based on real flamethrowers. I could try to make the flame spread a bit more. Also, I think the sprite character waves the flamethrower a bit to the sides.
I might have to change the SMG random anim. It looks like the sprite changes the clip on the 9mmSMG, but I can't do that because we have different weapons now.
pistacja:
Dds uses (or can use) mip maps. But mip mapping uses +50% more ram (if the texture has 256x256, then there's a extra 128x128 and a 64x64 and a 32x32 and a 16x16 and a 8x8 version). The benefit from dds is that it's compressed (the image is cut into 4x4 px fragments and only 2 'edge' colors are saved for each fragment- the rest are lerped) and stored compressed in ram. The gpu can decompress the texture on the fly in virtualy no time.
It's a bit like jpeg - you can have a sharp pixel-perfect 128x128 bmp or a fuzzy 512x512 jpg that use the same amount of memory.
I'm not saying dds is a must have and bigger textures are needed, just saying that making them smaller is not the way to go if you want more free video ram.
A 512x512 texture takes ~1MB RAM, so lets say we have 100 players with a different body, armor and weapon each. Thats 3x100x1=300 MB. Textures are half that size or less, there aren't 100 types of armor nor body textures, even old cards have 512 or more vram. This is the last thing to think about.
baaelSiljan:
but dont You need to recalculate this texture on every single triangle? when You do it with image 64x64 and 1024x1024 performance hit may be worth changing? And don't such texture is multiplied and projected on this triangles one by one? I need to read about it cause I dont have idea if it works that way. Pistacja, I see You are good in this topic :)
other thing:
simple retopology - really fast only few artifacts removed, little optimalision with points, some triangles removed and bigger one maked instead (but may be not good for animations):
red is original, green is optimised, torso and face after retopology
ok tested one thing: only optimized points from ~3700 to ~640 gives me 10 fps more (from ~354 to ~365) with not rigged dummy object CR_HumanMaleStrong.x.
model optimised with small retopology more fps (now tested in different location - desert only) original: ~573 optimised: ~629 (average values) and little later in barter zone difference is: original: ~520 optimized: ~613
sample optimization:
I care too much :D instead of sleep...
pistacja:
From 3700 to 640 vertex is a 570% improvement but 10 fps when the game runs at 300 fps is a 3% speed improvement. Is it worth?
Look at it this way - your monitor can only display 60 frames per second (if it runs at 60Hz, some run at 100 or even 120Hz), so anything above 60fps is wasted. If something makes the framerate drop from 300 fps to 61fps then that's a big impact but still for the player it give no visual change at all. The other critical number of fps is 24, this is the minimal comfortable framerate, lower then that means pretty much unplayable.
As long as the game runs between 24 and 60 fps there's nothing to worry about.
I'd be very much against any and all optymalizations if there is no proof of a bottleneck first.
anyway.. maybe this should get moved to a different topic?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version