University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Binding the _deformBuf to D3D9 vertex buffer? | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Binding the _deformBuf to D3D9 vertex buffer?
November 25, 2015
10:35 am
Avatar
Member
Members
Forum Posts: 28
Member Since:
November 5, 2015
sp_UserOfflineSmall Offline

Hello,

One major difference of Direct3D and OpenGL is I can't call the vertex buffer by index in Direct3D, and which means

I have to rebind the _deformBuf and create a new vertex buffer on every frame, although I do see you have to bind

them with

glVertexPointer(3, GL_FLOAT, 0, (GLfloat*)&shape->_deformPosBuf[0]); 

Are there any faster ways for the renderer to consume the _deformBuf and that I don't need to *re-create* a vertex

buffer on every frame call?

Update1:

Is there a way to get the final transformation of a submesh and transform a fixed vertex buffer instead?

like the leg submesh, upperbody submesh? It seems to be a waste to process all vertexes on every frame call....

Any ideas?

Thanks

Jack

November 30, 2015
6:24 pm
Avatar
Admin
Forum Posts: 52
Member Since:
August 8, 2012
sp_UserOfflineSmall Offline

Hi Jack,

I am not familiar with Direct3D API, but I believe you can update the content in a vertex buffer instead of re-create a new one.

Here is a link to its MSDN reference :

https://msdn.microsoft.com/en-us/library/windows/desktop/bb172233(v=vs.85).aspx

 

Mesh skinning will actually produce a different transformation for each vertex based on the skinning weights ( though mostly identical for vertices associated in the same bone ). The fastest way to update the vertices is through GPU skinning. We have an implementation of this in GLSL shader. You may also try to implement a similar shader in DirectX if performance is important.

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online: huberdavidsen3, casey29english, kinneyreynolds06, andersen19eaton, kristensen00leblanc, bager59mayo, eric506784, t9rrzpi307, g2pvwfg490
108 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

jwwalker: 80

jyambao: 51

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 65

Members: 52505

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 427

Posts: 2343