Most practical way for building/batching vertex/index data?

There is in XNA and IIRC there is a PR that started on the implementation, but the person that set up the PR got busy and never got back to it. Let me search for it :slight_smile:

= Pull Request from the Git Repository

There are beginners on here too, it does not help using Acronyms without first declaring them.

Here it is: [WIP] Mesh builder by mattiascibien Ā· Pull Request #4078 Ā· MonoGame/MonoGame Ā· GitHub

And the XNA docs: XNA Game Studio 4.0 Refresh | Microsoft Learn

Youā€™re right, sorry. Force of habit :stuck_out_tongue:

2 Likes

No worries, just helps create a resourceful environment when help is clear for new entrants :slight_smile: we cannot assume everybody is familiar with even what the meaning of Platforms is without them thinking it is a pair of shoes :stuck_out_tongue:

@Jjagg it is indeed exactly what I need :slight_smile:
How comes itā€™s not implemented? I thought Monogame was a 99% XNA implementation. Well the question now is whether I should try this unfinished PR.

So you really think beginners need to know what a PR is? :slight_smile:

@raizam try to picture if I told you to draw a car, without describing it or using the word CAR, :slight_smile:

1 Like

Exactly, itā€™s not completely finished :stuck_out_tongue: Another thing I know is missing is the Microphone class

1 Like

I fail to see the analogy here

Because you are no longer able to see things from a beginners perspective, that is why :slight_smile:

http://www.pinvoke.net/default.aspx/winmm/waveInOpen.html

Maybe people can use this on Windows if theyā€™d like for now, but for the implementation in the core the audio frameworks we have in place should be used. XAudio2 for WinDX, OpenAL for GL platforms, MediaRecorder for Android, AVAudioRecorder for iOSā€¦ I think the implementations are pretty straightforward. Itā€™s just that no one has taken the time to implement it yet.

@Jjagg If there was a guide to assist with implementation, it might actually happen, I found this an issue with my previous ā€˜platformā€™ toolset too, a lot of talk about using DLLs but there was never a solid guide or explanation, this resulted in the authors ending the platform too [Not because of the lack of documentation but it would have helped create more things if only they bothered making Modding easierā€¦]

I have no idea what is involved with making MonoGame work, even if I had the skills to actually develop itā€¦ without a guide, only a select few can contributeā€¦ this is true of any projectā€¦

I guess we both agree on this :slight_smile:

EDIT

Hate this reply systemā€¦ the Reply to post button should just be removedā€¦

Letā€™s get back on topic please:
I need a MeshBuilder, you need a MeshBuilder, he needs a MeshBuilder, we need a MeshBuilder, they need a MeshBuilder :smile_cat:

I was full of hope when I discovered this butā€¦ out of luck

2 Likes

@raizam did the model mesh part collection link earlier not help at all?

:sweat_smile:
I need a class that allows me to create multiple sub-meshes, declared using a AddSubMesh, and AddTriangle() method, when done it compiles a single Vertex/IndexBuffer, without duplicates, and returns a collection of MeshModelPart all pointing to the same Vertex/Index buffer.

not sure i could be clear =)

@raizam what you need is a model creation tool :stuck_out_tongue:

But Yeah I can see what you need, hope you find a solutionā€¦

1 Like

The XNA implementation isnā€™t what Iā€™m really looking for, as it returns a MeshContent while Iā€™m looking for ModelMeshPart.

But now Iā€™m discovering the MeshContent class, and itā€™s puzzling me, as it doesnā€™t seem to use ModelMeshPart.
MeshContent looks weird to me, as it seems more like some sort of ā€˜SceneGraphNodeā€™ coupled with mesh data.
Anyone knows the history of this? it looks inconsistent with the ModelMesh approach.

The *Content classes represent data in an intermediate, design-time format in the Content Pipeline. I donā€™t think any are used at runtime.

MeshContent is used to build ModelMeshContent which ā€œStores design-time data for a ModelMesh assetā€. ModelMeshContent has the MeshParts property, this is a basically just a collection of ModelMeshPartContent. ModelMeshPartContent in turn ā€œStores design-time data for a ModelMeshPart assetā€.

Itā€™s not completely clear from the documentation, but I think the MeshParts get populated when ModelMeshContent is created. The docs say that the ModeMeshContent property SourceMesh (of type MeshContent) is the ā€œMeshContent source object used when creating this classā€. That seems to imply itā€™s used to build the class but does not contain essential data after that. So my guess is the data in there is put in the MeshParts. Iā€™m not sure if I got all that right, but thatā€™s how I interpreted the docs.

1 Like

This completely makes sense.
Hence MeshBuilder is not what Iā€™m looking for.
Hence Iā€™m writing my own, itā€™s really not that hard.

My last question: Is there a mechanism to check Vector3s equality with close approximation?
Once I have that I think Iā€™ll be all set :slight_smile:

Good luck!

Not built in. Youā€™ll have to implement it.

just got a good solution from the Unity community.

Ok, thank you all for your help, it was a productive day, good night :smile_cat:

1 Like