Hardware instancing patch... please can we get it in 1.8.0??

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.

Re: Hardware instancing patch... please can we get it in 1.8

Postby Granyte » Fri Nov 02, 2012 5:19 am

i was asking about how instancing works in OGL if there would be a way to create a uniform interphase with dx and it's per instance vertex data system
Granyte
 
Posts: 846
Joined: Tue Jan 25, 2011 11:07 pm

Re: Hardware instancing patch... please can we get it in 1.8

Postby Nadro » Fri Nov 02, 2012 2:01 pm

Hardware instancing in OGL works in the same way as hardware instancing in DX10 (DX9?), so it's possible.
Nadro
 
Posts: 1647
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Hardware instancing patch... please can we get it in 1.8

Postby hendu » Fri Nov 02, 2012 2:47 pm

Yes, you can have per-instance data in GL. (look up instanced arrays)
hendu
 
Posts: 2585
Joined: Sat Dec 18, 2010 12:53 pm

Re: Hardware instancing patch... please can we get it in 1.8

Postby Mel » Fri Nov 02, 2012 3:06 pm

DX9 on PS3 has some instancing abilities, though i am unsure if they work the same or not

http://msdn.microsoft.com/en-us/library ... 85%29.aspx
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 2202
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Hardware instancing patch... please can we get it in 1.8

Postby Granyte » Fri Nov 02, 2012 7:00 pm

That's the interphase i hacked around to transmit instance ID in DX9 as the instance ID semantic is not yet availible.

But you would normaly have to use that interphase to transmit a matrix array stored in a vertex buffer.
That would be much faster then the current hack i use because it would not be limited to 62 instances per draw calls
Granyte
 
Posts: 846
Joined: Tue Jan 25, 2011 11:07 pm

Re: Hardware instancing patch... please can we get it in 1.8

Postby Nadro » Fri Nov 02, 2012 9:28 pm

I have to add support for multiple vertex buffers in FVF (currently a mesh support just only one vertex buffer) to efficient instancing (second buffer will be usage for per instance data), but this is really easy modification, I'll add it after FVF will be merged with trunk.
Nadro
 
Posts: 1647
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Hardware instancing patch... please can we get it in 1.8

Postby Granyte » Fri Nov 02, 2012 9:50 pm

so that would be like a seconde meshbuffer type like instance mesh buffer.


And then the data that were missing in the vertex definiition like data origin stream and data frequency will need to be added to the vertex descriptor
Granyte
 
Posts: 846
Joined: Tue Jan 25, 2011 11:07 pm

Re: Hardware instancing patch... please can we get it in 1.8

Postby Nadro » Fri Nov 02, 2012 11:36 pm

No second mesh buffer, but just vertex buffer (there is no sense to double other mesh buffer parts like an index buffer, vertex buffer will be enough for it). Yep, I'll add all required features to vertex descriptor.
Nadro
 
Posts: 1647
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Hardware instancing patch... please can we get it in 1.8

Postby Granyte » Sat Nov 03, 2012 12:17 am

No i mean would we create second mesh buffer type that would hold two vertex buffer or would we have only one that could hold two vertex buffer wouldn"t the second one be causing a useless over head in ressources for the meshes that don't need instancing
Granyte
 
Posts: 846
Joined: Tue Jan 25, 2011 11:07 pm

Re: Hardware instancing patch... please can we get it in 1.8

Postby Nadro » Sat Nov 03, 2012 1:16 am

Only one mesh buffer will be exist, but it will be allowed to hold multiple vertex buffer (buffers will be stored on irr::core::array<IVertexBuffer*> VertexBuffer), so when someone will need two vertex buffers eg. for instancing he will be allowed to add them. I don't see overhead (only very small for iterate buffers by "for" instruction) of this solution for standard cases when only one vertex buffer is required.
Nadro
 
Posts: 1647
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Hardware instancing patch... please can we get it in 1.8

Postby devsh » Sat Nov 03, 2012 12:38 pm

why cant we have separate attribute lists???

they have best performance and scalability anyway
We chose to stream mesh data from Multiple OpenGL Contexts in many threads and do the other things, not because they are easy, but because they are hard! - JFK
User avatar
devsh
Competition winner
 
Posts: 1758
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK

Re: Hardware instancing patch... please can we get it in 1.8

Postby Nadro » Sat Nov 03, 2012 5:19 pm

What do You mean (simple attrib list per vertex buffer, like for example a simple matrix ID for each vertex buffer?)? More info will be helpful ;) FVF is still in development phase, so we can add to it all usefull features.
Nadro
 
Posts: 1647
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Hardware instancing patch... please can we get it in 1.8

Postby Granyte » Sat Nov 03, 2012 7:42 pm

like linking the atribute list to the vertex buffer and composing the vertex definition at run time?

That could cause issue with dx9 unles there is a simple way of specifying the stream source.

Or with dx11 the stream frequency is even defined in the vertex definition
Granyte
 
Posts: 846
Joined: Tue Jan 25, 2011 11:07 pm

Re: Hardware instancing patch... please can we get it in 1.8

Postby Nadro » Sat Nov 03, 2012 8:01 pm

I am not too much familiar with DX10, I prefer OGL, but I think that together we can prepare a good FVF system for both DX10+ and OGL3+ ;) After FVF will be merged with trunk (I hope that it will be soon after 1.8 release date), we'll add to them all required features.
Nadro
 
Posts: 1647
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Hardware instancing patch... please can we get it in 1.8

Postby FreeFrags » Fri Nov 30, 2012 1:21 pm

Any progress on merging FVF with the trunk? Following this thread closely :)
FreeFrags
 
Posts: 16
Joined: Thu Mar 25, 2010 2:04 pm

PreviousNext

Return to Open Discussion and Dev Announcements

Who is online

Users browsing this forum: No registered users and 1 guest