Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


UpdateSkinnedMesh vs GPU Update


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 AquaMacker   Members   -  Reputation: 255

Like
0Likes
Like

Posted 31 January 2012 - 09:41 AM

Hi~~~

It's a simple question...

Lock()
UpdateSkinnedMesh() vs GPU(.fx) Update Blendweigth
UnLock()

Which One is more efficient ?

So simple ? ^^a

Sponsor:

#2 Adam_42   Crossbones+   -  Reputation: 2615

Like
1Likes
Like

Posted 31 January 2012 - 10:43 AM

The only accurate answer for questions like this is that you need to measure the performance of both options on the hardware you care about and compare the results.

Performance will vary based on details like:

- How many times per frame are you rendering the mesh?
- What GPU and CPU do you have?
- How many bones are there?
- How many vertices are there?
- Do you need to read back the results on the CPU?
- Which thread is this being calculated on?

#3 AquaMacker   Members   -  Reputation: 255

Like
0Likes
Like

Posted 31 January 2012 - 11:20 AM

My answer is ALL Condition SAME...

#4 InvalidPointer   Members   -  Reputation: 1443

Like
1Likes
Like

Posted 31 January 2012 - 12:01 PM

I'm going to echo Adam here and say 'depends what else you're doing.' 'Same' does not answer questions like the relative power of the GPU/CPU combination(s) installed, extra data availability requirements or additional workload.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

#5 AquaMacker   Members   -  Reputation: 255

Like
0Likes
Like

Posted 31 January 2012 - 12:27 PM

Yes Commander !

How many times per frame are you rendering the mesh?
- 1 rendering per 1 frame

What GPU and CPU do you have?
- ATI 3870
- 2.0 core2duo

How many bones are there?
- basic biped : 30

How many vertices are there?
- 5430

Do you need to read back the results on the CPU ?
- I don't understading "read back" meaning.
- "Read back" is Loading again ?
- Answer is loading once and reuse..

Which thread is this being calculated on ?
- 1 thread

Please down answer, Sir !

I'm sorry for my veryveryvery short + rigid answer....
I wanna know just absolutely answer in common.

^^a

#6 mhagain   Crossbones+   -  Reputation: 8270

Like
2Likes
Like

Posted 31 January 2012 - 01:19 PM

There's still no absolute answer. OK, in general terms, and everything else being equal, a GPU update is going to run much faster - maybe twice as fast or more, depending on the hardware. If however your GPU is loaded with other work and your CPU is relatively free then you'll probably want to do it on the CPU. Or if your CPU is loaded and your GPU is free then you'll want to put it on the GPU. If you can spawn an extra thread on the CPU and update in that then doing it on the CPU might get your update for free (aside from thread overhead). If you've a fast CPU but a slow GPU you might want to put it on the CPU. If you've a fast GPU but a slow CPU you'll put it on the GPU. If you're tight on constants register space or you can't do vertex texture fetches you'll consider the CPU. But drawing multiple models of the same type would mean a lot of Lock/Unlock and so on, so the GPU wins.

So like the others said, there is no right answer. You need to know what kind of environment you're running in and what the rest of the program is doing, how your GPU vs CPU usage is balancing out, where your bottlenecks are, and so on.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#7 AquaMacker   Members   -  Reputation: 255

Like
0Likes
Like

Posted 31 January 2012 - 01:43 PM

I just wanna know Absolutic common answer.

My English writting skill level is very low...

I'm sorry --a

Your answer is I wanna know answer.

Thank you very much ^^a

Have a Nice DAY !!!

#8 InvalidPointer   Members   -  Reputation: 1443

Like
1Likes
Like

Posted 01 February 2012 - 10:23 AM

I just wanna know Absolutic common answer.

My English writting skill level is very low...

I'm sorry --a

Your answer is I wanna know answer.

Thank you very much ^^a

Have a Nice DAY !!!


It's fine, we're (or at least, I'm not) not yelling at you, period, or questioning your English ability, just pointing out that you're asking for an absolute answer that doesn't exist, much like, for example, the question "How do I downsample depth?" In that case, you can get a local maximum, a local minimum or a regular, boring old mean; all are useful for different purposes and we need to know more about what else you need it for in order to give you a meaningful answer.


Since you're asking about 'readbacks,' this is simply the process of reading the skinned vertex data back onto the CPU, probably for something like physics calculations or the like. More on that in a second.

As an example of 'what else are you doing,' the use of shadow volumes is an excellent argument in favor of keeping everything CPU-side, as the actual process of getting this sort of stuff back into main memory from the GPU can be rather slow under typical game circumstances due to how the graphics driver actually goes about implementing your draw calls; generally, they're queued up into a big FIFO list behind the scenes and the GPU will need to burn through a few frames(!) worth of commands before it can be in a state where it can copy things out of VRAM. Again, the specifics of what else you're doing will influence the commands actually sent to the GPU and can in turn affect that latency. We just want some detailed information about what you plan on doing with your mesh(es) :)
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS