Author Topic: jagged edges on higher resolution wheels  (Read 254 times)

Felony_Fett

  • Newbie
  • *
  • Posts: 6
    • View Profile
jagged edges on higher resolution wheels
« on: June 05, 2020, 12:46:53 PM »
Trying to update some of my wheels.  I am using a higher resolution template for my wheel and I am getting pretty sever 'jaggies' on the outer curves of the wheels.  I know it has to do with AM resizing the theme but can't figure out how to resolve it.

You can see the difference here in the 'collections' wheel and the newer 'arcade' wheel

Any help is greatly appreciated.

Thanks,

zpaolo11x

  • Hero Member
  • *****
  • Posts: 847
    • View Profile
    • My deviantart page
Re: jagged edges on higher resolution wheels
« Reply #1 on: June 08, 2020, 12:48:23 AM »
It seems an issue with mipmap, but I don't know the code, if you are familiar with layout code you could check where the wheel images are created and change the mipmap value to true

https://github.com/mickelson/attract/blob/master/Layouts.md#feimage

prefor

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: jagged edges on higher resolution wheels
« Reply #2 on: June 08, 2020, 11:36:55 AM »
Trying to update some of my wheels.  I am using a higher resolution template for my wheel and I am getting pretty sever 'jaggies' on the outer curves of the wheels.  I know it has to do with AM resizing the theme but can't figure out how to resolve it.

You can see the difference here in the 'collections' wheel and the newer 'arcade' wheel

Any help is greatly appreciated.

Thanks,

Where can I get those wheels? They look good :O

Felony_Fett

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: jagged edges on higher resolution wheels
« Reply #3 on: June 09, 2020, 11:35:50 AM »
It seems an issue with mipmap, but I don't know the code, if you are familiar with layout code you could check where the wheel images are created and change the mipmap value to true

https://github.com/mickelson/attract/blob/master/Layouts.md#feimage

Ive looked into mipmap but im just beginning learning how the code functions.  I have found the wheel section in the code and tried it a couple places but cant figure out where it goes to accomplish what i need it to.   

When i place it here, my larger res wheel look great but they dont scale and fill a good chunk of the screen while my other lower res wheels are moved to the top left corner of my screen with the wheel disappearing.

class WheelEntry extends ConveyorSlot
{
   constructor()
   {
      base.constructor( ::fe.add_artwork( "wheel" ) );
      wheel.mipmap = true;
   }

   function on_progress( progress, var )
   {
      local p = progress / 0.1;
      local slot = p.tointeger();
      p -= slot;
      
      slot++;

      if ( slot < 0 ) slot=0;
      if ( slot >=10 ) slot=10;

      m_obj.x = wheel_x[slot] + p * ( wheel_x[slot+1] - wheel_x[slot] );
      m_obj.y = wheel_y[slot] + p * ( wheel_y[slot+1] - wheel_y[slot] );
      m_obj.width = wheel_w[slot] + p * ( wheel_w[slot+1] - wheel_w[slot] );
      m_obj.height = wheel_h[slot] + p * ( wheel_h[slot+1] - wheel_h[slot] );
      m_obj.rotation = wheel_r[slot] + p * ( wheel_r[slot+1] - wheel_r[slot] );
      m_obj.alpha = wheel_a[slot] + p * ( wheel_a[slot+1] - wheel_a[slot] );
      if ( my_config["wheel_logo_aspect"] == "Yes" )
         m_obj.preserve_aspect_ratio=true;
   }

I've attached the layout.nut im trying to modify if anyone can give me a little bit of direction :)

Felony_Fett

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: jagged edges on higher resolution wheels
« Reply #4 on: June 18, 2020, 10:29:41 AM »
Wanted to bump this to see if anyone has any insight on placement of the MipMap to help me with my resolution issues on my wheel.   I would definitely rather have my high res images look good rather than have to drop the image size down to removed the jagged edges..

Thanks

cools

  • Full Member
  • ***
  • Posts: 77
  • Arcade Otaku Sysadmin
    • View Profile
    • Arcade Otaku
Re: jagged edges on higher resolution wheels
« Reply #5 on: June 26, 2020, 08:36:33 AM »
      m_obj.alpha = wheel_a[slot] + p * ( wheel_a[slot+1] - wheel_a[slot] );
      if ( my_config["wheel_logo_aspect"] == "Yes" )
         m_obj.preserve_aspect_ratio=true;
Change to:

      m_obj.alpha = wheel_a[slot] + p * ( wheel_a[slot+1] - wheel_a[slot] );
      m_obj.mipmap = true;
      if ( my_config["wheel_logo_aspect"] == "Yes" )
         m_obj.preserve_aspect_ratio=true;

Felony_Fett

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: jagged edges on higher resolution wheels
« Reply #6 on: June 26, 2020, 06:11:48 PM »
      m_obj.alpha = wheel_a[slot] + p * ( wheel_a[slot+1] - wheel_a[slot] );
      if ( my_config["wheel_logo_aspect"] == "Yes" )
         m_obj.preserve_aspect_ratio=true;
Change to:

      m_obj.alpha = wheel_a[slot] + p * ( wheel_a[slot+1] - wheel_a[slot] );
      m_obj.mipmap = true;
      if ( my_config["wheel_logo_aspect"] == "Yes" )
         m_obj.preserve_aspect_ratio=true;

Thank you so much...the wheels look amazing now....this is why i love this community :)

Thanks again.