Scripted Textures

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

Scripted Textures

Postby Marisa Kirisame » Tue Sep 10, 2019 4:33 am

Interest for this kind of thing has resurfaced again. You may remember the horrendous hack that was phantombeta implementing the psx fire as a camera texture displaying a grid of sectors changing color. Someone really needs to put an end to this madness and actually make this. I don't know if I could, though, it sounds like such a monumental task and I don't have enough time to work on anything like that. The way I'm thinking about it would involve moving all the 2d drawing code back to the DCanvas class, then make it so the Screen.* API works on instances of it rather than on the global screen framebuffer (which would be moved to the zscript globals, for backwards compatibility). Obviously ANIMDEFS would have to be expanded for creating these, just like it does for camera textures.

There really shouldn't be any concerns over performance when it comes to this, since we'd be using the renderer's own facilities for drawing, rather than working on raw pixels.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Scriptable Canvas Textures

Postby Graf Zahl » Tue Sep 10, 2019 6:41 am

Forget the canvas, that part will never work. The 2D drawing is completely hardware accelerated, the canvas is just a software buffer.

This is certainly doable but will require quite a bit of backend work - and if you want software renderer support some exporting facility of the created texture
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Scriptable Canvas Textures

Postby Marisa Kirisame » Sun Jan 24, 2021 8:36 am

OK, massive frustration with a gross hack involving camera textures not working properly depending on the map has forced me to bump this thread. WE ABSOLUTELY NEED THIS.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Scriptable Canvas Textures

Postby Graf Zahl » Sun Jan 24, 2021 8:49 am

We need *what*? You got to be a bit more precise about your intents.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Scriptable Canvas Textures

Postby Nash » Sun Jan 24, 2021 8:54 am

I think what Marisa is saying is that people have been abusing camera textures to approximate scriptable textures (with varying degrees of success) and we all know what happens when features are used in ways they're not designed to do, therefore she's suggesting proper, Unreal Engine-style scriptable textures.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Scriptable Canvas Textures

Postby Graf Zahl » Sun Jan 24, 2021 9:35 am

The suggestion says "scriptable canvas texture', so this needs clarification.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Scriptable Canvas Textures

Postby Rachael » Sun Jan 24, 2021 10:09 am

I think a better name for this thread would be "Scriptable Textures" - which would work for both canvas and materials (i.e. object or geometry textures).
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Scripted Textures

Postby Marisa Kirisame » Sun Jan 24, 2021 12:00 pm

Changed the thread title.

What I'm proposing, in simpler terms, is textures that can be drawn to from ZScript, like one would do drawing on the screen itself.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests