Why does Flatten cut off edges?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
randallarrow
Newbie
Posts: 11
Joined: Fri Nov 23, 2018 2:20 am
Contact:

Why does Flatten cut off edges?

#1 Post by randallarrow »

I have some characters who are made up of overlapping composited images. I want to be able to display them with alpha transparency in some cases.
This seems straightforward enough: Use Flatten() on the composite to combine it into a single texture. This is exactly what Flatten() is supposed to be for.
For the shorter characters, this works fine. For the taller ones, it cuts off the tops of their heads. (It seems to be taking "flatten" a little too literally?)

I tried passing ysize parameters to both DynamicDisplayable and to Flatten, and it didn't seem to do anything.

Is there some sort of texture size limit configured somewhere, like a texture can't be more than 800 pixels tall by default? If so, can this be changed?

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Why does Flatten cut off edges?

#2 Post by PyTom »

Hm... that's interesting. I think it's possible that you're drawing into a Fixed, which has a size applied to it, and flatten reduces it down to that size in the way that simply drawing will not.

I'd suggest using shift+alt+I (as in India) over your image, to see what size Ren'Py thinks it is.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Bing [Bot]