Page 1 of 3

Rotated wall textures

Posted: Sat Jun 09, 2018 1:31 pm
by RockstarRaccoon
Right now, if I want to have a texture for something like a support beam rotated, I have to go into GIMP and SLADE and do it manually. It would make the process a lot simpler if I could just do it from a UDMF field. How difficult would this be to implement? I'm not entirely sure how it would be done...

Re: Rotated wall textures

Posted: Wed Jun 13, 2018 12:40 pm
by Gorman Frebmane
Indeed this feature would allow me to make sloped vents look more like actual vents.

Re: Rotated wall textures

Posted: Wed Jun 13, 2018 1:41 pm
by RockstarRaccoon
Very good point. With Membrane, I've been experimenting with the workaround of having a spiral pattern to the vents, but that could work really well too. I was thinking this will be good for things like slanted support beams.

Re: Rotated wall textures

Posted: Wed Jun 13, 2018 8:35 pm
by Kinsie
This has been suggested a couple of times. As I understand it, it'd be a gargantuan pain in the butt to implement in the Software renderer.

Re: Rotated wall textures

Posted: Wed Jun 13, 2018 8:51 pm
by Rachael
Like with what Kinsie said, the software renderer renders wall textures and sprites by column, which is how textures are stored internally anyway, and does not have any concept of rotation. It's doable to implement something like this but it comes with some caveats:

1) We do not know the actual performance impact of it, it may be hugely significant
2) It will require rewriting a multitude of drawers. Take this list - then duplicate twice for having both a truecolour and 2 sets of drawers for the 8bit renderer since it has two blending techniques: swizzled and algebraic, and that's the number of drawers that have to be recalculated and tested.

... and that might not even be all of it.

So - my question is (@ anyone interested in coding this) - do you have some spare time for this or not? :)

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 12:07 am
by RockstarRaccoon
Gee... I guess I'll have to see how difficult it is when I get around to the alignment stuff... I don't think I'll have the time or patience to implement it correctly in software though...

And you're sure all of those renderers will need ongoing support? Even the 8-bit one which makes it look like vanilla Doom?

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 12:27 am
by Graf Zahl
It's not only a gargantuan pain to implement in the software renderer but also requires some major changes to the hardware renderer as well. It's not something that can 'just' be plugged in. The entire wall renderer was written with the assumption that textures are unrotated.

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 4:02 am
by Rachael
RockstarRaccoon wrote:And you're sure all of those renderers will need ongoing support? Even the 8-bit one which makes it look like vanilla Doom?
The software renderer isn't being deprecated overnight just for your own convenience for crap like this. Don't even suggest it.

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 4:21 am
by Graf Zahl
But the software renderer does not support all engine features anyway - just remember sloped 3D floors. If it was doable to implement this in a simple fashion I wouldn't hesitate, but it actually requires a bit more work - in particular that'd be work I'd postpone until I got Vulkan running somewhat robustly.

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 4:22 am
by Rachael
That's true, I misinterpreted what she was suggesting as a complete removal. The software renderer doesn't need a feature like this right away.

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 11:20 am
by zrrion the insect
Would skewed textures, which would only involve offsetting columns, be easier to implement?

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 11:27 am
by Graf Zahl
No. For both some handling for texture matrices needs to be present. Currently that's only the case for flats.

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 11:46 am
by Nash
zrrion the insect wrote:Would skewed textures, which would only involve offsetting columns, be easier to implement?
That wouldn't even look good IMO... why settle for a cheap workaround when the engine would be better off doing rotation for real. :mrgreen:

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 11:49 am
by Graf Zahl
Sometimes skewed textures make sense - imagine the wall in a sloped corridor.

Re: Rotated wall textures

Posted: Thu Jun 14, 2018 2:41 pm
by Gez
I remember there was a very old feature suggestion thread for skewing textures, so there was demand for that specifically. And it definitely can look better than rotated. Allow me to illustrate:

Image