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.

Newcomers DBPro Corner / Trouble with textures

Author
Message
Fighter1
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 3rd Nov 2007 16:12 Edited at: 3rd Nov 2007 18:50
Hi everyone I am new both here and too Darkbasic, but I have been working on this project for a while now so i thought I would post some screenshots and ask for some help with a problem I am having. My project is a combat flight simulator.

The problem is that with both the model of my plane and the particle effect I am using the textures do not appear to show up, instead they just reflect the colour of the skyshpere.

Here are some links to some screenshots that demonstrate this problem.

http://img456.imageshack.us/img456/3706/screen1dt3.png
http://img87.imageshack.us/my.php?image=screen2mk3.png

As you can see the plane should be a shiny black but ends up reflecting the sky blue and the bullet trail should be red but again ends up being a sort of turqouise.

Here are a couple of other screenshots for those interested in the project showing the 1st person view.

http://img46.imageshack.us/img46/7115/screen3ep7.png
http://img104.imageshack.us/img104/26/screen4nd0.png

Thanks for your help

P.S. If anyone knows how to get rid of the fps in the top right hand corner please let me know as it seems to come and go randomly


Edit: I thought the code may help you to understand the problem so here is the relevant piece



Also I didn't know if having ambient light at 100 had anything to do with it (having ambient light that high is the only way is can get my skysphere to look any good)
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 4th Nov 2007 00:05 Edited at: 4th Nov 2007 00:06
Is the image "Black.bmp" just the color black? If it is, DarkBasic is probably making it transparent. Transparency is automatically set to 0,0,0 (black).

Just try adding the command "Set Image Colorkey" to the program before you load the image, and set the parameters to anything other than 0,0,0. See if that does anything.


"Fire is always at the top of the food chain, and it has a big appetite."
Fighter1
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 4th Nov 2007 00:39
that didn't work. I had already thought of that but even when I set the colour as rgb 255,0,0 it still just reflects the blue

thanks for your help anyway
Spotaru
17
Years of Service
User Offline
Joined: 3rd Dec 2006
Location: Over the next rise.
Posted: 4th Nov 2007 15:24
From the screen shots, it looks like the texture is not there. First off what size is the texture. Some grapic cards must have a power of two. (128x128, 256x256, etc.)
Second, is this an untextured model and you are applying it in DBP, or does the model already have a texture before it is loaded.
If it is already textured, there is no need to reapply it in DBP, just load the model and the texture will be there. (Texture MUST be in same folder as model.)
Third, I can't tell from the images, but the model may be inverted.
(Inside Out) Scaling an object too far can invert its polys.
Fighter1
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 4th Nov 2007 16:23
I have tried many different textures of all different sizes to try and get this too work but almost all of them have been powers of two (mainly 256x156). I have also tried different file types but none of that has worked. I'm pretty sure that the model was pretextured but I can't be sure because I didn't make it. I origionally converted it from 3DS to .x so that may be the cause of the problem. Also I don't think it is inverted but I will check next time I can access the code (I'm away for the day)

Thanks again
Fighter1
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 4th Nov 2007 22:02
I checked now and the scaling isn't the problem. Although I do scale the object I tried without scaling but it still doesn't fix it.
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 5th Nov 2007 12:58
Quote: "Also I didn't know if having ambient light at 100 had anything to do with it (having ambient light that high is the only way is can get my skysphere to look any good) "


instead of setting ambient light to 100 use:

set object light skysphere,0
set object fog skysphere,0



The word "Gullible" cannot be found in any English Dictionary.
Fighter1
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 5th Nov 2007 14:21
Thanks Flashing Blade the skysphere looks a lot better now, however it doesn't solve the problem with the lack of texture on the model. Do you think it's likely that the model is corrupt?
Spotaru
17
Years of Service
User Offline
Joined: 3rd Dec 2006
Location: Over the next rise.
Posted: 5th Nov 2007 14:45
Could you post the model and texture or send me a copy in an email so that I can test it.
Fighter1
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 5th Nov 2007 15:03
Sure here is the model. Don't worry about the texture though as at the moment I am just trying to get any texture to work. The one I am using is a 256x256 bmp but let me know if you get any texture to work.

Thanks a lot,
Fighter1405

Attachments

Login to view attachments
Fighter1
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location:
Posted: 7th Nov 2007 20:07
Anybody?

Login to post a reply

Server time is: 2024-11-25 12:41:22
Your offset time is: 2024-11-25 12:41:22