Hello Guest

Author Topic: Pixel Per Meter question.  (Read 4172 times)

test84

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Pixel Per Meter question.
« on: December 30, 2013, 03:12:28 pm »
Hi,

I've read the documentation and I, at least think, know what it means but have no idea what I have to set for my game. For example, I set my tk2dCamera's native resolution to 320x480 and loaded some sprites that should take half of the stage but they seemed smaller. I increased PPM and it looked somewhat similar but still not the same.

What setting should I set in my tk2dcamera if I want to see exact size of sprite that I see in like Photoshop?

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Pixel Per Meter question.
« Reply #1 on: December 30, 2013, 04:44:16 pm »
You should set the same setting in the sprite collection editor & tk2dCamera. So if its 10 ppm, set the same value in both places, and your sprite should be the same size in the camera as it is in photoshop. Make sure your native resolution = preview resolution so that no further scaling happens there, until you've figured out how everything works.

test84

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: Pixel Per Meter question.
« Reply #2 on: December 30, 2013, 07:52:17 pm »
Thanks, that solved it, totally forgot to set PPM in sprite collection.

But that brings two more questions:

1- What should I put in PPM? What's the "correct" number? I'm sure there is no "correct" number, actually interested to know what should one set for PPM and what are parameters important to set PPM.

2- How PPM is related to different resolutions of different art assets (1x, 2x, 4x, etc). Is PPM have the same value across different resolutions so if you double your art assets, then PPM still the same? I think it does, just asking to make sure it is.

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Pixel Per Meter question.
« Reply #3 on: December 30, 2013, 10:57:09 pm »
1. There is no correct number. If you don't use physics, then 1 is a nice number to use, as 1 world unit = 1 pixel. Makes it easier to position things. Otherwise, if you use physics, think about what your images represent. If 100 pixels in your image represent a 1m length, then use 100 ppm. Just scale appropriately depending on what your sprites represent for a good starting point with physics, you'll undoubtedly have to tweak that / gravity anyway.

2. PPM isn't related to platform sprite collections, the native platform (whatever that may be) is set up for one ppm. Think of every other platform just as showing more or less detail.