Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / x-model with textures?

Author
Message
Jack Nukem
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location:
Posted: 5th Feb 2008 17:35
I Have a strange problem that really annoying me:
I'm using Doga-L3 to build 3d models. I export it as WRL, then convert it to X or 3D (I tried both) using Deep Exploration. It's look okay but when I try loading the object in DarkBasic (Classic) it doesn't loading any textures at all!!

I Attached an object as example. Please help.

Attachments

Login to view attachments
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 5th Feb 2008 18:16
Hello,
Works fine when I test it. A lava or fire patterned cube, right? Make sure the object and the image (the texture) are in the same folder.

Enjoy your day.
Jack Nukem
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location:
Posted: 5th Feb 2008 19:12
>Make sure the object and the image (the texture) >are in the same folder.

I already did it, didn't work. I can see the textured object in Deep Exploration but not in Dark Basic. Did you tried it in DB version 1.13?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Feb 2008 19:51
Out of interest, if you save it as a 3DS file does it then work?

If you have more success with 3DS files exported from your modeller it might be exporting X files that DBC doesn't like. If that's the case, you could try my 3DS to .X file converter I wrote for someone in another thread.

You can down download it here (700K).

Also, please note that DBC needs model textures to be a) in the same folder as the model, b) in the old 8.3 filename format and c) bmp or jpg files.

(Apologies if I'm stating the obvious).

TDK_Man

Jack Nukem
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location:
Posted: 5th Feb 2008 22:50
>Out of interest, if you save it as a 3DS file does >it then work?

No. It's the same problem, 3DS and X. Because that Doga-L3 export textured objects only as WRL, I need to convert it to X or 3DS and the most weird thing is that I already used Dark Basic few years ago and I didn't had that problem then!
Not_Maindric
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 5th Feb 2008 23:37
Make a new folder, then try there. I had the same problem, and it was becouse it was loading the unwrap in a folder in the same folder it was in. Try making a new folder with the two files in it, then it shoudl work.

Jack Nukem
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location:
Posted: 6th Feb 2008 09:33
>Make a new folder, then try there

It still doesn't work
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Feb 2008 10:20
I tested it in DBC 1.13 version from 2002. Did you test the example model that you attached to this thread? Like I wrote previously, it works fine. I ask if you tested it because it may be another model you are having problems with and you are assuming the cube is behaving the same way so you didn't test it. There could be a difference between the cube you attached and the model you are having problems with.

In the model you are having problems with, open the X file in a text editor and search through it for the name of your texture file. This should be contained under a block of code that starts with Material {
and in
TextureFileName {

If you can't find the file name or if it isn't only 8 characters or less long with a 3 character extension (ex: image.bmp) , then that would be one reason there's no texture. Also check for a block heading that reads

MeshTextureCoords {

And has a series of numbers after it something like

164;
.0054345; .5544445;,
.0342420; 1.434293;,
etc

If these aren't there, your model has no UV coordinates and the object will only be colored with maybe the first pixel of the texture.

Enjoy your day.
Jack Nukem
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location:
Posted: 6th Feb 2008 10:47
Hi,

First, I'm having problems with the same object I attached (objtest.x and pat050.bmp), the object works fine in Deep Exploration. Yes - there is the texture file name in TextureFileName.

Here are the texture coordinates :
MeshTextureCoords {
24;
0.000000;1.000000;,
1.000000;1.000000;,
1.000000;0.000000;,
0.000000;0.000000;,
0.000000;0.000000;,
1.000000;0.000000;,
1.000000;1.000000;,
0.000000;1.000000;,
0.000000;0.000000;,
0.000000;1.000000;,
1.000000;1.000000;,
1.000000;0.000000;,
1.000000;1.000000;,
0.000000;1.000000;,
0.000000;0.000000;,
1.000000;0.000000;,
1.000000;0.000000;,
0.000000;0.000000;,
0.000000;1.000000;,
1.000000;1.000000;,
0.000000;1.000000;,
0.000000;0.000000;,
1.000000;0.000000;,
1.000000;1.000000;;
}
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Feb 2008 17:26 Edited at: 6th Feb 2008 17:27
The problem was with your texture - possibly a bit depth anomally.

I'm not sure what graphics program you are using, but I loaded it into Paintshop Pro then saved it out with a different name, deleted yours and renamed the new one.

The object then loads textured correctly.

New texture attached.

TDK_Man

Attachments

Login to view attachments
Jack Nukem
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location:
Posted: 6th Feb 2008 18:54
WOW, It work now! MANY THANKS!!! What was the problem exactly? Which BMP parameters you changed?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Feb 2008 20:39
None - I simply loaded yours into Paintshop Pro and saved it out with a different name.

TDK_Man

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Feb 2008 21:36
@TDK

That's wild! Did it not work on your computer either? It worked fine on mine... Could it be a graphics card thing? What led you to test the texture itself?

Enjoy your day.
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 7th Feb 2008 00:03
It suddenly occurred to me that I'd come across the same problem a long time ago and just did what I did back then.

It's odd really because normally I can't remember what I did last week!

TDK_Man

Jack Nukem
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location:
Posted: 9th Feb 2008 16:06
I Want to THANK again for all the help. It's really a weird problem and I don't understand why it happen - maybe it's in the Deep Explorer (I'm using version 2)? If so - do you know good and free VRML convertor?
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 9th Feb 2008 23:06
To be honest, you would be better switching to a program that creates .X files natively - eliminating the conversion process entirely.

Check out what's available her:

http://forum.thegamecreators.com/?m=forum_view&t=123035&b=10

TDK_Man

Login to post a reply

Server time is: 2025-06-04 01:55:16
Your offset time is: 2025-06-04 01:55:16