2019-03-07 10:23:54 -08:00
|
|
|
# b3view
|
2019-03-10 21:28:29 -07:00
|
|
|
("Be View")
|
2019-03-09 13:06:09 -08:00
|
|
|
Press 't' for Minetest ../textures with this (poikilos') forked model
|
2019-03-10 06:55:31 -07:00
|
|
|
viewer for B3D, X, OBJ, MS3D, 3DS (or any supported by Irrlicht).
|
2019-03-09 12:54:49 -08:00
|
|
|
|
2019-03-09 12:51:28 -08:00
|
|
|
![screenshot with gull from poikilos mobs_sky fork](https://github.com/poikilos/b3view/raw/master/screenshot.jpg)
|
2019-03-09 12:54:49 -08:00
|
|
|
|
2019-03-09 13:44:20 -08:00
|
|
|
bird: [github.com/poikilos/mobs_sky](https://github.com/poikilos/mobs_sky)
|
|
|
|
|
2019-03-09 09:47:08 -08:00
|
|
|
Website: [poikilos.org](https://poikilos.org)
|
2019-03-07 10:23:54 -08:00
|
|
|
|
2019-03-09 09:47:08 -08:00
|
|
|
## Main Features in poikilos fork
|
2019-04-08 19:52:18 -07:00
|
|
|
* stabilized (makes sure font, model or texture loads before using;
|
|
|
|
makes sure model is loaded before setting View options)
|
2019-03-09 13:06:09 -08:00
|
|
|
* modernized includes (`#include` statements specify "irrlicht"
|
|
|
|
directory instead of assuming it)
|
|
|
|
* double-click after you associate this program with the file types
|
|
|
|
(**mime types** are installed by install.sh to allow this on GNU+Linux
|
|
|
|
Systems--see Compile and Install)
|
2019-03-09 09:47:08 -08:00
|
|
|
* hotkeys to cycle through textures and reload model OR texture
|
|
|
|
(see [Usage](#Usage) below).
|
|
|
|
* see also CHANGELOG.md
|
2019-05-17 05:07:39 -07:00
|
|
|
* export feature: COLLADA (non-Blender), IRR (Irrlicht Scene settings
|
|
|
|
and mesh file paths only), IRRMESH (Static Irrlicht Mesh), OBJ
|
|
|
|
(Wavefront), STL (stereolithography)
|
2019-03-09 09:47:08 -08:00
|
|
|
|
|
|
|
## Compile
|
2019-03-09 10:36:48 -08:00
|
|
|
(the original version of this section is from
|
|
|
|
<https://code.google.com/archive/p/b3view/wikis/BuildingFromSource.wiki>)
|
|
|
|
|
2019-03-09 13:06:09 -08:00
|
|
|
### Prerequisites
|
|
|
|
* C++ Compiler (Linux: gcc [C++14], icc; Windows: the project file is
|
|
|
|
from Visual Studio 2010, but C++14 is required--update or see
|
2019-03-09 10:36:48 -08:00
|
|
|
[Troubleshooting](#Troubleshooting) and comments for the `#include`
|
|
|
|
statements in UserInterface.cpp if you have compiler or linker errors)
|
|
|
|
* Irrlicht Library
|
|
|
|
* Linux only: QtCreator/Qt (4 or 5)
|
|
|
|
|
|
|
|
### Linux
|
|
|
|
* To generate a working makefile, edit the .pro file to reflect your
|
|
|
|
path settings and run:
|
|
|
|
```bash
|
|
|
|
qmake make -f Makefile.Debug
|
|
|
|
```
|
2019-03-09 13:06:09 -08:00
|
|
|
This will (hopefully) build a binary in the "build" subdirectory.
|
2019-03-09 10:36:48 -08:00
|
|
|
See [Troubleshooting](#Troubleshooting) for compiling via GUI.
|
|
|
|
|
|
|
|
### Windows
|
|
|
|
(If you use MinGW the Linux section of instructions apply. This section
|
|
|
|
only applies to Visual Studio users.)
|
|
|
|
* In the "win32" folder of your source tree there's a VC++2010 Solution.
|
|
|
|
Open it up and edit the properties to reflect the correct path to the
|
|
|
|
directory which **contains** the "irrlicht" directory.
|
|
|
|
After building, you end up with a "win32_build" folder in the source
|
|
|
|
tree which contains the win32 binary.
|
2019-03-09 13:06:09 -08:00
|
|
|
* Additionally, you have to manually copy the files
|
|
|
|
from the "build" directory to the output folder.
|
2019-03-09 10:36:48 -08:00
|
|
|
|
|
|
|
### Troubleshooting
|
|
|
|
(gcc and GUI compilation)
|
2019-03-09 09:47:08 -08:00
|
|
|
* If you are using GCC to compile, you may need gcc 8.2.1 or higher
|
|
|
|
(C++14 `experimental/filesystem` works on 8.2.1 for sure, but C++17's
|
|
|
|
`filesystem` has not been tested and requires minor changes to
|
|
|
|
`#include` and `using` statements in UserInterface.cpp)
|
2019-03-07 13:32:07 -08:00
|
|
|
* Make sure you have the Irrlicht and Qt development packages
|
|
|
|
(such as via `sudo dnf -y install qt-devel qt-creator irrlicht-devel`
|
|
|
|
on Fedora 29)
|
2019-03-07 23:30:06 -08:00
|
|
|
- Qt is not actually used, only Qt creator (the `CONFIG -= qt`
|
2019-03-09 13:06:09 -08:00
|
|
|
setting is in the `.pro` file).
|
2019-03-07 13:32:07 -08:00
|
|
|
* Open Qt Creator, click File, Open, then choose this project's .pro
|
|
|
|
file.
|
2019-03-07 10:23:54 -08:00
|
|
|
* Build & Run (if you have trouble compiling, see
|
|
|
|
[filehandoff#compiling-issues](https://github.com/poikilos/filehandoff#compiling-issues))
|
|
|
|
* Copy all of the files from `./build` to your actual build directory,
|
|
|
|
if your build directory is not `./build`
|
2019-03-07 19:18:07 -08:00
|
|
|
* (optional) Copy your favorite public-licensed font over
|
|
|
|
`./build/ClearSansRegular.tff` or to current working directory of
|
2019-03-09 13:41:56 -08:00
|
|
|
program (varies on Linux when you double-click files). If you don't,
|
|
|
|
and didn't copy the included one to the output directory,
|
|
|
|
the following fonts will be tried, in the following order:
|
|
|
|
* C:\Windows\Fonts: calibrib.ttf, arialbd.ttf
|
|
|
|
* /usr/share/fonts: liberation/LiberationSans-Bold.ttf,
|
|
|
|
gnu-free/FreeSansBold.ttf, dejavu/DejaVuSans-Bold.ttf,
|
|
|
|
google-droid/DroidSans-Bold.ttf
|
2019-03-07 13:32:07 -08:00
|
|
|
|
2019-03-09 09:47:08 -08:00
|
|
|
## Install
|
2019-03-07 13:32:07 -08:00
|
|
|
### Windows
|
2019-03-07 23:30:06 -08:00
|
|
|
* If you are not using a release version, compile the program (see
|
|
|
|
above) then copy install.bat to your build directory.
|
2019-03-07 13:32:07 -08:00
|
|
|
* double-click install.bat (read any messages that appear then press
|
|
|
|
a key to continue when prompted).
|
2019-03-09 13:06:09 -08:00
|
|
|
* Associate the B3D file extension, and other Irrlicht-compatible 3D
|
|
|
|
mesh formats such as X and OBJ.
|
2019-03-07 13:32:07 -08:00
|
|
|
`%USERPROFILE%\Applications\b3view\b3view.exe` (right-click a b3d
|
|
|
|
file, then Open With, show additional programs, then either paste that
|
|
|
|
path or choose This PC, C:, Users, your username, Applications,
|
|
|
|
b3view, b3view.exe)
|
|
|
|
|
2019-03-09 09:47:08 -08:00
|
|
|
### GNU+Linux Systems
|
2019-03-07 13:32:07 -08:00
|
|
|
* copy install.sh to your build directory if you are not using a release
|
|
|
|
version and your build directory is not `./build`
|
|
|
|
* run install.sh as root, such by running `sudo bash install.sh` in
|
|
|
|
Terminal from the project directory (if you are not root, the install
|
|
|
|
will install to $USER/Applications after giving an opportunity to
|
|
|
|
cancel with Ctrl C during a countdown).
|
|
|
|
(the script will install the "Blitz3D Model File" (`model/b3d`) mime
|
2019-03-09 13:06:09 -08:00
|
|
|
type, which your OS will use for all files with the `b3d` extension--
|
2019-03-07 13:32:07 -08:00
|
|
|
this allows associating the file type with a program).
|
|
|
|
* Associate the b3d file extension (and possibly other Irrlicht-
|
|
|
|
compatible 3D mesh formats) with b3view: Right-click any B3D file,
|
|
|
|
"Open With...", find or type b3view, then check "Remember
|
|
|
|
application..." or "Set as default..." or something similar depending
|
|
|
|
on your desktop environment (an option to always use the same program
|
|
|
|
will only be available if the mime type was successfully installed for
|
|
|
|
the user profile or system such as via install.sh).
|
|
|
|
|
2019-03-07 10:23:54 -08:00
|
|
|
|
|
|
|
## Usage
|
2019-03-09 13:06:09 -08:00
|
|
|
* You can click "File," "Open," then choose an Irrlicht-compatible B3D
|
2019-03-07 13:32:07 -08:00
|
|
|
file. However, the program is much easier to use if you associate the
|
|
|
|
format with b3view (see "Installation" above) so you can just double-
|
|
|
|
click the file to open b3view automatically.
|
2019-04-19 12:29:30 -07:00
|
|
|
* `Ctrl left` / `Ctrl right` (arrow keys) to change animation frame rate
|
|
|
|
in increments of 5 fps, click "Faster" or "Slower," or use `-` key or
|
|
|
|
`+`/`=` key. By default, the scene refreshes at 60fps and the
|
|
|
|
animation runs as 30 fps (Irrlicht does interpolation automatically).
|
|
|
|
Edit the frame rate manually using the input box under "Faster" and
|
|
|
|
"Slower."
|
|
|
|
* `F3` / `Shift F3`: cycle through textures in `../textures` using `F3`
|
|
|
|
key (`Shift` to go backward) such as for Minetest mods, where model
|
|
|
|
must be in `modname/models/` and texture must be in `modname/textures/`.
|
2019-04-08 19:52:18 -07:00
|
|
|
- If `"../textures/" + basename(modelName) + ".png"` or `".jpg"` is
|
2019-04-19 12:29:30 -07:00
|
|
|
present, pressing `t` for the first time will load it.
|
2019-04-08 19:52:18 -07:00
|
|
|
- If `../textures` doesn't exist relative to the model file's
|
|
|
|
directory, the model file's own directory will be used.
|
2019-04-19 12:29:30 -07:00
|
|
|
* `Ctrl i`: toggle texture interpolation (shortcut for View, Texture
|
2019-04-08 19:52:18 -07:00
|
|
|
Interpolation)
|
2019-03-09 04:43:36 -08:00
|
|
|
* `F5`: Reload last model file
|
2019-04-19 12:29:30 -07:00
|
|
|
* `Shift F5`: Reload last texture file (may not be working due to caching,
|
2019-04-08 19:52:18 -07:00
|
|
|
but does try to load different file if texture edit box changed).
|
2019-03-10 06:55:31 -07:00
|
|
|
* drag with middle button: rotate view
|
|
|
|
* drag with middle button while holding shift key: pan up and down
|
2019-04-19 12:29:30 -07:00
|
|
|
* View, choose "Up" axis: change camera "up" axis to Z or Y (Y is default;
|
2019-03-10 06:55:31 -07:00
|
|
|
automatically changed to Z when 3ds file is loaded)
|
2019-03-07 13:32:07 -08:00
|
|
|
|
|
|
|
## Known Issues
|
|
|
|
* Warn on missing texture.
|
2019-03-07 13:55:00 -08:00
|
|
|
* Test and complete install.bat on Windows.
|
2019-03-09 13:41:56 -08:00
|
|
|
* Look for fonts on OS X (see "Set Font for UI Elements" in
|
|
|
|
UserInterface.cpp).
|
2019-03-10 06:55:31 -07:00
|
|
|
* (View.cpp) Set pitch correctly for shift & middle mouse button drag.
|
2019-03-10 21:28:29 -07:00
|
|
|
* Lighting not correct until you rotate or enable z-Up
|
2019-03-07 19:18:07 -08:00
|
|
|
|
|
|
|
## Authors
|
2019-03-09 10:36:48 -08:00
|
|
|
* ClearSansRegular.ttf (**Apache 2.0 License**) by Intel
|
2019-03-07 19:18:07 -08:00
|
|
|
<https://01.org/clear-sans> via
|
|
|
|
<https://www.fontsquirrel.com/fonts/clear-sans>
|
|
|
|
* ninja.b3d, nskin*.jpg by Psionic (psionic3d.co.uk)
|
|
|
|
<http://www.psionic3d.co.uk/downloads/ninja.zip>
|
|
|
|
(I've seen this file ripped and in several repos, but finally found
|
|
|
|
the original site above, which has additional skins not found
|
2019-03-09 13:06:09 -08:00
|
|
|
elsewhere. The original site is listed in "ninja animation ranges.txt"
|
2019-03-09 09:51:25 -08:00
|
|
|
such as from <https://sledjhamr.org/source/media/Irrlicht/>)
|
2019-03-09 10:36:48 -08:00
|
|
|
**"Feel free to use however you like, commercial etc, credits are
|
|
|
|
Appreciated..."** -Psionic
|
2019-03-09 12:42:40 -08:00
|
|
|
* icon (b3view.xcf, p3view.png) Creative Commons Attribution Share-Alike
|
|
|
|
4.0 [poikilos](https://poikilos.org)
|
2019-03-09 10:36:48 -08:00
|
|
|
* All files not mentioned above, and not described in text files in the
|
|
|
|
same folder as media (such as "build" folder) are licensed under the
|
|
|
|
**GPL v3** as per <https://code.google.com/archive/p/b3view/>
|
|
|
|
(see [LICENSE](https://github.com/poikilos/b3view/blob/master/LICENSE)
|
|
|
|
file in your favorite text editor).
|