i'm not sure if this is the right section, but it is WIP and i hope it's about 50% done.

So what is it about?You may already know that i'm working on an own mesh viewer since the functions of the old one is really limited and there are functions i don't like or i miss.

What is the different to the old MeshViewer?I don't know what language was used for the old one, but i'm using C++ with OpenGL. The benefit of OpenGL is, that it can be used as game engine, so it's also possible to display render flags, such as bump maps or animations.

Wait, we can view all animations on every unit with this viewer??Actually it is possible to do this. But i will first concentrate on the basics. Display all mesh correctly.

How can i help?At the moment i'm working on the basics, but i plan to enable addon support. So you can write your own functions for this viewer. For example addon hex editing.

What is done, what need to be done?I learned about OpenGL and i already can read in tga files and the mesh file. But at the moment it's limited to triangulated mesh with only one model and texture.

I want to test this awesome project!I hosted the whole project on gitlab: https://git.rwth-aachen.de/carstenf/OpenGL/tree/masterThe 3D Viewer was just for testing OpenGL. If you know how to program you can need to import the MeshViewer Project. It's a Visual Studio 2015 Project.If you just want to test whether the project is running on your system or not, just download the release folder and run the exe.

If the viewer is not running on your system, please let me know the error message and your system information.

Any help or suggestions are always welcome.

EDITi wonder whether the OpenGL project works for you, since i worked on a different pc today and it didn't because there was only OpenGL 2.1 :-/

now you make a new emty qt project. Go to File>new. Choose other projects>empty qmake-projectand save it somewhere on your harddrive. I'll choose C:/Users/Anakin/workspace/ name your project QtMeshViewerand klick next until you are done.

================UPDATE================Place the .bat file atC:\Users\Anakin\workspace (remember your path here)run the exe with the parameter src the first time.Skip everything between the "===" lines=====================================

