Problems Loading .x files in Irricht Engine that work in DX

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
JamesCobras
Posts: 17
Joined: Thu Aug 28, 2008 10:42 am

Problems Loading .x files in Irricht Engine that work in DX

Post by JamesCobras »

Hi i've had a quick look around and found only one post that's similar to this but with no real anwsers.

I have an .x file that i exported from Max 9 using Okino Polytrans. It works in the DX viewer perfectly. When i try to open it up in the Irrlicht Mesh Viewer it says it's loaded but nothing appears.

Here im trying to load output.x (It is in binary form)

'09.MeshViewer.exe': Loaded 'D:\James\Irrlicht 1.4.1\irrlicht-1.4.1\bin\Win32-VisualStudio\09.MeshViewer.exe', Symbols loaded.
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'09.MeshViewer.exe': Loaded 'D:\James\Irrlicht 1.4.1\irrlicht-1.4.1\bin\Win32-VisualStudio\Irrlicht.dll', Binary was not built with debug information.
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\secur32.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\opengl32.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\glu32.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\ddraw.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\dciman32.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\shimeng.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\imm32.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\lpk.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\usp10.dll'
'09.MeshViewer.exe': Unloaded 'C:\WINDOWS\system32\shimeng.dll'
Irrlicht Engine version 1.4.1
Microsoft Windows XP Personal Service Pack 2 (Build 2600)
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'09.MeshViewer.exe': Loaded 'C:\Program Files\Common Files\AOL\ACS\WLHook.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'09.MeshViewer.exe': Unloaded 'C:\WINDOWS\system32\version.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\apphelp.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\ole32.dll'
Using renderer: Direct3D 9.0
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\serwvdrv.dll'
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\umdmxfrm.dll'
RADEON X600 256MB HyperMemory ati2dvag.dll 6.14.10.6561
Loaded texture: open.png
Loaded texture: tools.png
Loaded texture: zip.png
Loaded texture: help.png
Loaded texture: axe.jpg
Loaded texture: dwarf.jpg
Could not open file of texture: dwarf2.jpg
Could not open file of texture: dwarf2.jpg
Could not open file of texture: dwarf2.jpg
Loaded mesh: dwarf.x
Loaded texture: irrlicht2_bk.jpg
Loaded texture: irrlicht2_ft.jpg
Loaded texture: irrlicht2_rt.jpg
Loaded texture: irrlicht2_lf.jpg
Loaded texture: irrlicht2_dn.jpg
Loaded texture: irrlicht2_up.jpg
Loaded texture: irrlichtlogo2.png
'09.MeshViewer.exe': Loaded 'C:\WINDOWS\system32\mslbui.dll'
Unknown data object in animation of .x file: Header
Loaded texture: C:/Documents and Settings/Kids beta/Desktop/UVW Body v3.jpg
Loaded texture: C:/Documents and Settings/Kids beta/Desktop/UVW Head.jpg
Loaded texture: C:/Documents and Settings/Kids beta/Desktop/UVW Boots.jpg
Loaded texture: C:/Documents and Settings/Kids beta/Desktop/UVW Hands.jpg
Index count per face not equal to face material index count in x file.
Loaded mesh: d:\James/output.x
'09.MeshViewer.exe': Unloaded 'C:\Program Files\Common Files\AOL\ACS\WLHook.dll'
The program '[656] 09.MeshViewer.exe: Native' has exited with code 0 (0x0).

I have some code that I will try to load it using just directx but i would love to use the Irrlicht engine. Ill edit this post when i have got it to work or not. As a beginner it would be great to have code with directions were to put it or even better a very small program showing it working.

Thanks in advance for all and any help.

James

The directx code i have is useless it didn't compile properly and loads of errors using the file that it came with.

Web address to the x file and materials.
www.freewebs.com/jamescobras/output.x
http://www.freewebs.com/jamescobras/outputnonbinary.x
http://www.freewebs.com/jamescobras/UVW%20Body%20v3.jpg
http://www.freewebs.com/jamescobras/UVW%20Boots.jpg
http://www.freewebs.com/jamescobras/UVW%20Hands.jpg
http://www.freewebs.com/jamescobras/UVW%20Head.jpg
Last edited by JamesCobras on Fri Aug 29, 2008 9:06 pm, edited 7 times in total.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: Problems Loading .x files in Irricht Engine that work in

