Code Monkey home page Code Monkey logo

mviewer's Introduction

MView File Viewer

This project consists of 2 scripts. extract_mview to extract files inside the mview archive and extract_model to convert the .dat files to .obj.

Also includes a Noesis plugin. (see below)

Example

File downloaded from ArtStation.

Result

Requirements

Usage

// extract mview archive
// python extract_mview.py <filename>
$ python extract_mview.py test_data/test_file1.mview
$ > thumbnail.jpg image/jpeg
$ > sky.dat image/derp
$ > mesh0.dat model/mset
$ > mesh1.dat model/mset
$ > mesh2.dat model/mset
$ > mesh3.dat model/mset
$ > mesh4.dat model/mset
$ > mesh5.dat model/mset
$ > mesh6.dat model/mset
$ > mat0_c.jpg image/jpeg
$ > mat0_r.jpg image/jpeg
$ > mat0_n.jpg image/jpeg
$ > mat0_a.jpg image/jpeg
$ > mat0_g.jpg image/jpeg
$ > mat0_s.jpg image/jpeg
$ > mat1_c.jpg image/jpeg
$ > mat1_n.jpg image/jpeg
$ > mat2_c.jpg image/jpeg
$ > mat3_c.jpg image/jpeg
$ > mat4_c.jpg image/jpeg
$ > mat4_a.jpg image/jpeg
$ > mat5_c.jpg image/jpeg
$ > mat5_a.jpg image/jpeg
$ > mat5_s.jpg image/jpeg
$ > mat6_c.jpg image/jpeg
$ > mat6_a.jpg image/jpeg
$ > scene.json.sig application/json
$ > scene.json application/json
$ > COMPLETED!!!

// convert dat files to obj (wavefront)
// python extract_model.py <folder_containing_scene.json>
$ python extract_model.py test_data/test_file1
$ > COMPLETED!!!

Viewer

You can download Noesis from here. Copy and paste the plugin to noesis/plugins/python/fmt_artstation_mview.py then just open the .mview files with Noesis.

Notes

To download an .mview file:

  1. Open url with 3D viewer in browser. (do not click play yet)
  2. Open Developer Tools and go to Network tab.
  3. Click the play button on the 3D viewer.
  4. Type or search for mview on the Developer Tools' Network tab.
  5. Right click on the file and select open in new tab. (will start download)

[FIXED] [BUG] There is currently no support for huge files that uses uint32 indices. Pull requests are welcome.

Community

mviewer's People

Contributors

gmsyrimis avatar maddthesane avatar majimboo avatar yurannnzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mviewer's Issues

Where does the generated obj get stored?

Maybe a silly question, but where's the final obj stored? I noticed I have an obj for each .dat file. I'm going to try and load each of them but it would be nice to have that included in the README.md

TypeError: unsupported operand type(s) for <<: 'str' and 'int'

Getting a failure running the batch file/extract_mview.py. If I try Noesis plugin, only half the model renders correctly, the rest is jumbled vertices. Python 3.6.1 on Windows 10.

Console output:
('thumbnail.jpg', 'image/jpeg')
Traceback (most recent call last):
File "C:\mviewer\extract_mview.py", line 117, in
main(sys.argv[1])
File "C:\mviewer\extract_mview.py", line 26, in main
data = decompress(data, e)
File "C:\mviewer\extract_mview.py", line 58, in decompress
p = (m << 4 | n >> 4) if r & 1 else ((m & 15) << 8 | n)
TypeError: unsupported operand type(s) for <<: 'str' and 'int'

Noesis bone renaming issue

Noesis sometimes gives this error:
WARNING: Duplicate bone names, overriding.
which causes Noesis to rename all the bones, which breaks all the animations. Please add an option to force Noesis to not rename bones!

only exports jpeg

/Volumes/Pennyworth1/do3d\ fileupdate/mviewer-1.0/extract_mview.py /Volumes/Pennyworth1/do3d\ fileupdate/mviewer-1.0/test_data/test_file1.mview
('thumbnail.jpg', 'image/jpeg')
Traceback (most recent call last):
File "/Volumes/Pennyworth1/do3d fileupdate/mviewer-1.0/extract_mview.py", line 117, in
main(sys.argv[1])
File "/Volumes/Pennyworth1/do3d fileupdate/mviewer-1.0/extract_mview.py", line 26, in main
data = decompress(data, e)
File "/Volumes/Pennyworth1/do3d fileupdate/mviewer-1.0/extract_mview.py", line 58, in decompress
p = (m << 4 | n >> 4) if r & 1 else ((m & 15) << 8 | n)
TypeError: unsupported operand type(s) for <<: 'str' and 'int'

I found a problem when exporting Artstation's model!

      When I import a complex model from Artstation, if the number of textures of this model must be larger than 6, then the textures and models will be lost in the software.
     When I saw your code, I found that the maximum number of textures you set was 6.
     Please tell me how to change it!

Windows Version error

running the windows batch, yields errors on line

118
26
58
125
8

it has something to do with scene.json as i see it

Instructions for non-programmers please?

This looks brilliant, but after downloading and installing Python I'm stumped.
running the script (.py) does nothing that I can see.
Could someone please write simple instructions for us non-programmers/developers?
Thanks!
Bob

Found solution for Gamebryo NIF 20.6.0.0

Version 4.425 of Noesis is unable to open some NIF files with version 20.6.0.0, raising exceptions like "Unreasonable texture list size" and "Unreasonable shader map list size".
After some experiments, I was able to partially fix this issue by preventing Noesis from attempting loading textures.
It's a first step, but also adding textures is important... Unfortunately I don't know anything about textures and NIF files, I was just lucky with this hack.

I attach the modified fmt_gamebryo_nif.py file

Noesis Python Error

When open a downloaded mview file, Noesis Python Error. ToT


Traceback (most recent call last):
File
".......\noesis\plugins\phython\fmt_artstation_mview.py", line 33, in loadModel
diffuse = loadTex(files, fdiffuse)
File
".......\noesis\plugins\phython\fmt_artstation_mview.py", line 217, in loadTex
tex.name = fname
AttributeError: 'NoneType' object has no attribute 'name'


Plugin exports incorrect texture filenames

This seems to be inconsistent behaviour.

When exporting to obj/fbx, the texture filenames are sometimes "scene_000.png", "scene_001.png" etc.

Try exporting and reopening within Noesis - sometimes the textures are preserved ("mat1_c", "mat1_r", "mat1_n" etc.) and all the textures are found/resolved on reopening. (test_file13-19 export properly).

Issues for starting from zero

Hello , I found this script to achive 3d assets from ArtStation, I found I can't make it work . Do you have any very basic guide or tutorial for starting?

Thanks in advance

Doesn't extract the gloss map

The tool doesn't extract the gloss map, it is sorely missed!
*The alpha map is also not being extracted.
Is there any chance that this will be fixed?

UV is not mapped properly

The UV maps needs to be adjusted for the model I've tested, the UV maps should be flipped along the Y axis (mirror on Y).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.