Class ModelProcessor
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
Processes a game asset mesh to a model content that is optimal for runtime.
[ContentProcessor(DisplayName = "Model - MonoGame")]
public class ModelProcessor : ContentProcessor<NodeContent, ModelContent>, IContentProcessor
- Inheritance
-
ModelProcessor
- Implements
- Inherited Members
Constructors
ModelProcessor()
Initializes a new instance of ModelProcessor.
public ModelProcessor()
Properties
ColorKeyColor
Gets or Sets the background color used for transparency
public virtual Color ColorKeyColor { get; set; }
Property Value
ColorKeyEnabled
Gets or Sets a value that indicates whether colors identified by the ColorKeyColor will be marked as transparent (Alpha 0). The default value is false.
public virtual bool ColorKeyEnabled { get; set; }
Property Value
DefaultEffect
Gets or Sets the default effect class to apply to this model. The default value is BasicEffect
public virtual MaterialProcessorDefaultEffect DefaultEffect { get; set; }
Property Value
GenerateMipmaps
Gets or Sets a value that indicates whether this will generate MipMpas for the selected texture. The default value is false.
public virtual bool GenerateMipmaps { get; set; }
Property Value
GenerateTangentFrames
Gets or Sets a value that indicates whether model tangents should be generated for use in Normal Mapping. The default value is false.
public virtual bool GenerateTangentFrames { get; set; }
Property Value
PremultiplyTextureAlpha
Gets or Sets a value that indicates whether the selected texture will be treated as an Alpha Mask. The default value is true.
public virtual bool PremultiplyTextureAlpha { get; set; }
Property Value
PremultiplyVertexColors
Gets or Sets a value that indicates whether the selected texture will be treated as an Vertex Color Mask. The default value is true.
public virtual bool PremultiplyVertexColors { get; set; }
Property Value
ResizeTexturesToPowerOfTwo
Gets or Sets a value that indicates if the model texture(s) dimensions should be resized to the next largest power of 2 size. (e.g. 128x128 or 512x512). The default value is false.
public virtual bool ResizeTexturesToPowerOfTwo { get; set; }
Property Value
RotationX
Gets or Sets the default model x-axis rotation number, in degrees of rotation. The default value is 0.0f.
public virtual float RotationX { get; set; }
Property Value
RotationY
Gets or Sets the default model y-axis rotation number, in degrees of rotation. The default value is 0.0f.
public virtual float RotationY { get; set; }
Property Value
RotationZ
Gets or Sets the default model z-axis rotation number, in degrees of rotation. The default value is 0.0f.
public virtual float RotationZ { get; set; }
Property Value
Scale
Gets or Sets the default model scale. The default value is 1.0f.
public virtual float Scale { get; set; }
Property Value
SwapWindingOrder
Gets or Sets a value indicating whether the winding order is swapped. This is useful for models that appear to be drawn inside out. The default value is false.
public virtual bool SwapWindingOrder { get; set; }
Property Value
TextureFormat
Gets or Sets the format of the texture to process (e.g. raw color, DXT). The default value is compressed.
public virtual TextureProcessorOutputFormat TextureFormat { get; set; }
Property Value
Methods
ConvertMaterial(MaterialContent, ContentProcessorContext)
protected virtual MaterialContent ConvertMaterial(MaterialContent material, ContentProcessorContext context)
Parameters
material
MaterialContentcontext
ContentProcessorContext
Returns
Process(NodeContent, ContentProcessorContext)
Converts mesh content to model content.
The root node content. Context for the specified processor.public override ModelContent Process(NodeContent input, ContentProcessorContext context)
Parameters
input
NodeContentcontext
ContentProcessorContext
Returns
- ModelContent
The model content.
ProcessGeometryUsingMaterial(MaterialContent, IEnumerable<GeometryContent>, ContentProcessorContext)
protected virtual void ProcessGeometryUsingMaterial(MaterialContent material, IEnumerable<GeometryContent> geometryCollection, ContentProcessorContext context)
Parameters
material
MaterialContentgeometryCollection
IEnumerable<GeometryContent>context
ContentProcessorContext
ProcessVertexChannel(GeometryContent, int, ContentProcessorContext)
protected virtual void ProcessVertexChannel(GeometryContent geometry, int vertexChannelIndex, ContentProcessorContext context)
Parameters
geometry
GeometryContentvertexChannelIndex
intcontext
ContentProcessorContext