Scale() and Rotate() with bad graphics

Monkey Forums/Monkey Beginners/Scale() and Rotate() with bad graphics

yiotoo(Posted 2014) [#1]
When I use Scale() to get the image smaller or Rotate() slowly, the image seems very strange and with very bad graphics.
What can I do for those moviments seems good and natural like others games?


I am using Scale(0.5,0.5) for one image.

and for another BIG image I am using:
Method OnRender()
Rotfundo +=0.01
Rotate(Rotfundo)
End

ty


yiotoo(Posted 2014) [#2]
Is there anything in the monkey's website in module registry that can solve this with another kind of function of rotate and scale?

ty


therevills(Posted 2014) [#3]
I think you need to show us some screen shots to know what you mean...


AdamRedwoods(Posted 2014) [#4]
perhaps?
#MOJO_IMAGE_FILTERING_ENABLED=True



Midimaster(Posted 2014) [#5]
it sound like he has problems with moire effects. Can you descripe the "very strange"? Is it like a lot of flickering?,

I would suggest not to rotate in such small differences, but in bigger steps with standing (halt) phases. Replace 0.01° per Flip with 0.6° every 60 Flips
If Time<Millisecs()
     Time=Millisecs()+1000
     Rotfundo +=0.6
Endif
Rotate Rotfundo
DrawImage...


or try:

If Time<Millisecs()
     Time=Millisecs()+200
     Rotfundo +=0.12
Endif
Rotate Rotfundo
DrawImage...



yiotoo(Posted 2014) [#6]
i posted an example of code below.
the white dots on the sky.png seems flash on and flash off or blink.
the small tree lost branchs.

ps: i tried turn on and off the #MOJO_IMAGE_FILTERING_ENABLED=True and it didn't work
ps2: if i drew each white dot with drawCircle() and move with the functions , they will seem natural. but the image .png don't.







AdamRedwoods(Posted 2014) [#7]
perhaps try the filtering = false? nevermind, i see you tried that.


yiotoo(Posted 2014) [#8]
but ty for the guess :)


Aman(Posted 2014) [#9]
Did you set a high virtual resolution or change the scissors?


yiotoo(Posted 2014) [#10]
How do I do this 2 things, Aman?

is it here?



ps. i have a good video card, GeForce GTX 560.
ps2. my desktop resolution is 1920 x 1080 and the program was 640x 480
ps3. even if i use scissors don't work " if i understood what is scissors" (code below)



Jesse(Posted 2014) [#11]
The problem I see is with the images. the images are 256 indexed PNG. and you are trying to move single pixels partial pixels distance. the blurring is caused by the graphics card trying to adjust the pixel display between two pixel position and therefore the brightening and dimming of single pixels. This being the white pixels in this case.
also the tree was cut out from an image that have a specific background color and is reflected when placed behind a different color image.


yiotoo(Posted 2014) [#12]
Jesse about the sky u are right.
about the tree I was refering about the small image who looks odd, I know it's 2D but in 3D if u see an object far away , it will looks smaller but with better graphics.

But how can I improve this? Is there any module?


Jesse(Posted 2014) [#13]
I believe you will have the same effect in 3D if you use the same image. the problem again is the single pixel lines that do not compensate for blurriness of lines or antialiasing. in this case the graphics card has to decide which pixels to eliminate for the down scale and you end up with missing pixels that might be from something essential. the color need to be naturally diffused into the image for the graphics card algorithm to produce a better result. even then depending on the scaling you will have some similar but not so obvious results.


skid(Posted 2014) [#14]
The problem is that some of the mojo targets do not support mip map filtering so anything scaled smaller than 1:2 will look completely rubbish.


yiotoo(Posted 2014) [#15]
yeh, u are right Jesse, it is normal, I tried with others programs and it happens same as monkey. it's normal.

so ty all u guys :)