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 / Object & Texture Scaling

Author
Message
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 19th Mar 2010 20:35
My game allows you to spawn a box starting at 1x1x1, the texture is then applied and all looks well!

The second part of my game allows you to scale that box in any direction with any value (as lont as you dont go into negatives)
I can scale the box perfectly fine but how am I supposed to scale the texture properly if I can only effect it's horizontal & vertical scale value when the box is an odd shape like 4x4x6

X scale would be 4
Y scale would be 4
but that leaves our Z axis with an oddly streatched texture


How am I to go about fixing this? Do I need to look at each face and scale accordingly? but how??

Add me to your MSN!
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 20th Mar 2010 12:18
I don't get the point, the texture is scaled along with the object, so it always keeps the same aspect, no need to scale the texture as far as I know.
Maybe a couple of pics of the problem could help to understand...

kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 20th Mar 2010 18:04 Edited at: 20th Mar 2010 18:04
I've attached a picture, The large block is after i've scaled up and down a couple times, the small block is one to show origional size, The texture is fine if I scale it only 1 time..

I need to create a tile effect so the texture size does not get larger/smaller

Add me to your MSN!

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 21st Mar 2010 11:31
You are not using internal dbMakeObjectCube, are you?
I ask to know if your are using custom UV coordinates.

First of all make sure that

dbSetNormalizationOn();

appears somewhere at the beginning of the code, that will make us sure that the problem is with the UV scaling, and not the normals scaling.

Login to post a reply

Server time is: 2024-11-20 03:48:39
Your offset time is: 2024-11-20 03:48:39