Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Loading .x files
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition
View previous topic :: View next topic  
Author Message
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Wed Nov 29, 2006 1:48 am    Post subject: Loading .x files Reply with quote

I am using an example from DirectX8Tutorials that loads a .x file. when I change from the .x file that they supply with the tutorial to one created with DeleD, the program fails at

Set Mesh = D3DX.LoadMeshFromX(App.Path & "\atower.x", D3DXMESH_MANAGED, D3DDevice, Nothing, mtrlBuffer, nMaterials)

with an error$ as "CodeAutomation error". atower.x is a file I exported from DeleD Pro

Any words of wisdom out there?
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Wed Nov 29, 2006 1:51 am    Post subject: Reply with quote

Forgot to mention that this is using VB6
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Thu Nov 30, 2006 11:05 pm    Post subject: Reply with quote

Does the "output" window (debug output) say something?

I don't know VB6, but if App.Path is the path of the executable, does the actual .x file live in the same directory as the executable?

Which exporter did you export with; mine or the built-in? Does the .x open in the DirectX Viewer?

Last: isn't it time to upgrade to VB.NET? :-) (VB.NET Express is probably still a free download AFAIK)
Back to top
View user's profile Send private message
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Fri Dec 01, 2006 2:47 am    Post subject: Reply with quote

Thanks - lets try and sort this out.
I output the Error$ to Debug and it is "CodeAutomation error". with a hex error code of hex 80004005.
The X file is in the correct directory, the same as the program.
To create my .X file I used the included DeleD Pro menu command, File - Export DirectX .X file. I do not know what your exporter is, but certainly willing to try.
I am not certain where to find a DirectX viewer.
Interestingly, when I try to use DeleD Pro to load the x file that I created with DeleD Pro, using menu command Plugins - X Importer, results in a DeleD Pro error "ImportXfileListindex out of bounds (-1)" .

RE VB.NET, I am trying to add some 3D options to a large project written in VB6. Too big a time investment to change a stable project now.
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
trucker2000
DeleD PRO user


Joined: 11 May 2005
Posts: 1839
Location: Sacramento, California

PostPosted: Fri Dec 01, 2006 4:13 am    Post subject: Reply with quote

If it's not importing back into deled, then the x file has a problem. It most likely wasn't exported properly. Here's a link to the directX viewer
It can sometimes fix small problems. I used to have to open up directX files in it, and resave so that they would work in Irrlicht. Give it a try and see if it works for you.
_________________
Some day I will grow up and be a real modeler.
"Never give up! Never surrender!!"
Sys specs:
asus
8 gigs ram
Invidia gtx560 video card
Windows 8 (worst op sys Ever)
Back to top
View user's profile Send private message Visit poster's website
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Fri Dec 01, 2006 10:27 pm    Post subject: Reply with quote

Got the viewer and it will not load my file either, but it loads others just fine. Looks like DeleD Pro makes an error when creating the X file. I guess I will make a bug report.
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Wed Dec 06, 2006 10:24 pm    Post subject: Reply with quote

If you go to plugins, there is a separate exporter there for X files, which I wrote. It does some things the DeleD one doesn't (like scales the geometry to your specification, and creates sharp angles).

You might want to try exporting with that exporter instead.
Back to top
View user's profile Send private message
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Thu Dec 07, 2006 1:52 am    Post subject: Reply with quote

Thanks, I'll give it a try. The Delgine one is working, more or less, but still not doing materials correctly.
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Tue Dec 12, 2006 3:01 am    Post subject: Reply with quote

jWatte:

Windows would not open nuxporter.msi. Said it was not a valid installer

Jeroen:

when loading a Deled .x file into DX viewoer, it loads now but fails to find many materials that I have defined and used and uses defaults instead.
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Wed Dec 13, 2006 7:57 pm    Post subject: Reply with quote

Losey: What you are seeing are probably warnings about missing "effect instances", right? I.e. warnings like this:

Quote:
'Leftwalkway' material 0 - No effect instance specified.
Reverting to the default effect.


As well as some warnings about binormals and tangents not being specified.

AFAIK none of these warnings are serious, and loading of the .X file works fine. Could you please confirm this? Thanks!
Back to top
View user's profile Send private message Visit poster's website
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Wed Dec 13, 2006 11:36 pm    Post subject: Reply with quote

With DXViewer, the file loads, but none of the materials are represented. With the VB6 tutorial program, the graphics never display anything, an error is generated and the program fails.
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Thu Dec 14, 2006 6:48 am    Post subject: Reply with quote

Ok, thanks for the heads-up, that's strange then. I just downloaded the latest version (October edition) of the DirectX 9.0c SDK, and used the viewer to check out some .X files exported by DeleD (the default maps, i.e. castlesiege etc.). Apart from the warnings mentioned above, they show up just fine (including all textures).

Could you do a manual check (Windows Explorer) to see if the textures actually ended up in the same folder as the .X file after export? And if they are, could you send me (paul [at] delgine [dot] com) that particular .X file so I can take a look at it? Thanks!

I'll do some testing myself with various .X importing application, time to find the blanks in that compatibility matrix and check them off... Smile
Back to top
View user's profile Send private message Visit poster's website
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Thu Dec 14, 2006 6:42 pm    Post subject: Reply with quote

I found 2 problems. Only materials in the system folder were being exported and a material that I added with only a color layer was referrred to in the .x file as the hex number of the color.jpg and the file did not exist anywhere. I then named it "red" and added a texture in layer 2 but I still have no file that I can find named red.jpg
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Thu Dec 14, 2006 7:23 pm    Post subject: Reply with quote

losey wrote:
I found 2 problems. Only materials in the system folder were being exported and a material that I added with only a color layer was referrred to in the .x file as the hex number of the color.jpg and the file did not exist anywhere. I then named it "red" and added a texture in layer 2 but I still have no file that I can find named red.jpg


I just tried the build-in .X exporter myself. Here's what I did:

- in the Material Editor: create a new material in some category (not the system category); this material has 1 color layer (a light blue color)
- create a cube using this new material
- export to .X

I find the new .x file including a new .bmp file named color_FFF1A748.bmp in the .x files directory. I do not have a .x viewer installed right now so I can't view the results in another program but the exporter seems to work just fine over here... Confused

Can someone verify this?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
losey
DeleD PRO user


Joined: 25 Nov 2006
Posts: 35
Location: Hawaii

PostPosted: Thu Dec 14, 2006 10:37 pm    Post subject: Reply with quote

I can make that work now so long as I select Textures as well as Materials in the export routine.
Perhaps I also misunderstand the materials editor. I dont see a way to attach a screen shot so I will send it to your email.[/img]
_________________
George Losey
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Community Edition All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum