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.

AppGameKit Classic Chat / uvtexturing on objects

Author
Message
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 7th Aug 2016 17:30 Edited at: 7th Aug 2016 17:39
Still not managing this, I set the image wrap u/v to 1, I want to be able to scale my object on either the x,y or z and for the texture to repeat the same every direction, I use the vars sx#,sy# and sx# to keep track of the current scaling,how can I make the texture repeat, I know it is the command SetObjectUVScale() but depending what I scale or not depends on how it turns out, I have tried SetObjectUVScale(ObjID, 0,1.0/sx#,1.0/sz#) but that only takes care of 2,what if I change the sy# then (scale on the y) . I created the object in blender,unwrapping it by choosing simply unwrap. In this simple case on a cube.
Hail to the king, baby!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 7th Aug 2016 22:02
if you use a flat texture around a tube you can tile only in height & width. u,v is the same than x,y. 0,0 is left top of the teture/image and 1,1 right bottom.
i believe textures with u,v,w are a formula and math behind, maybe possible with a shader.
you saw SetObjectMeshUVScale?
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 7th Aug 2016 23:10
I dont get that command,what is the mesh param in SetObjectMeshUVScale
Hail to the king, baby!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 8th Aug 2016 07:15
the docu is incompleate for SetObjectMeshUVScale, i think its for using with LoadObjectWithChildren ( objID, szFilename )
i guess if you have a sphere an a cube in your object hirachie you can set his uv scale for each.
for your uv scaling problem, perhaps you can seperate this faces into objects.

AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 8th Aug 2016 08:29
I might just keep them as blocks,better than nowt,or by that I mean keep everything on a scale of just 1,as long as they are uv mapped in blender,and I have tried unwrapping every way one can! but a scale of 1 it will have to be
Hail to the king, baby!
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 8th Aug 2016 11:58 Edited at: 8th Aug 2016 11:59
unwrapping is more for a object that you will paint at all sides, it generates uvs often for a single texture.
for walls,roofs,floors its better that u give the object surfaces a uv in a meter size.
AGK (Steam) V2.0.20 : Windows 10 Pro 64 Bit : AMD (16.3.2) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)

Login to post a reply

Server time is: 2024-09-29 17:33:55
Your offset time is: 2024-09-29 17:33:55