PDA

View Full Version : 3D Models viewer with Irrlicht engine



primo
02-01-2018, 12:14
this is a general 3d models viewer using Irrlicht engine which support at least the following models:
*.stl;*.obj;*.3ds;*.x;*.mesh;*.ply;*.b3d;*.ply;*.csm;*.dae;*.xml;*.dmf;*.ms3d;*.my3d;*.oct;*.lmts;*.bsp;*.md2
and it can save any mesh to test.STL file for 3D printing

usage:
mouse and arrow keys to navigate the scene with the camera
Space key: to choose another model to view
W: wireframe
S: SolidFrame
V: save to test.STL

full working demo with the code in thinbasic and irrlicht dll and wrapper also i have added several models to test in different formats:
http://www.mediafire.com/file/3r6qpz36yhjautr/Irrlicht_models_viewer.7z

ErosOlmi
02-01-2018, 22:55
I think a Visual C runtime is needed to execute wrapper dll
MSVCR71.DLL and MSVCP71.DLL are missing in my PC

I'm trying to find a SECURE place where to download this Runtime

primo
03-01-2018, 10:38
i have found these 2 dlls in my machine in C:\WINDOWS\system32 (for winxp) and in K:\Windows\SysWOW64 (for win7/x64). don't know how they get there. the web have too much talk about the missing of these 2 dlls. bad microsoft they don't provide a VC++ 2003 runtime and what was available now unreachable http://archive.msdn.microsoft.com/KB932304

these 2 dlls can be found in a game based on irrlicht engine:
https://sourceforge.net/projects/pacificchung/

the game site is here:
https://www.freebasic.net/forum/viewtopic.php?f=8&t=15967&p=138474&hilit=MSVCR71.DLL#p138474

ErosOlmi
03-01-2018, 21:10
Thanks primo, got files from pacific_chung project

Still not able to execute under Windows 10
Something is preventing loading functions from IrrlichtWrapper.dll library
I'm investigating

ErosOlmi
03-01-2018, 21:54
I think I've found the problem.
To avoid "DLL Hell (https://en.wikipedia.org/wiki/DLL_Hell)", thinBasic Core engine loads a library following a specific sequence of paths: http://www.thinbasic.com/public/products/thinBasic/help/html/index.html?declare.htm
This sequence gives priority to the script instead of the thinBasic executable.

But when, like in this case, thinBasic Core engine loads a DLL (IrrlichtWrapper.dll) that loads another DLL (Irrlicht.dll) ... thinBasic has no control over how the first DLL loads the second DLL.
Second DLL is loaded following the standard LoadLibray sequence that is described here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms684175(v=vs.85).aspx
So the only way to start application is to create a Bundled Exe or put Irrlicht.dll in the same directory of thinBasic.Exe executable
Doing so seems o work.

In any case now I've another problem: IrrGetMeshBoundingBox is not recognized.
Checking ...

ErosOlmi
03-01-2018, 22:07
Solved, I was using IrrlichtWrapper.dll and Irrlicht.dll from pacific_chung project instead of the one provided by primo.

In any case there is no way to execute example other than the two mentioned above:

create a bundled exe. In this case both dll will be loaded from bundled exe path
to run script from source code, copy Irrlicht.dll into thinBasic.exe directory. In this way IrrlichtWrapper.dll will load Irrlicht.dll from main process


Attached Visual C runtimes in case someone will need them

primo
04-01-2018, 07:22
Hi Eros
this is a very interesting DLL Mechanics. i think microsoft should be aware of this phenomena about windows 10 in this thread, so they may make changes in the next windows to be like was in windows 7, but how to inform such a big company with thousands of employees and hundreds of heads of the departments, more complex than space station project. who makes the decisions !!! i don't think (they !!!!) will ever look at this problem. but (they !!!) should be informed somehow.
the speed of loading models in thinbasic irrlicht wrapper is the same as in FreeBasic. it is very handy and even better than the commercial models viewers. even it display Ogre engine *.mesh used by purebasic Ogre engine which is very rarely known to models viewers. i just wish it show *.max models.