Post by rogerborg »

JamesCobras wrote:I have an .x file
But we don't have it, and so can only guess at what the problem is. Any chance that you could make it available?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
JamesCobras
Posts: 17
Joined: Thu Aug 28, 2008 10:42 am

Now available

Post by JamesCobras »

The links to them are now at the bottom of my first post.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: Problems Loading .x files in Irricht Engine that work in

Post by rogerborg »

JamesCobras wrote:Index count per face not equal to face material index count in x file.
This is causing an early exit from the X file loader. It's returning an IAnimatedMesh, but it's incomplete (it has a 0 sized bounding box, for one thing). Skipping this check causes a crash, so it does seem to be a genuine issue.

Sorry, I'm not really into the joy of X, so I won't be looking into this any further. I hope there's an X files junkie who will be interested enough to give it a prod.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
JamesCobras
Posts: 17
Joined: Thu Aug 28, 2008 10:42 am

Re: Problems Loading .x files in Irricht Engine that work in

Post by JamesCobras »

rogerborg wrote:
JamesCobras wrote:Index count per face not equal to face material index count in x file.
This is causing an early exit from the X file loader. It's returning an IAnimatedMesh, but it's incomplete (it has a 0 sized bounding box, for one thing). Skipping this check causes a crash, so it does seem to be a genuine issue.

Sorry, I'm not really into the joy of X, so I won't be looking into this any further. I hope there's an X files junkie who will be interested enough to give it a prod.
Thanks, thats one step along the way i hope there is an x file guru out there too.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Image

I'm sorry, good luck fixing the problem :oops:
Image Image Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I think it's related to an error reported some weeks ago. There seems to be a way for a "compressed material list", which just stops putting the material list numbers if all numbers until the end will be the same. Weird, undocumented way, but hey, it's the .x format...
Maybe I can fix this.
JamesCobras
Posts: 17
Joined: Thu Aug 28, 2008 10:42 am

Post by JamesCobras »

hybrid wrote:Maybe I can fix this.
Please, if you do i'll call you a God forever, i cannot find any game engines that load .x easily. If you can look into it it would be great and that goes for anyone else who wants to give me a hand.
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

how about import the .X in a 3d software, and export it to another format?
JamesCobras
Posts: 17
Joined: Thu Aug 28, 2008 10:42 am

Post by JamesCobras »

jontan6 wrote:Export it to another format?
That is an option and a last resort. I'll need a good max 9 exprter. But Irrlicht should really be able to load the file if DX viewer can, don't you agree? If the Irrlicht engine cannot load this .x file it shouldn't say it can load .x files.

I don't mean to be mean or disrespectful to the programmers but i really think this needs a workaround or a fix.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Only if you define X files as "anything that MS's X file viewer loads". Standards be damned, eh?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
JamesCobras
Posts: 17
Joined: Thu Aug 28, 2008 10:42 am

Post by JamesCobras »

rogerborg wrote:Only if you define X files as "anything that MS's X file viewer loads". Standards be damned, eh?
Well it is their format so i actually do. But this is straying from the subject i just want it to load so any help would be great.

Thanks in advance for anyone who can help me.
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

i suggest u consider workaround for the moment, so u can proceed with your project
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I tried to convert the files with MView.exe, worked a little bit in that the error was gone and Irrlicht could render something. But the mesh still had some problems.
Is it possible to export the mesh in text form? It's soo much work to debug the binary files...
JamesCobras
Posts: 17
Joined: Thu Aug 28, 2008 10:42 am

Post by JamesCobras »

hybrid wrote:I tried to convert the files with MView.exe, worked a little bit in that the error was gone and Irrlicht could render something. But the mesh still had some problems.
Is it possible to export the mesh in text form? It's soo much work to debug the binary files...
I'll upload them as soon as possible. Any thing else you want?
Post Reply