|
Raul
|
 |
« on: July 21, 2008, 04:13:28 PM » |
|
It's my again with my RTS demo. After I have implemented the new formula for calculating distance (I do not do anymore the Sqrt) I have won a lot in performance but I have now another problem. I have a model with 600 polys. It is an animated one; a Rifleman. Because the TVA plugin does not work I first exported the model to .X format then from my code I made the TVA (TVMesh.SaveTVA). In my map I have up to 300 soldiers + the landscape, and the FPS is real low (~50 on my pc and 15-20 from others). I want to add more things like explosions and sounds and other meshes but right now I have to find a way to optimize the application. If I render only the landscape I have up to 500 FPS 
|
|
|
|
|
Logged
|
|
|
|
Lenn
Customers
Community Member
    
Posts: 343
Ivan Miskelic
|
 |
« Reply #1 on: July 21, 2008, 06:28:45 PM » |
|
300 high polycount animated characters are always going to be slow regardless of how you code it, on today's hardware. It also depends on how many vertices and bones they have, or if some other method of animation is used, then how cpu-intensive the animation is. You could try using a less cpu intensive type of animation such as baked anims (no bones), or lower the poly and bone count of your actors. 
|
|
|
|
|
Logged
|
Theres a shadow just behind me. shrouding every step I take. Making every promise empty. pointing every finger at me. Waiting like a stalking butler, who upon the finger rests. Murder now the path of must we, just because the son has come.
|
|
|
|
Raul
|
 |
« Reply #2 on: July 22, 2008, 01:13:30 AM » |
|
the models are not made by me.
you said: "..a less cpu intensive type of animation such as baked anims (no bones)..". I presumed that this has to be made from the 3DStudioMax right? I have no skills in animations but I will talk to my team about that. I was wondering if other strategy games are using this kind of animation you said..
|
|
|
|
|
Logged
|
|
|
|
micmanos
Customers
Community Member
    
Posts: 363
End of this evil world in 4..3..2..
|
 |
« Reply #3 on: July 22, 2008, 01:29:03 AM » |
|
Lenn is right.
Although 300x600 poly are not (supposingly) too much for todays hardware, the animation and computations will kill your GPU and CPU.
180.000 polys are not that much to have (but not paint) inside a scene but IT IS too much to paint on screen.
Your best chance is to try and find tricks to cut down the polys and the animations.
|
|
|
|
|
Logged
|
The limited human life is much like a powerful locomotive assigned to carry a handful of sand over a distance of a few millimeters. Logic dictates that human beings are not meant to die. So what went wrong?
|
|
|
|
Raine
|
 |
« Reply #4 on: July 22, 2008, 01:35:04 AM » |
|
And I think you need more detail the closer you get, so perhaps you might want to consider swapping to higher polycount models when getting closer with the camera, and showing lowpoly stuff when looking from the distance.
|
|
|
|
|
Logged
|
|
|
|
|
Raul
|
 |
« Reply #5 on: July 22, 2008, 04:48:14 AM » |
|
well in this case, I will use a model with 100-200 polys when the camera is high in the sky and if i will zoom in i will switch to my current model. Question: how to change the models?? 
|
|
|
|
|
Logged
|
|
|
|
|
Raine
|
 |
« Reply #6 on: July 22, 2008, 06:42:11 AM » |
|
hrm, well, you have to keep the same animation, the same position, the same orientation, you just render another model instead of the previous, no? 
|
|
|
|
|
Logged
|
|
|
|
Lenn
Customers
Community Member
    
Posts: 343
Ivan Miskelic
|
 |
« Reply #7 on: July 22, 2008, 07:11:26 AM » |
|
like Raine said, just store the exact information about the state of the low poly model before you switch, and in the next frame just show the high poly model and apply the same variables to it like the low poly one had one frame earlier. 
|
|
|
|
|
Logged
|
Theres a shadow just behind me. shrouding every step I take. Making every promise empty. pointing every finger at me. Waiting like a stalking butler, who upon the finger rests. Murder now the path of must we, just because the son has come.
|
|
|
|
Raul
|
 |
« Reply #8 on: July 22, 2008, 08:02:59 AM » |
|
I see. I will do this after I will go home and I will post here the results. 
|
|
|
|
|
Logged
|
|
|
|
|
Raul
|
 |
« Reply #9 on: July 22, 2008, 11:48:33 AM » |
|
damn. i have a BIG problem.
I made 2 exes. In one there are the 300 polys models and in the second the 600 polys models.
In both exes I have same FPS.. :|
|
|
|
|
|
Logged
|
|
|
|
Lenn
Customers
Community Member
    
Posts: 343
Ivan Miskelic
|
 |
« Reply #10 on: July 22, 2008, 01:51:30 PM » |
|
They probably have the same number of bones, just a lower vert/tri number.
Maybe your only solution is to find models with fewer bones, and then try. Try a test with some simple model which has like only 5 bones and 100 polys, and compare to the models you want. Then you will see if this is the bottleneck or not.
|
|
|
|
|
Logged
|
Theres a shadow just behind me. shrouding every step I take. Making every promise empty. pointing every finger at me. Waiting like a stalking butler, who upon the finger rests. Murder now the path of must we, just because the son has come.
|
|
|
|