Jump to content

Jan

Members
  • Posts

    3
  • Joined

  • Last visited

Jan's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi lucid, my scaling problems seem to be solved, no more distortions... Thank you! Jan
  2. Hello lucid, thank you very much for the quick reply. When I got you right my assumed order of transformation is wrong. Just to clearify, I thought a sprite's transformation would be calculated like this: M_sprite = M_parent_t * M_parent_r * M_parent_s * M_t * M_r * M_s (Last transform applied first.) But scaling must be calculated independently. So the correct way would be: M_overall_scale = M_parent_s * M_s M_sprite = M_parent_t * M_parent_r * M_t * M_r * M_overall_scale Did I get you right? Unfortunately I didn't have the possibility to test this but I will do that as soon as possible. Jan
  3. Hello, I've written a spriter importer for my own render engine. Everything is working as expected up the point when bones are scaled in spriter. Then my displayed characters are distorded badly. I think I just didn't understand how scale is applied in spriter and unfortunately things are still not getting clear to me even after thinking about it and reducing setups to a minimum. So my basic questions are: Which role is playing scale in the whole transformation setup and in which order is it applied? Here are some points that confuse me: The scml documentation says for scale: "ratio of (original) image width/height". When I change the scale in spriter all other connected bones are moving to. So obviously scale is also applied to the bone transformation and is not only applied as a factor to the image size. Is the documentation outdated at this point or did I misunderstand the documentation? In a very basic setup when I connect one sprite to a bone the sprite is rotated by 270°. That is right because the bone base position points down the positive x-axis. So the sprite must be rotated in it's local space by 270°. When the bone is scaled before the sprite is attached to it, the newly attached sprite gets a scale factor which compensates the bone scaling so that the sprite is displayed in its original size. In this setup the sprite gets a scale factor also for the x axis although it is rotated by 270°. I would have expected that it is scaled in y. As far as I can understand this scaling in x makes only sense if it is applied after rotation. This seems unusual to me and changing the transformation order (first rotate, then scale) only solves issues in certain situations. Thank you very much for your help! Kind regards, Jan
×
×
  • Create New...