Spread meshes

if i load an xfile with multiple meshes and connect it to eg a constant effect, i can access all meshes individually, eg give every mesh a different position.

can i achieve something similar with built in geometries, like sphere and box; using just one effect/shader node? looking for something like cons (ex9.geometry)…

see attached patched for the example with xfiles and multiple meshes.

thanks!

m_tree8.rar (318.5 kB)

i remember that our fellow @dottore once did a massive patch which did exactly this.

but i would recommend you to group as many instances of the shader as you have meshes. i assume a better performance this way.

hmmm okay, thanks for the info :)

assuming using one shader for 2 meshes would work, would you say it’s generally a better idea to use multiple shaders or only compared to using dottore’s workaround? just for my understanding…

cheers

IMHO it is better to do this on the GPU than on CPU.
depending on the count of vertices and indices the calculation may cause some load.

ok, you may do the calculation only on startup.
or you use 3rd party software to combine both meshes to a new .x file.

hi,

I’m also very interested in this topic - are there any examples on how to do the transformation on the gpu? I know there is a Shader Transform FX floating around but I don’t really get the point how to implement that into a shader (sorry I’m a shader nooobb :)

thanks!