List of .mdf Configuration Options

List of parameters configurable in .mdf #

How it works #

  • MMDAgent-EX launches content by specifying a .mdf file
    • The .mdf file is located in the top directory of the content.
  • The .mdf file is a text file.
    • It specifies runtime parameters for MMDAgent-EX.
  • MMDAgent-EX.mdf in the same directory as the MMDAgent-EX executable is the system configuration
    • It is read first on every startup
    • If settings overlap with the content’s .mdf, the content-side settings take precedence
  • You can import arbitrary environment variable values by writing them like %ENV{NAME}.

Notes #

  • In the list below, values are generally the default values.
  • For 3D space coordinates, you can roughly assume 1.0 ≈ 8 cm (MMD scale).

Configuration items #

Input/Output #

Specify a file path to record all logs to the specified file. Default is empty (on Linux/Mac logs go to stdout; on Windows nothing is output).

log_file=

Set whether to exchange messages via standard input/output. Default is false. If set to true, messages are output to stdout and inputs from stdin are accepted as messages. When this is true, logs are no longer written to stdout, so specify a file in log_file if you want to keep a log.

use_stdinout=false

Plugins #

Enable or disable plugins.

disablePlugin=ALL
enablePlugin=Audio,VIManager

The right-hand value can be the following strings:

  • ALL : matches all plugins
  • NONE : matches none
  • Plugin name: Specify the name portion xxxx of Plugin_xxxx.dll or Plugin_xxxx.so under the Plugins directory. In the example above, only Plugin_Audio.dll (or .so) and Plugin_VIManager.dll (or .so) are enabled. Use commas to separate multiple names.

Evaluation is done in the order enablePlugindisablePlugin. The order of lines in the .mdf file does not matter.

Example 1: Enable only plugins A, B, C and disable the rest:

enablePlugin=A,B,C
disablePlugin=ALL

Example 2: Disable plugins D, E and enable the rest:

disablePlugin=D,E

Note: The old format below (specifying disabled plugins one by one) is also supported:

exclude_Plugin_Audio=yes

Network #

Note: Effective when using Plugin_Remote.

Note: In this section the values are sample values, not defaults.

Using a WebSocket server #

Specify the WebSocket host, port, and path.

Plugin_Remote_Websocket_Host=localhost
Plugin_Remote_Websocket_Port=9000
Plugin_Remote_Websocket_Directory=/chat

TCP/IP Server #

As a TCP/IP client connecting to a server:

Plugin_Remote_EnableClient=true
Plugin_Remote_Hostname=localhost
Plugin_Remote_Port=50001

As a TCP/IP server:

Plugin_Remote_EnableServer=true
Plugin_Remote_ListenPort=50001

Common settings #

Specify the number of automatic retry attempts on connection failure (default is 0).

Plugin_Remote_RetryCount=60

Audio playback (SPEAK_START) (v1.0.4) #

Use pre-v1.0.4 synchronous guaranteed 16 kHz conversion playback for SPEAK_START. If unspecified or false, the higher-quality playback introduced in v1.0.4+ is used.

Plugin_Remote_Speak_16k=true

Display #

Initial window size (width,height)

window_size=600,600

Start in fullscreen (can be toggled after startup with the F key)

full_screen=false

Show operation status in the top-left on startup (toggle with S after startup)

show_fps=true

(Windows) Enable or disable a transparent window. When true, the window is transparent. Clicks on transparent areas pass through to underlying applications.

By default color-based transparency is used. During rendering a special “transparent color” is set as the background canvas color, and pixels that match that color become transparent. The default transparent color is green (0.0,1.0,0.0), which can be changed with transparent_color.

If you set transparent_pixmap to true, a slower but higher-quality pixmap-based transparency method is used. The alpha channel of the rendered pixmap is used directly as the window transparency. This always produces more natural transparency than the color-based method, but is slower and can significantly reduce frame rates, especially on large screens.

Note that the stage background image is not drawn while transparency is enabled.

transparent_window=false

(Windows) Specify/change the transparent color used for color-based transparency. Default is green (0.0,1.0,0.0).

transparent_color=0.0,1.0,0.0

(Windows) Enable pixmap-based transparency instead of color-based. When transparent_pixmap is true, a slower but more accurate pixmap-based transparency is used. The alpha channel of the rendered pixmap is used directly for window transparency. This produces better visual quality than color-based transparency but is slower and can reduce frame rate on large screens.

transparent_pixmap=false

3-D Models #

Maximum number of models displayed at once. Minimum 1, maximum 1024.

max_num_model=10

Toon edge width (changeable after startup with K, Shift+K)

bold edge thin edge

cartoon_edge_width=0.35

Turn off the feature that adjusts toon edges to the light direction (v1.0.5+), to revert to MMD compatibility.

light_edge=false

Number of parallel threads used for skinning. Default 1 is fine in most cases, but for very large models with many vertices you can set 2 or 4. This can also be changed later via messages.

parallel_skinning_numthreads=1

Camera #

Initial camera parameters. From top: position, rotation (degrees), camera distance, field of view (degrees).

