How to make texture tile seamlessly in circle sector?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

How to make texture tile seamlessly in circle sector?

Post by Nash »

I have a perfectly circular texture which I created via GZDoomBuilder's "Ellipse Drawing" tool. I have made sure to make the horizontal and vertical distance 1024, and created a 512x512 texture which SHOULD tile perfectly... but it isn't. :/
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How to make texture tile seamlessly in circle sector?

Post by Gez »

You mean, wall texture? Remember the formula for a circle's perimeter is diameter times pi. So with 1024, you have a perimeter of approximatively 3217 units, give or take a few as dictated by the lack of precision of the sector compared to an ideal circle.
User avatar
ReX
Posts: 1584
Joined: Tue Aug 05, 2003 10:01 am
Location: Quatto's Palace
Contact:

Re: How to make texture tile seamlessly in circle sector?

Post by ReX »

If your circle's circumference is not a multiple of the texture length (in this case, 512), then you can insert a suitable texture in between to hide the texture-tiling problem. For example, use SUPPORT3 in the middle of SP_HOT1. I know this does not properly solve your problem, but there's no other way to prevent the "seam" from forming on a wall whose length is not a multiple of the texture.

Another way to do this, is to adjust the radius of the circle so that the circumference becomes an exact multiple of the texture length. This could result in your horizontal and vertical linedefs not falling on one of the grid lines, but this may not be important to you.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How to make texture tile seamlessly in circle sector?

Post by Gez »

With a diameter of 978 map units, you get a perfect circumference of approximatively 1024*3.
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How to make texture tile seamlessly in circle sector?

Post by Nash »

The formula that Gez posted solved my problem.

... except I had to abandon the thing I was trying to do when I made this post. I'll just explain here.

I was trying to replicate Skyrim's skybox, based on my observations anyway. The circular sector would have drawn a side-scrolling cloud texture, and then a translucent 3-d floor would have drawn the flat sky. It had to be a 3-d floor because there was going to be 2 layers of "flat" clouds, and stars would have been drawn behind (above) the 3-d floors.

It was all in vain when I found out that GZDoom can't render 3-d floors with smooth alpha textures. Probably related to polygon sorting issues with the renderer, the same reason we can't have model textures with smooth alpha or sloped translucent 3-d floors.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How to make texture tile seamlessly in circle sector?

Post by Gez »

Have you tried with [wiki]portal[/wiki]s?
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: How to make texture tile seamlessly in circle sector?

Post by NeuralStunner »

Gez wrote:Have you tried with [wiki]portal[/wiki]s?
"Gez Johnson here..." :P
SuperCrazyMan
Posts: 43
Joined: Sat Mar 03, 2012 6:18 pm

Re: How to make texture tile seamlessly in circle sector?

Post by SuperCrazyMan »

Gez wrote:Have you tried with [wiki]portal[/wiki]s?
Doesn't work either, unfortunately.
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How to make texture tile seamlessly in circle sector?

Post by Nash »

Last I messed with portals in skyboxes, it HOM'd like nobody's business. Anyway, I doubt it woud work anyway since I needed to use textures with smooth alpha (in other words, a 24 bit PNG with alpha) and that's just not going to work for flats.

I would have also just used a sky dome model but, again, transparency issues.
User avatar
Minigunner
Posts: 754
Joined: Mon Dec 28, 2009 5:13 pm

Re: How to make texture tile seamlessly in circle sector?

Post by Minigunner »

HIRESTEX (old format) has "force32bit", I believe. E.G. "define <graphic> force32bit <width> <height>"
Also, there's the CopyAlpha render style in TEXTURES.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: How to make texture tile seamlessly in circle sector?

Post by Graf Zahl »

Minigunner wrote:HIRESTEX (old format) has "force32bit", I believe. E.G. "define <graphic> force32bit <width> <height>"
Also, there's the CopyAlpha render style in TEXTURES.

That won't help here. Apparently for flats the alpha threshold which is needed to render textures with fully transparent part is not switched off if the texture itself contains alpha.
User avatar
Nash
 
 
Posts: 17503
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How to make texture tile seamlessly in circle sector?

Post by Nash »

So is this a bug? Can it be fixed?
Locked

Return to “Editing (Archive)”