Texture UV

Software: Away3D 4.x

soso, Newbie
Posted: 18 July 2012 01:40 PM   Total Posts: 6

Hi !

I’m a beginner in away 3d 4 and i have problem with texture application…
I’m trying to displace texture on a plane.

I found the “geometry.scaleUV” but i didn’t found how custom UV…

Can you help me ?

Thanks.

   

Avatar
Fabrice Closier, Administrator
Posted: 18 July 2012 01:58 PM   Total Posts: 1265   [ # 1 ]

you have to set repeat to true on the material as well.

   

soso, Newbie
Posted: 18 July 2012 02:49 PM   Total Posts: 6   [ # 2 ]

Thx for your answer !

but after set repeat to true on the material, i don’t find how set my texture position.

In reality i want to do a similar effect of the carrousel on the away3d home page.

I thought create many plane and displace the big texture into each plane to recreate the image, but maybe it’s not the good method… an idea ?

   

Avatar
Fabrice Closier, Administrator
Posted: 18 July 2012 03:12 PM   Total Posts: 1265   [ # 3 ]

its a good practice, tho, if they need to have a “respectable” size and you have many of them, you might not have much gain vs pain!

I would suggest you do install Prefab, and look what happends when you do change the uv’s. In app the material panel/material has a repeat option, and in meshes pane, each row representing a mesh has an inspection btn. Which opens a detailed information of the geometry, you can alter the uv’s there.

Seeing it realtime in action, might help you…

   

Richard Olsson, Administrator
Posted: 18 July 2012 03:46 PM   Total Posts: 1192   [ # 4 ]

You are right that you could use UV transformation to achieve a similar effect to what is being done on the front page of away3d.com. Use scaleU and scaleV to scale up the UV space, so that the cubes only map to a small part of the texture. Then use offsetU and offsetV to, so to speak, move the cropping rectangle to the part of the surface that you want to show on each cube.

All of said properties are on the SubMesh class, so you access them using myMesh.subMeshes[0].offsetU et c. To make UV transformation render properly, you have to also enable UV animation on the material, using the TextureMaterial.animateUVs property.

   

soso, Newbie
Posted: 18 July 2012 04:44 PM   Total Posts: 6   [ # 5 ]

Oh Super !
Thank you very much for your help !

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X