Menu

MPV Help

Help
2022-02-23
2022-03-09
  • Daniel Carter

    Daniel Carter - 2022-02-23

    I am very new to using the MPV with HEMU3.3. I've gotten the MPV to connect to HEMU, however there seems to be an issue when it comes to rendering anything other than a black and white screen. According to CMD it appears to be having an issue loading the database for St.Louise. please advise as the MPV wiki is currently down.

     
  • C. Schroeder

    C. Schroeder - 2022-02-26

    There appear to be two issues here: the TIFF plug-in is not being found and the terrain data is not being found. Which operating system are you running this on?

    The sample St. Louis terrain data must be downloaded and installed separately. Have you done this? If so, the terrain config file will need to be updated to point to it.

     
    • Daniel Carter

      Daniel Carter - 2022-02-28

      I managed to get the terrain to render after configuring the .def files for the terrain, however whenever I try to spawn in entities such as 118(f18c) I've got nothing, the view is properly attached to the entity and I don't use entity id 0 as I understand that is meant more as a floating camera. I have attempted to change the cameras offset so that the viewmodel might be visible with no success. I've also spawned separate entities in hopes that I would be able to see the separate entities. Entity alphas have also been set to 250.

       

      Last edit: Daniel Carter 2022-02-28
  • C. Schroeder

    C. Schroeder - 2022-03-05

    Actually, entity ID 0 is classically associated with the Ownship entity, which may or may not have a 3D model attached to the entity - it depends on your use case, but it is not a requirement. You are free to allocate entity IDs as you see fit for your application.

    Just in case alpha is an issue, I would try setting alpha to 255 for debugging.

    I confess it has been a while since I last used MPV and I don't have a current setup to look at right now. Which platform are you using for MPV: Windows or Linux?

     
    • Daniel Carter

      Daniel Carter - 2022-03-07

      I am running Windows

       
  • C. Schroeder

    C. Schroeder - 2022-03-08

    OK, I will need to setup a test environment so I can look at this with you.

     
  • C. Schroeder

    C. Schroeder - 2022-03-09

    OK, to get MPV minimally operational on Windows, I downloaded:
    HostEmulator_Win32_v3.3.3.zip
    mpv_content_2006-01-11.zip
    mpv-2.2.0-win32.zip

    I unpacked all of them to my C:\Temp directory:
    C:\Temp\HostEmulator_Win32_v3.3.3
    C:\Temp\mpv_content_2006-01-11
    C:\Temp\mpv-2.2.0-win32

    I changed my C:\Temp\mpv-2.2.0-win32\config\system.def file to use:

    system
    {
        // The IP address of the host.
        host_addr = "127.0.0.1";
    
        // The port that the host will be listening on.
        host_port = 8001;
    
        // The port that this program should listen on 
        // (the host should send messages *TO* this port).
        listen_port = 8000;
    

    I configured HEMU3 to use the same IP and ports.

    As currently distributed, all MPV definition files for terrain and model assets assume installation in /opt on a Linux filesystem. I updated one line of C:\Temp\mpv-2.2.0-win32\config\entities.def to correctly point to the F-18C model on Windows:

    entity
    {
        name = "f18c";
        type_id = 118;
    
        // This is an example of a model file element, with some switchable 
        // components
        element
        {
            element_type = model_file;
            filename = "C:\Temp\mpv_content_2006-01-11\models\Delta3D_Asset_Library\vehicles\air\f18c_hornet_navy\1103021162_f18c_hornet_navy.flt";
    

    I updated one line of C:\Temp\mpv-2.2.0-win32\config\databaseinfo.def to point to the St Louis terrain:

    databases
    {
    
        // these values correspond to the database distributed in the 
        // mpv content archive, available through the CIGI sourceforge site
        database
        {
            name = "St. Louis";
            id = 1;
            directory = "C:\Temp\mpv_content_2006-01-11\terrain\StLouis_5m_512\";
    

    I started MPV & HEMU3 and then added the f18c entity type to the scene. Next, I switched to the Views tab in HEMU3 and changed the camera position offset to:
    X Offset: -20.0
    Z Offset: -2.0

    This provides a view behind & above the F-18C model.

    While there are errors in the MPV shell, I get a minimal scene rendered (see attachment).

    Hope this helps,

    Curt

    P.S. Should we be providing a full, stable MPV config for both Windows & Linux? Absolutely, something that is long overdue. Do we need to fix and/or populate our Wiki pages? Absolutely, again long overdue.

     

    Last edit: C. Schroeder 2022-03-09
  • C. Schroeder

    C. Schroeder - 2022-03-09

    Updating the paths in config\sky.def will get the skydome working correctly.

     
  • Daniel Carter

    Daniel Carter - 2022-03-09

    Funny enough, I attempted that solution on my first Install of the Hemu and MPV, but It works just fine with a fresh install.

    Thank you very much.

     

Log in to post a comment.