How to scale a layer without bilinear interpolation
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
How to scale a layer without bilinear interpolation
Is there a way to transform a layer with bilinear interpolation set to "False"?
I'd like to show a layer at double size without bilinear interpolation.
I'd like to show a layer at double size without bilinear interpolation.
Last edited by lynn on Mon Jun 30, 2014 9:29 pm, edited 2 times in total.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: How to use ATL Zoom without bilinear interpolation
No - bilinear interpolation is hardcoded in at the moment.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
Re: How to use ATL Zoom without bilinear interpolation
Thanks for the quick reply.PyTom wrote:No - bilinear interpolation is hardcoded in at the moment.
So aside from ATL, is there any other way I could show a layer at double size without bilinear interpolation?
Re: How to scale a layer without bilinear interpolation
I've tried using
Though the layer scales properly, setting the bilinear property to true or false seems to have no effect. It'll always use bilinear even if bilinear is set to false. Was that functionality taken out?
Code: Select all
show layer mylayer at FactorZoom(2.0, 2.0, 0, bilinear=False)Re: How to scale a layer without bilinear interpolation
Where exactly is this hard coded? Since my game is all pixel art, it may be easier for me to just adjust the code there rather than trying to do it dynamically.
In motion.py, I tried setting the bilinear parameter in ZoomCommon to False, but this seemed to have no effect either.
In motion.py, I tried setting the bilinear parameter in ZoomCommon to False, but this seemed to have no effect either.
- PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: How to scale a layer without bilinear interpolation
I don't think there's one place - it's throughout the code.
I'd suggest just doubling the pixels in an image program, and then using the pre-doubled images to make your game. That will likely work better than trying to synthesize the result on the fly.
I'd suggest just doubling the pixels in an image program, and then using the pre-doubled images to make your game. That will likely work better than trying to synthesize the result on the fly.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom
- Asceai
- Eileen-Class Veteran
- Posts: 1258
- Joined: Fri Sep 21, 2007 7:13 am
- Projects: a battle engine
- Contact:
Re: How to scale a layer without bilinear interpolation
You can still access nearest-neighbour scaling with the image manipulators im.FactorScale and im.Scale
Re: How to scale a layer without bilinear interpolation
For now, I've solved the problem by using im.FactorScale and condition switches for all images in my game. It's not an ideal solution because it means that I can't zoom in or out like I wanted, but it'll do. It would definitely help pixel artists if the option for non-bilinear scaling could be added back in renpy in the future. Linear interpolation is just not suitable for working with pixel art.
Who is online
Users browsing this forum: Hojoo
