Scale 3d object from image width and height ?
Blitz3D Forums/Blitz3D Programming/Scale 3d object from image width and height ?
| ||
Hi :) Anybody can post a formula to resize a 3D object from image size (width and height),to keep the good aspect ratio ? See ya :) |
| ||
Je ne comprend pas, mais c'est une question tres fantastique! |
| ||
Lol :) Imagine, i load a texture, and i want to texture a cube with this texture. But i want to scale the 3D object from the width and the height of the image because i want to keep the image ratio on the textured cube. I'm clear or not now ? :) Example : ![]() |
| ||
w# = ImageWidth(image) h# = ImageHeight(image) ScaleEntity cube,w/w,h/w,1.0Comme ca? Vous etes clair comme etang boueux :P |
| ||
Lol :) Many thanks Fredborg :) But stop google trad :) |
| ||
But stop google trad You too :) |
| ||
Hum don't work :/ I search another way... "You too :)" i try to do my best :) ! |
| ||
image = LoadImage("filaxrocks.png") w# = ImageWidth(image) h# = ImageHeight(image) FreeImage image texture = LoadTexture("filaxrocks.png") cube = CreateCube() EntityTexture cube,texture ScaleEntity cube,w/w,h/w,1.0Doesn't that work? |
| ||
It's good :) many thanks fredborg. |