Canvas sky textures issue

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Xeotroid
Posts: 443
Joined: Sat Jun 23, 2012 7:44 am
Graphics Processor: nVidia with Vulkan support
Location: Czech Rep.

Canvas sky textures issue

Post by Xeotroid »

I'm sure I'm missing something, but is there a way for canvas textures to "behave" like normal textures when applied as a sky? Here's what I mean:
Here, a normal texture is used and works as expected:

Here, I have a canvas texture with the same dimensions as the normal texture. I have drawn the normal texture to it once with no offsetting or scaling. It's quite messed up (the shifting and mirroring not so much, but the black hole at the top I can't think of a way of getting around - I'm guessing the solid colour fade is determined at load time when the canvas texture was empty?):

Is there a way to get the canvas texture to not look like that? Is it a known limitation or a bug? Am I missing the usage of some DrawTexture() tag? Attached is the example map from the screenshots. Pressing Use anywhere switches between the normal (initial) and canvas textures.

If circumventing this issue isn't possible, one idea I've just got would be using canvas textures with GLDEFS Quake 2-style skyboxes - I'll look into that later. My intention is to crossfade between two sky textures smoothly over time. EDIT: I've tried this approach, and it appears to work just fine (save for having to work with six canvas textures instead of one. Here's hoping I don't kill performance with it! :D). Some texture flipping is necessary, but there are no offset issues or black holes.
Attachments
canvasSkyHelp.pk3
(26.1 KiB) Downloaded 17 times
User avatar
GelleSzebasztian
Posts: 27
Joined: Fri Mar 08, 2019 5:11 pm
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Canvas sky textures issue

Post by GelleSzebasztian »

What I would do in your situation is use a skybox viewpoint with a skybox room, but your solution is more foolproof I believe.

Anyways very cool idea! Canvas for sky... Is it for some weather/time system?
Post Reply

Return to “Scripting”