camera_transition=0.0,13.0,0.0
camera_rotation=0.0,0.0,0.0
camera_distance=100.0
camera_fovy=16.0

CG Rendering #

Antialiasing (MSAA) level. Higher values smooth lines but increase load. Set 0 to disable. Maximum supported value is 32.

max_multi_sampling=4

Size of the background and floor images in 3D space. Parameters (x,y,z) mean x = half-width, y = floor depth, z = background height.

stage image

stage_size=25.0,25.0,40.0

Canvas color (space background color) (R,G,B)

campus_color=0.0,0.0,0.2

Light direction (x,y,z,w), intensity (0.0–1.0), color (R,G,B). Direction and color can be changed via messages at runtime.

light_direction=0.5,1.0,0.5,0.0
light_intensity=0.6
light_color=1.0,1.0,1.0

Diffusion postfilter: enable with diffusion_postfilter=true

Note: Windows and Linux only — not available on macOS

diffusion_postfilter=false
diffusion_postfilter_intensity=0.6
diffusion_postfilter_scale=1.0

Shadows #

Initial shadow display setting at startup (toggle with Shift+S after startup)

use_shadow=true

Enable shadow mapping at startup (toggle with X after startup)

use_shadow_mapping=false

Doppel Shadow effect on/off (default OFF) and parameters

doppel_shadow

# turn on doppel shadow
doppel_shadow=true

# color of double shadow
doppel_shadow_color=r,g,b

# offset of double shadow
doppel_shadow_offset=x,y,z

# density of the shadow (default is 0.5)
shadow_density=0.5

Physics #

Simulation resolution (fps) for physics. Allowed values: 30, 60, 120. Lower values reduce processing load but may cause rigid bodies to pass through each other more easily.

bullet_fps=120

External control #

Switch lipsync during external control from remote audio to microphone input (specify yes to enable)

Plugin_Remote_EnableLocalLipsync=no

If the above is yes, setting the following to yes will pass microphone input through to audio output

Plugin_Remote_EnableLocalPassthrough=no

Record lipsync audio per utterance into the specified directory. You can set a recording time limit in minutes (default: 120 minutes)

Plugin_Remote_Record_Wave_Dir=directory
Plugin_Remote_Record_Wave_Limit=120

Maximum duration (minutes) when saving motion via the MOTIONCAPTURE_START message

motion_capture_max_minutes=10

Speech Recognition #

Plugin_Julius_conf, Plugin_Julius_lang

Names for the speech recognition engine configuration and language.

There is no default. Prepare models and specify a valid combination in the .mdf to enable Plugin_Julius.

Combinations supported by the default models:

  • dnn, ja
  • dnn, en
  • gmm, ja
Plugin_Julius_conf=dnn
Plugin_Julius_lang=en

Plugin_Julius_wordspacing

Specify whether to separate words in recognition output.

  • no: Do not insert anything between words (default for ja)
  • yes: Insert spaces between words (default for languages other than ja)
  • comma: Insert commas between words (compatible with older MMDAgent)
Plugin_Julius_wordspacing=yes

Plugin_Julius_logfile

Output the Julius engine internal log to a file.

Plugin_Julius_logfile=log.txt

show_caption

Show captions. The left side of the screen displays speech recognition results, and the right side displays synthesized speech content (text provided with SYNTH_START).

show_caption=true

Other adjustments #

HTTP Server #

Disable the HTTP server feature (default: enabled)

http_server=false

Change the port number (default: 50000)

http_server_port=50000

Rendering #

Use cartoon rendering

use_cartoon_rendering=true

Use MMD-compatible coloring

use_mmd_like_cartoon=true

Edge color for the selected model (R,G,B,A — values 0.0–1.0)

cartoon_edge_selected_color=1.0,0.0,0.0,1.0

Whether to insert a floor plane at y = 0 for physics.

bullet_floor=true

Gravity factor

test
gravity_factor=10.0

Duration (seconds) to display the model’s internal comment at load. Set 0 to disable.

display_comment_time=0

Shadow mapping texture size (per side)

shadow_mapping_texture_size=1024

Shadow density cast onto models during shadow mapping

shadow_mapping_self_density=1.0

Shadow density cast onto the floor during shadow mapping

shadow_mapping_floor_density=0.5

Shadow mapping rendering order: true for light→dark, false for dark→light

shadow_mapping_light_first=true

Display #

Show defined buttons on screen at startup (toggle with Q after startup)

show_button=true

Simple log display settings (size, position, scale)

log_size=80,30
log_position=-17.5,3.0,-20.0
log_scale=1.0

Fine-tune motion playback timing (seconds, max 10.0)

motion_adjust_time=0.0

Playback priority for lip motion generated by automatic lipsync

lipsync_priority=100.0

User interface #

Adjust sensitivity for key/mouse operations: camera rotation, camera translation, distance, field of view

rotate_step=4.5
translate_step=0.5
distance_step=4.0
fovy_step=1.0

Step multiplier when changing edge width with the K / Shift+K keys

cartoon_edge_step=1.2