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.

Dark GDK / get texture on cubes ??? how to

Author
Message
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 9th Jan 2009 09:15
I want to get a texture onto a cube object using dbTextureObject
BUT when the image i use is loaded onto it it is all messed up.
I guess it needs to be a certain size/shape to map to it correctly.
Any help would be much appreciated. :- Steve
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 9th Jan 2009 12:38
Try 'dbScrollObjectTexture( )' and 'dbScaleObjectTexture( )'. These will affect how your textures appears on your object.


stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 9th Jan 2009 18:29
Thank you andrew for your tip. I tried that but still have a problem with cubes. It seems that on some faces the texture is stretched somehow. I dont't know it may be that cubes require a different method to texture. :- Steve
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 9th Jan 2009 19:21
ooops i forgot to mention 2 sides of the cube look correct
the other 4 stretched out of shape totally
also i am loading a square texture :- Steve
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 9th Jan 2009 19:42
Perhaps if i tell you more about what i want to do, it may make things a little clearer. I want to make a puzzle game that involves using cubes with 6 different sides, for instance a different colour on each side. Rather than make up a different .x file for each different cube type. I am trying to use a basic cube then re-texture the cube/s as needed to save loading in tons of different cubes. Any ideas please on how to do this thank you :-
Steve
Cryptic Dragon
16
Years of Service
User Offline
Joined: 7th Dec 2007
Location:
Posted: 10th Jan 2009 07:35
A longshot here but here goes. While I have only been using 3DStudio since 1994 and C++ since about 2001 I am still very fresh to the gaming production end but I am getting there.

I saw this same thing in 3DStudio as well when you are mapping to a cube the two parallel sides show a nice texture but the other 4 are a run of the edge pixels looking like stretching or streaking.

Try making 6 cubes with one dimension so very very small near 0. Sort of like a very flat piece of square cardboard. A piece of cardboard does have a third very small dimension. Position all six of them three dimensionally to build a cube. It would take some fancy for loops to move them in a nice manner all together to maintain the cube shape but it can be done as it worked out in 3DStudio when I created animations using a cube with six different images mapped to the cube.

Just a long shot here,

Luck,

CrypticDragon

You know for a fact that you have reached the edge when you can absolutely see sound!

Login to post a reply

Server time is: 2024-09-30 15:28:27
Your offset time is: 2024-09-30 15:28:27