Global Texture Projection Error

460
1
11-10-2012 01:01 AM
ziadfilfili
New Contributor II
Hello,

I am trying to trim the texture and apply it as a roof texture on the buildings.
it worked, but for some reason the mapping of the texture is different,
I attached an image with a red outline to show where its taking the texture from and applying it on the building.
And a purple outlined to show the rule.
i CAN'T know what seems to be the problem...

Cheers,
Tags (2)
0 Kudos
1 Reply
MatthiasBuehler1
Frequent Contributor II
Try this code .. :)


satelliteImage = "builtin:uvtest.png" #"maps/mySatellitePic.jpg" # user defined image in maps folder
satelliteImageData(data) =
 case data == "SX"   : 1000    # user defined, same as terrain extent. select terrain layer and check Inspector
 case data == "SZ"   : 1000
 case data == "OX"   : 1000
 case data == "OZ"   : -1000
 else : 1

Roof -->
setupProjection(0,world.xz,satelliteImageData("SX"), -satelliteImageData("SZ"), satelliteImageData("OX"), satelliteImageData("OZ"))
projectUV(0)
texture(satelliteImage)
0 Kudos