5

Can anyone explain how the two Scale properties work in the Material Inspector of the Xcode Scene Editor?

enter image description here

Ostensibly, it seems the first represents scale along the X-axis while the second represents scale along the Y-axis. There is no discussion of the scale property in the SCNMaterial class.

This image is from the WWDC fox demo. It's used for the floor's diffuse material. Its dimensions are 512x512.

enter image description here

However, the demo uses scale values of 1 for this image. For another floor material image (also 512x512), it uses scale values of 128.

Instead of 1 and 128 shouldn't it use values of 2 or 3 to account for higher device resolutions (e.g., 2x on 5s devices)?

Playing around with different values yields unexpected results. The higher scale value (i.e., 256) yielded a sharper floor, but it also created "horseshoe" artifacts not seen at the 64 level. Also, why isn't a scale factor of 2 or 3 be sufficient?

Accounting for a 2x resolution on iPhone 5s devices, both scale properties were set to 256. That yields: enter image description here

Scale properties set to 128: enter image description here

Scale properties set to 64: enter image description here

Could someone kindly explain how to set the scale properties based on the material's image resolution?

Crashalot
  • 33,605
  • 61
  • 269
  • 439
  • 1
    The scale is just how many times the image is repeated across the surface. 1 will fill the entire surface, 256 will repeat it that many times. – James P Jan 08 '17 at 14:30
  • @JamesP so how does this impact a floor node that has an infinite plane? 256, for instance, means it will repeat the image that many times across the visible part of the floor such that no matter where you move, you will always see the image repeated 256 times across the whole floor? – Crashalot Jan 29 '17 at 01:52
  • A floor with a scale of 1 is like a 100 point plane tiled in all directions. So a material with a scale of 1 will stretch to fill each tile. Changing the scale of the floor changes the size of the tiles, changing the scale of the material will change how many times the image is repeated across each tile. – James P Jan 29 '17 at 09:55

0 Answers0