Forum

Building a mesh from a spread of other meshes

I’m trying to take a mesh, transform it, then rebuild that as a new mesh that can be written out as an xfile.

Am having trouble, I think with the indices. Anyone wanna have a look at the attached patch?

cheers

spreaded mesh writer.zip (5.2 kB)

aw it’s hardly possible
you have to write x per subset, writer is not spreadable

I’m not trying to make a mesh with subsets. I want 1 joined mesh

you need to add the vertex count to the indices per mesh slice, otherwise you are using the same vertices over and over again:

spreaded mesh writer.v4p (19.4 kB)

Hey Tonfilm, with your wonderful knowledge of The Matrix can you please explain to us how to go about patching the transformed normals?

Wikipedia says “use the inverse transpose of the linear transformation”.

Was trying just now but could not quite get there…

MeshWriterNormals.v4p (37.4 kB)

Ah thanks Tonfilm - of course, I was just making more triangles where the 1st cube was.

Bump
anyone knows this normals transformation thing?

interesting one, there are two ways to do it. see patch:

MeshWriterNormals.v4p (43.0 kB)

Ahh that’s perfect. Thanks! I’m glad I asked, don’t think would have come to that myself. That’s a handy trick for comparing the two results too.

Hello digging out this old thread, because i have a question related to it…

Everything is working fine, but how is it when the Texture input of the shader should be Spreadable?
So normally if a mesh (e.g. Grid) is spreaded by transforming it and a spread of textures is applied to it the textures spread across the count of grids.

But with this module the textures are just overlayed…
i dont see how to solve it…
Someone?

Cheers

MeshWriterNormalsSpreadedTex.v4p (45.5 kB)

when you apply the spread of textures
texture goes per subset, but you have only one subset after writer, or you have to write every grid on separate xfile

If you really need subsets you are better off to go with a custom *.obj writer. I guess *.x format supports them too but the writer node does not.

In the text of an obj you can use an ‘o’ to designate objects (subsets)

o objectA
Mesh data…

o objectB
Mesh Data…

So then it is just up to you as to how you want to distribute these, eg subset per transform, filter by an attribute etc