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 Professional Discussion / .X texture fuzzy when viewed at sharp angle

Author
Message
acelepage
19
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 3rd Mar 2009 19:04
I have created an object in TrueSpace. Then saved it as a .X object and loaded it into DBP. When viewing the object at a sharp angle, the surface texture is fuzzy. When viewed in TrueSpace at the same angle, the texture is sharp.
The code is simple LOAD OBJECT "item.x",1
Looking down at the object the texture is OK. Just when it is viewed from the side. I have tried different LOAD OBJECT texture mode, and the texure reduce flag, but they do not seem to have an effect on this phenomenon.
I have provided screen shot of the TrueSpace object (blue background), and how it appears in DBP (black background) to illustrate the issue.
Any thoughts or info would be appreciated.

( 2b || !2b ), that is the question. The answer: true

Attachments

Login to view attachments
gbark
18
Years of Service
User Offline
Joined: 14th Oct 2005
Location: US - Virginia
Posted: 3rd Mar 2009 19:24
Looks like that might be mipmapping that does that. Try loading the texture without a mipmap and apply that to your object, instead of using the default texture settings for the object:



Where you'd replace "texture.bmp" for whatever image the object is currently using.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Mar 2009 19:42
You can also use...

SET OBJECT TEXTURE Obj,0,0

This sets the specified object to no mipmapping, the middle value is the texture mode, the help files will explain that though.


Health, Ammo, and bacon and eggs!
acelepage
19
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 3rd Mar 2009 20:19
The textures are part of the object, so I cannot load them separately and apply them, although that would fix the mipmapping.

@Van B
That is the solution. Removing mipmapping provides the detailed texture at the sharp angle (see image for result).

Thank you.

( 2b || !2b ), that is the question. The answer: true

Attachments

Login to view attachments
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 3rd Mar 2009 20:57
I think turning off mipmapping for too many objects can affect performance, so be careful with it.

I'm not a real programmer but I play one with DBPro!
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Mar 2009 21:54
Yeah, try and only use that when you really have to - one thing you might find is that when you use lower resolution textures mipmapping actually looks better. If you have a terrain for example, you should never disable mipmapping on it, it just looks really grainy and horrible.


Health, Ammo, and bacon and eggs!
acelepage
19
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 3rd Mar 2009 22:03
Thanks. Good advise. I need to view the dock surface from an angle so I want to see the detail of the surface. All other objects created so far look good with mipmapping on.

( 2b || !2b ), that is the question. The answer: true

Login to post a reply

Server time is: 2024-04-20 13:09:20
Your offset time is: 2024-04-20 13:09:20