now you go back to Qt Creator, right klick on the project>add existing file (you need to do it multiple times) and choose:../QtMeshViewer/main.cpp../QtMeshViewer/Source/* (you can choose all of them at once)../QtMeshViewer/Header/*../QtMeshViewer/Form Files/*../QtMeshViewer/Resources/Resources.qrc

================UPDATE================to get the latest build just run the updater. No need to passsrc to it again. You can just double klick it.=====================================If you want to get the latest build, go to your console, browse your location and repeat the last commandgit pull origin master=====================================

If i add any new files you need to add them to the project like you did above

Last edited by Anakin on Sun Feb 05, 2017 9:57 am, edited 11 times in total.

Alright, so I'm trying it out and it seems to run fine, but is there a way to open a msh file yet? I've tried dragging and dropping one onto it (which I saw is on your to-do list) but it doesn't seem to do anything, so I assume not.

Ähm, no the user interaction isn't done yet. I'm still working on the import and display function. Need to figure out how to import cluster and their textures. Then I need to go trough the structure and apply the translation matrix of all parents as well. And then I can think of the user interaction. But if you name your mesh file multipleModTex and replace the one in the release folder you can try to display other mesh.

==EDIT==

you want it? you get it

I just updated the release folder. Now you can drag n drop files. I tested a few swbf2 assets but non worked for me. There seams to be lot of untriangulated things. And for now i only support triangulated mesh.

==UPDATE==

new features coming with the next release:- cluster support (textures are mixed for some reason),- nulls, bones, shadow mesh and hidden models are no longer displayed,- reset view when loading a new mesh,- reset view when pressing space- faster code (frame update is about 19,6% faster, loading mesh is about 15,1% faster, overall from beginning to the first draw about 8,6% faster )

==NEW VERSION==/carstenf/OpenGL/tree/master

Features:- reset view before loading new mesh- reset view when pressing space- clustered msh can be displayed- shadow mesh, nulls, bones, hidden things are no longer displayed- now mulitpolygons can be displayed- fasten and improved codeBugs:- cluster mixed up textures,- at most mesh only every 2nd triangle is displayed,- triangulation is not very good (DarthDUCK's Proton charge)

All right, here you go. It should be stable so far. Just ignore the first error message that says something about missing msh file.Simple drag and drop a file.Navigation: left mouse > rotationright mouse > movescroll > zoom+/- > fasten the movementspace > reset view

Thoughts for now:- Camera pivot point should be based on the center of the mesh's bounding box. Currently, it seems to be based on the mesh's center of geometry.- When the camera is panned around, its pivot point should move with it.- Application begins to lag when higher-poly meshes (>2,500 triangles) are loaded.- Models need lighting haha

You are right i'm using the scene center. But i just looked in the documentation about the bbox and i think, that's easy.About the lag when loading higher polys, i just changed the texture load function to only give pointer. But i noticed there is data garbage left when closing the software. It's not from my latest changes for the texture loading. So i need to figure out where the garbage is created and where to free it. Then i'll change the object loading itself to use pointer as often as possible too. That way i never need to copy data.

Can you explain the lags a bit? Does it crash, or is it slow? And is it only while loading or after loading, too??

Is there someone else, who needs the VS runtime enviroment?? Then i'll include it in the final version.

For now, here is a new release version. Give it a try! it should be much faster then the old version. Opening multiple files should not hurt the performance and even cloth is displayed. Not completely but it is displayed. Furthermore i added some features requested by Marth. For example everything is displayed in the FOV when opening.Full changelog:

Features:- performance improvement,- code improvement,- move the model to the center,- scale everything to 1,- do not open a default file for release buildBugs:- cloth is not displayed correctly,- turning in the wrong x direction when model is turned 180° in y direction,- consular class corvette is not displayed,- rep_weap_LJ-50 is not displayed correctly

For the next version(s) i'm gonna:- rework my data to improve the loading time and needed memory,- fix the x rotate direction when turning the model 180° in y direction,- fixing the cloth problem- adding some buttons to display some information- adding light,- bump/normal/specular map support,

I need to know what kind of information is interesting for you. (texture names?, triangle count?,...) Please let me know what you wanna know.Do you need a button to open a file? Or do you only need the drag/drop function?

It says my GPU doesn't support Open GL 4.5. (nVidia quadro nvs 4200m, win7 pro x64). I'll look around for driver updates, although I just installed one a few weeks ago.

For features, I use texture names and tri count a lot. Drag n drop is fine for input. I think it would be helpful to have the ability to toggle on/off hidden components like nulls, bones, shadowvolume, collision, etc. Maybe those could be flat shaded in different colors or something? For example, most of the nab2 buildings have collision that extends well above the visible mesh, and it would be cool to be able to see this in the viewer. And being able to quickly get the location of nulls for attaching effects would be extremely useful.

Another feature that may or may not be useful is a grid centered at 0,0,0 like in xsi. Idk how useful it would really be, but I just had the thought and figured I'd share it.

And i have good news. I'm gonna switch to Qt library and i hope i get this working with OpenGL ES 2.0. That way it should theoretically work even on your mobile phone

Just one question. I'm looking for an program icon. I thought of an Imperial Commando Helmet. Do you prefer the red or blue visor??displayed in my Mesh Viewer (but the red visor is rendered in XSI and photoshoped)

it's been a while since the last update. The reason for that is, i changed my library from glew to Qt. It's more powerful and allows much more window adjustments.So this new release does not feel much new to you since most new things are behind the scene in the source code.

Mainly there is one big problem. Some mesh are not displayed correctly. I don't know why. When i load them into XSI and reexport through ZETools everything is displayed correctly. I'm gonna search that bug and hopefully will fix it in the next release. The other problem is that Qt does not support RLE compressed tga files. So i'd like to ask you to use this new version and check if there are many assets with rle compressed tga files. You can fix it by simply open the tga and save without rle.If there are many rle conflicts i'll see if i can add the rle support again.

I'm not sure, but I think Battlefront also doesn't support RLE compressed .tga files, because if I you compress them you'll get an munge error. If that's right, you wouldn't need to add the rle support.

There were textures not working but i noticed that they were not compressed. I simply added my old texture load function if QImage cannot read it my old load will try

So and here you go the first full release version:Features:- status messages while import,- fixed triangulation,- rle and 24 bit image support (normally qt should support 24 bit, too),- rotation can be limit to the directions,- added fileinfo,- performance,Bugs:- nothing known

So since there won't be a new release so fast, i continue here in my WIP thread.

@Marth you are a nettler (i mean this in a friendly way ) and here you go:

Hidden/Spoiler:

Don't ask me why the wireframe does not work 100%. You can see the problem when you look at a cube:

Hidden/Spoiler:

If the paint function needs the vertice in a different storage i cannot promise that i'll keep this feature. What do you think about the Color? would you prefer solid black or the way it is (from the texture)

So what's new?- new icons,- screenshot function with transparent background- transparent materials are supported- wireframe paint option (not working very good - see the cube example)- basic information printed to the scene- new info window, that always stay on top, can be resized and has scroll area

==EDIT==

fixed wireframe bug

==TEASER==

just hardcoded atm. Need to be user controlled and some more specular (diffuse only atm)

Hidden/Spoiler:

good news @Marth. I think you'll get painted light But only after i made a settings window. Btw, what kind of light do you want?? Spot, candle, strait,..??