Foros - Stratos

Proyectos => Jad Engine => Mensaje iniciado por: plonkman en 07 de Junio de 2006, 08:08:22 PM

Título: Geometry instancing.
Publicado por: plonkman en 07 de Junio de 2006, 08:08:22 PM
Hi guys, sorry for lack of Spanish.

I was wondering, does MotorC# support geometry instancing? I.e. loading a mesh once and displaying in multiple position / orientations.

P.S. Vicente

How goes the task of releasing the source code?

Thanks,

Tony.
Título: Geometry instancing.
Publicado por: Haddd en 08 de Junio de 2006, 08:06:47 AM
Sorry it does not support it because the lack of this feature on some graphic cards.
Título: Ok thanks Haddd
Publicado por: plonkman en 08 de Junio de 2006, 10:27:56 AM
Thanks, no problem.

I wasn`t too bothered about HW instancing, just wanted to save some memory overhead for meshes.

I`ll work around at the moment and maybe submit a patch if / when the source becomes available.

Cheers,

Tony.
Título: Geometry instancing.
Publicado por: Vicente en 08 de Junio de 2006, 10:31:48 AM
Hey plonkman,

the work about the source code is going pretty well to be truth :) I´m pretty busy with my doctorate, but I work on the code on the weekends.

Expect some news about the source code pretty soon :)

Greetings!

Vicente
Título: Great!
Publicado por: plonkman en 08 de Junio de 2006, 12:49:02 PM
That`s great Vicente, thanks mate.

Haddd: Just thinking out loud :)

Does the engine just load a mesh once for similar objects?

Then the only overhead for identical (mesh) objects is the Position / orientation (NODE?) part.

Cheers guys,

Tony.

:D
Título: Geometry instancing.
Publicado por: zupervaca en 08 de Junio de 2006, 02:19:48 PM
Puedes emular el instancing creando un vertexbuffer e indexbuffer con la malla repetida un numero de veces, despues le pasas al shader un array de constantes con las transformaciones, tan solo queda indicarle al drawindexedprimitive el numero de modelos que quieres renderizar, se pierde memoria en la tarjeta grafica, pero se gana una burrada de velocidad, no obstante tambien puedes ordenar el render de los modelos por el material y ganaras algo de velocidad tambien.
Se me olvidaba si no quieres usar shaders tendrias que andar bloqueando y desbloqueando el vertexbuffer.

PD: Me cuesto mucho curro pasarlo a ingles asi que si alguien ta por la labor que lo haga y si no da igual.
Título: Geometry instancing.
Publicado por: plonkman en 08 de Junio de 2006, 03:03:26 PM
Yeah, interesting point! Thanks for that. :D

It`s not really important for the moment, I just wondered whether I was missing something in the engine.

I think I`ll just work around it, just now until the source is released and then I`ll have a closer look at different methods for this.

Cheers,

Tony.

:)