bzt 7e9d813f79 WIP web viewer | 1 anno fa | |
---|---|---|
.. | ||
Makefile | 5 anni fa | |
README.md | 1 anno fa | |
font6.h | 5 anni fa | |
glfw.c | 1 anno fa | |
glut.c | 1 anno fa | |
sdl.c | 1 anno fa | |
viewer.c | 1 anno fa | |
viewer.c.md | 5 anni fa | |
viewer.h | 1 anno fa |
A very very simple viewer for Model 3D files.
Main purpose: quickly check a model. It does not support all features and material properties of a M3D file, only vertex colors and basic properties and textures in materials. But it can load complex models, uses lights (so you can check normals), and shows action animations frame timestamp correctly.
Model 3D Viewer by bzt Copyright (C) 2019 MIT license
./m3dview <m3d file>
Just run make
, it will autodetect if you have GLFW, GLUT or SDL2 installed, and uses the appropriate library. GLFW is
preferred and recommended as that's the simplest and most portable. The platform independent part is in viewer.c
, the other
.c
files are the framework drivers. To override the autodetected one, use DRIVER="MINGW_GLUT" make
for example.
You'll need a couple of tools, here's a step-by-step how to:
make
Possible issues: with some configuration, gcc was unable to find gl.h. To solve this, you have to copy the C:\MinGW\include\GL folder into msys\1.0\include (whereever your msys directory is). You should also have C:\Windows\System32\opengl32.dll, but that's all.
On Windows, if command line argument is not specified, the viewer will fire up an Open File dialog.
Keybinding | Description |
---|---|
mouse left | drag the model, move the mouse to rotate |
mouse middle | zoom in |
mouse right | zoom out |
mouse scroll | zoom in / out |
up/down | move plane up and down |
left/right | rotate the model |
page up/page down | change action to animate |
0 - 9 | change playback FPS (should not needed, for debug) |
, / . | previous / next frame (without time interpolation) |
space | toggle continous playback (with interpolation) |
m | toggle drawing mesh |
s | toggle drawing skeleton |
Esc, q | quit |
Note that there's an explicit "action animation" for the bind-pose. By pressing Page Down, you can always select it and see the pure model without any animations.