FIXED: ROTOZOOMANIM: How obtain CLEAR image?

Previous topic - Next topic

Hark0

Hi!

I'm using ROTOZOOMANIM...

How obtain a CLEAR image without blur:blink:

TIA!



PS: SMOOTHSHADING don't work.... :(
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

MrTAToad

If SMOOTHSHADING FALSE doesn't work, then it is being controlled by your graphics card settings - I suspect you have antialiasing set.

CW

#2
I can vouch for SMOOTHSHADING FALSE. I have used it to magnify sprites for my sprite editor, and it delivers a VERY sharp, pixel-perfect image under magnification.

It is possible that some pixels could get mangled on rotation, trying to map circular paths onto square grids, but that would be the fault of the universe as a whole, not the command. And no permanent damage is done to the image.
-CW

fuzzy70

Quote from: MrTAToad on 2013-May-31
If SMOOTHSHADING FALSE doesn't work, then it is being controlled by your graphics card settings - I suspect you have antialiasing set.

As MrTAToad said, I had similar problems on my old desktop which had an Nvidia gfx card. Turned out there was an option checked in the settings for forced antialiasing (was a separate setting to the standard anti setting though).

Lee
 
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Hark0

Quote from: MrTAToad on 2013-May-31
If SMOOTHSHADING FALSE doesn't work, then it is being controlled by your graphics card settings - I suspect you have antialiasing set.

Sorry but I try in many computers with different video cards, with same result... O_O
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

erico

Hello Harko, what is the output resolution you are running?

I experienced that problem here on my 320x240 stuff, but in an unusual way.
I scale it up 2, 3 and 4x and sometimes on a different pixel aspect ratio.

The thing is, even with smoothshading off I got antialiase going.
I did set my gfx board to fix this and it works for the upscaled and rotated things.

You might want to check the anisotropic filter too on you gfx card, since GLB uses open GL.
For a matter of testing, you may want to turn it (3d fx) all off, and then get one or another on app-controlled till you solve it.

The funny thing is, now my scaled stuff is all fine BUT the original resolution.
If I run the game on PC on the native 320x240 on a window, I get a FREE antialiase of everything.
When scaled, it conforms to my smoothshading off.

I´m pretty sure this is related to my settings of NVidea, but I believe GLB should overide this all on its own.
maybe this is your case too?

I´m appending an example, the left one is scaled to 640x480, the right one is the original, which should be crisp but it is antialiased. I scaled the right one on photoshop 2x with nearneighbour so to preserve its pixels and make it easy to compare both.

Hence the reason I asked about the native res of you stuff.

erico

A few more data:

Things work out fine compiled to MAC osx even on 320x240.
It also goes fine at that on the caanoo, but then it must be because of software render.

matchy

#7
On a quick WIN32 test the SHOWSCREEN seems to set SMOOTHSHADING back to default true. Anyhow, reset it false at the top of the animation loop!  8)
Code (glbasic) Select

loop()

FUNCTION loop:
LOCAL sprite_num, sprite_width, sprite_height, sprite_anim, sprite_frames, sprite_angle, loop_timer
sprite_width = 20
sprite_height = 20
sprite_frames = 6
sprite_num = GENSPRITE()
SMOOTHSHADING FALSE // file
LOADANIM "Media/target.png", sprite_num, sprite_width, sprite_height
WHILE TRUE
SMOOTHSHADING FALSE // reset
INC loop_timer
IF loop_timer = 2
loop_timer = 0
INC sprite_angle
INC sprite_anim
IF sprite_anim = sprite_frames
sprite_anim = 0
ENDIF
ENDIF
DRAWANIM sprite_num, sprite_anim, 20, 20
ROTOZOOMANIM sprite_num, sprite_anim, 200, 110, sprite_angle, 8
SHOWSCREEN // sets SMOOTHSHADING TRUE?
WEND
ENDFUNCTION


spacefractal

Look like its some confuction as smoothshading changes on show screen on some platforms. So for me, it's a bug. It's should behaiver same on any platform.

Yes for both my games, I'm also uses smoothshading in each loop to prevent wirdless, and here its scaling nice.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

fuzzy70

Quote from: spacefractal on 2013-May-31
Look like its some confuction as smoothshading changes on show screen on some platforms. So for me, it's a bug. It's should behaiver same on any platform.

Yes for both my games, I'm also uses smoothshading in each loop to prevent wirdless, and here its scaling nice.

But a bug with what though?, GLB or PC GFX drivers. I had this problem on my desktop with a Nvidia card yet no problem with the ATI in my laptop. A setting in the Nvidia drivers allows it to override Anti-aliasing on apps & there is also one for applying it to any app that does not give you the option of Anti-aliasing. The latter is a fairly recent addition to the Nvidia driver I think as do not recall seeing it before a year or 2 ago. It might be a case that the "Default" settings on recent Nvidia drivers has changed.

If it is a driver issue then there is not a lot that can be done with it other than telling users to change a setting in their control panel, which is not really an option as there is a lot of people who won't change or mess about with settings for the sake of 1 game.

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

spacefractal

in Genius Greedy Mouse, SMOOTHSHADING need to been false, elsewise all tiles will been completly wrong and will show boxes around the lines, which shown very ugly. That happens too with Karma Miwa.

Also just tested, if im only use SMOOTHSHADING FALSE once, top in the program, SMOOTHSHADING will set to TRUE after the first SHOWSCREEN, and the game show the ugly Anti-aliasing boxes around tiles (happens when upscaled):


So you need to do a SMOOTHSHADING FALSE in each loop to prevent that. So im thinks Matchy is correct here.

PS. Im use a Nvidia GTS550 Card with newest Nvidia Windows 7 driver.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

fuzzy70

#11
It does state in the manual (v10, v11 & online) that
QuoteAn X_MAKE2D or SHOWSCREEN resets the mode% parameter to the default: TRUE.

A response from Hark0 if he was calling SMOOTHSHADING each loop or if not adding it in the loop cured his problem.

Lee

Edit: I can safely say that on more than one occasion I have forgot to put SMOOTHSHADING inside a loop  :D
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Hark0

Hi guys!

Thanks to all post... ;)


The correct SOLUTION is use "SMOOTHSHADING FALSE" in Main Loop.

(Personally I add this command after SHOWSCREEN in MainLoop)

:good:

Now I can zoom my anims sprites without blur. ;)
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

erico

Cant believe after typing billion line to answer my post is  not there...will get back to this later harko. Im glaf it worked out tought...now get back to eletricrpg!!!!

Edit.. ops it might have been couse I used swer words...:( fair enoufh

Hark0

Quote from: erico on 2013-Jun-01
Cant believe after typing billion line to answer my post is  not there...will get back to this later harko. Im glaf it worked out tought...now get back to eletricrpg!!!!

Edit.. ops it might have been couse I used swer words...:( fair enoufh

And... about ElectricRPG... I use DRAWRECT for draw the sprites due ROTOZOOMANIM fails... maybe I now can rewrite all related code for paint better/fast...  ;/
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic