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 / DBPro simple texturing of object plane bug?

Author
Message
Unlocker
13
Years of Service
User Offline
Joined: 26th Jul 2012
Location:
Posted: 2nd Aug 2012 03:34
Hello all. Can anybody test this simple code and tell what you see.
I see unexpected stripes around texture: bottom edge is a clone of the top edge and left one is a clone of right edge. But when i move texture by OZ coordinate in some positions bottom or right artifacts can dissapear.

use this texture for test


i see such result:


whats wrong? how it can be fixed?
i have graphic card NVidia GeForce 6800

the truth is out there
Unlocker
13
Years of Service
User Offline
Joined: 26th Jul 2012
Location:
Posted: 2nd Aug 2012 04:49
Oh, sorry, i forgot the code for test.



the truth is out there
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 2nd Aug 2012 10:21 Edited at: 2nd Aug 2012 10:21
Quote: "SET OBJECT TEXTURE
This command will set different texture modes used by the specified object."

...
Quote: "Setting the Texture Wrap Mode to zero will use the default wrap mode which repeat the pattern of the texture over and over, a mode of one will mirror the texture to create a seamless texture pattern and a mode of two will set clamping which retains the colour of the last pixel at the textures edge and paint with that throughout the out of range area."


Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Aug 2012 14:50
I think mrHandy means something like this:

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 2nd Aug 2012 15:14
Yeah, this fixes it...




But it should be default, I don't know why it isn't. Also, I didn't know you could spell Plain as Plane.

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 2nd Aug 2012 16:51
Mipmapping?


They see me coding, they hating. http://indi-indicium.blogspot.co.uk/
Unlocker
13
Years of Service
User Offline
Joined: 26th Jul 2012
Location:
Posted: 2nd Aug 2012 17:13
Thank you brothers. So simple that even I am ashamed,
it seems I need to lift up my skill to read the documentation.

the truth is out there
Unlocker
13
Years of Service
User Offline
Joined: 26th Jul 2012
Location:
Posted: 2nd Aug 2012 17:21
Quote: "Pincho Paxton
... Also, I didn't know you could spell Plain as Plane."


exactly, I misspoke..

the truth is out there
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 2nd Aug 2012 21:38
Quote: "exactly, I misspoke.."


You didn't make a mistake, I was surprised that they both work.

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 2nd Aug 2012 23:28
Quote: "Setting the Texture Wrap Mode to zero will use the default wrap mode which repeat the pattern of the texture over and over, a mode of one will mirror the texture to create a seamless texture pattern and a mode of two will set clamping which retains the colour of the last pixel at the textures edge and paint with that throughout the out of range area."


Actually the help files are wrong, the numbers given are all off by one. Zero is actually an invalid texture wrap mode which most drivers treat the same as 1.

1 = Repeat
2 = Mirror
3 = Clamp
4 = Border
5 = Mirror once

It just so happens that mirroring also solves the problem in this case.

[b]
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Aug 2012 00:50
Thanks Diggsey. I'd forgotten that.

Login to post a reply

Server time is: 2026-07-07 12:27:01
Your offset time is: 2026-07-07 12:27:01