Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
mgr_inz_rafal

Problem with PolyObj textures

Recommended Posts

Posted (edited)

Hi!

I just stumbled upon the following problem with PolyObj textures. The same happens with software renderer. This polyobject is created identically to hundreds of other I've created in the past... How to debug that?

 

GZDoom 3.3.2.0.

 

 

Share this post


Link to post

Had to watch that video three times before I could figure out what I think is happening. Being on mobile sucks.

 

Anyway, first, I have to say that's a slick poly object, the absolute coolest I've ever seen.

Now, it looks like the textures' vertical alignment changes about every 16 or 32 units, which can happen on poly objects if the ceiling (or floor, if lower unpegged) height changes while the object is moving.

So if the round sector isn't a single sector with a singular floor and ceiling height, it can cause the textures to "bounce" like that when it moves.

 

Beyond that, it's too hard for me to tell what might be the problem.

Share this post


Link to post

I wonder if Lower Unpegged would help. I've never used a poly object, so I could be way off base, but sometimes, the answer is something that simple.

Share this post


Link to post

Is the problem you are describing that the textures bounce?

Share this post


Link to post
Posted (edited)

@mgr_inz_rafal Educated guess, your polyobject is too close to the surrounding sector. As a polyobject moves into new (sub-)sectors, its segs get rebuilt to match the new area. Your polyobject is so close to the surrounding sector that its segs are actually moving into it as the lines that form it do not form a perfect circle. This causes the texture area to shrink due to the different floor and ceiling heights. You will need to increase the gap so there's no overlap as the polyobject rotates.

Edited by Edward850

Share this post


Link to post
56 minutes ago, Edward850 said:

your polyobject is too close to the surrounding sector.

 

Can you let polyobjects describe a smooth circle around a point not part of the polyobject itself? Would love to see how that is done.

 

I'm guessing you can't, and the player is actually standing inside a polyobject construction with the outer part forming the rotating wall. In that case it rotates around its center, located in the middle of that room. And since this room has floor/ceiling height variations, the whole construction 'wobbles' as a result.

 

Try level all the ceilings to same height, and upper peg your polyobject textures. Add ceiling height variations with a portal. Or vice versa with the floor, if that's more convenient.

Share this post


Link to post
Posted (edited)
45 minutes ago, Mordeth said:

Can you let polyobjects describe a smooth circle around a point not part of the polyobject itself?

Not in Doom, no. That requires curved geometry, not even GZDoom has that. Any construct that is not a proper circle that overlaps a similar non-circle object mathematically must overlap at a point of its rotation if the outer objects smallest radius point does not exceed the furthers point of the inner object.

Simplest way to visualize this is two squares. Their lines quickly overlap as your start rotating the larger square if said square is not at least 50% larger than the smaller square.

Edited by Edward850

Share this post


Link to post

That's not really what I meant, Edward850.  Polyobjects have the following actions associated with them: move in a particular direction, move to a mapspot, or rotate around its own center. The "_OR_"  variants are not additive, merely override an already moving polyobject with a new instruction.  So, as far as I know, you cannot let a polyobject move in a smooth circle around a virtual point elsewhere (in this case, move in a smooth circle around a virtual center in the middle of that room).

 

So my guess is that the moving wall we see in that video is just the visible textured part of a bigger polyobject, whose center lies in the middle of that room, and movement is done by rotating the polyobject by a certain degree.

 

 

Share this post


Link to post
Posted (edited)

You've forgotten that anchor points don't need to be on the polyobject itself, they are independent. If you move an anchor point off center and rotate the polyobject, it will appear to circle around its anchor rather than at a point. It's like how rotating doors work, except the anchor is even further into the distance. What this person has done is actually not really all that hard or complex, his issue is entirely just because the polyobject is overlapping the inner area as it rotates, and the dynamic segs are constantly changing sector heights as a result, resulting in the bouncing textures. He just needs to push the lines out a bit and prevent it clipping into the inner area.

Edited by Edward850

Share this post


Link to post
8 minutes ago, Edward850 said:

You've forgotten that anchor points don't need to be on the polyobject itself, they are independent.

 

O my... Well, that certainly solves some issues quite nicely... ;)

Share this post


Link to post

The skullface laughs at you as the polyobject train turns around.

Share this post


Link to post

Thank you all for suggestions, at least I know what to look at. I'll check it out during the weekend.

 

I tested this polyobject before the room has been detailed and it worked correctly, so maybe once I added details the geometry changes introduced the bug.

Share this post


Link to post
Posted (edited)

Yes, so that was indeed a problem with polyobject crossing multiple sectors with different heights. Since I don't want to move the carefully crafted sectors shapes I will fix the sector heights. Similarly, the brightness levels in all affected sectors should be the same to prevent blinking.

 

On the video you can actually see that polyobj moves "through" the wall; pay attention when I stare at the corner how the wall wobbles.

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×