Model Content Pipeline Groups Inquiry

I have a model that uses “single texture” and the model consist of 37 mesh groups created by the modeler for whatever his reason, once loaded using content pipeline I draw the model by iterating the mesh groups.

Is there a way or tweak for the content pipeline to load the model as a single group or programmatically join all groups as “one” because it only uses a “single texture”, with that it only needs to draw in one swooop?

I need this information badly :cry:

How is the model constructed in the modelling tool you use? Is it built from subobjects?

1 Like

is it a problem right now?

I’m not sure about the default Monogame shader, it’s possible they cache the shader anyways. This may sound very advanced, but actually you could call the shader yourself and only pass the parameters once at the beginning of all meshes.

Otherwise I guess you can join the index and vertex buffers and draw it as one mesh, but I doubt that’s really worth it unless you draw thousands of instances.

1 Like

Hey Guys Sir Konaju and Kosmo,

Cool thanks peeps for the fast reply! the reason I need this information badly, two of my friend are using MonoGame they are “non-english speaking” we have different projects and their using content pipeline to load their model and their telling me their project is slowing down due rendering multiple groups even using a single texture asking me for a work around:

Two things I can tell them base on your answers guys:

[From Sir Konaju ]

  • Tell your modeler to group it as one before compiling
    leaving the original model untouched.

( This will be a problem if hey bought the model and don’t want to mess it or they don’t have an idea how the model was constructed )

[From Sir Kosmo]
*Or you have to work on your shaders pass the parameters once at the
beginning of all meshes.

( this will be also a problem if their not familiar working on a shaders, and since the model property mostly is read only they cannot alter it )

But thanks guys ^ _ ^ y I’m a courier :smile:

EDIT PS: I will try to generate their problem my self and ask help here if arises…

The question is if the model has multiple groups, how does it render internally ? by group also ?
is there a way for content pipeline load this as a single group ?

E:g : A simple ship model with 35 groups ? will this be render per group or as a whole internally ?
if using Model.Draw( … , … , … );