Duke4.net Forums: Eduke32 flipped models not showing correctly - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Eduke32 flipped models not showing correctly

User is offline   Mark 

#1

If I point at a 3d model in Mapster and press F to flip it, things are fine. But when I load eduke32 the model displays as if I didn't flip it.

I went to check in an older project using an eduke32 from 2018 and it displays properly flipped.

Since there probably aren't a lot of commits dealing with models will you be able to spot the possible revision in the GIT logs or will I have to bisect to find the exact revision?

EDIT: Further tesing revealed that only models that are actors refuse to flip in eduke32.

This post has been edited by Mark: 19 September 2021 - 11:19 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#2

View PostMark, on 19 September 2021 - 11:05 AM, said:

EDIT: Further tesing revealed that only models that are actors refuse to flip in eduke32.


You probably have code in your CONs that is setting their cstat, which would override the cstat setting in mapster.
1

User is offline   Mark 

#3

Its not my code but that could be the case. I will forward that info to our coder.

Thanks.

This post has been edited by Mark: 19 September 2021 - 12:47 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#4

View PostMark, on 19 September 2021 - 12:41 PM, said:

Its not my code but that could be the case. I will forward that info to our coder.

Thanks.


Also, regardless of whether there is CON code doing it, CON code could prevent the flipping because you can save the cstat in EVENT_LOADACTOR and then apply it at level start if there is hardcoded fuckery changing it.
1

User is offline   Reaper_Man 

  • Once and Future King

#5

No cstat is being set/changed in code. Outputting the cstat, both within the actor and in events like WORLD and GAME, output an expected value of 4, but visually it is not flipped.

Dumping the map using dndebug and loading debug.map shows it's still correctly set within Mapster.

Attached Image: awol0006.png
Attached Image: capt0003.png

I did more debugging, the model plays an animation via action and when I disable this it displays flipped like normal. I'm confused by this behavior, I was expecting models to obey this the same way sprites do, so am I not properly triggering the animation of the model? Basically we have a prop/detail model that should play an animation, but mappers should be able to place this and X-flip it if necessary.

Do I need to have 2 separate models/animations depending on if the model is X-flipped? Is there a missing step to get the animation played via action to obey the cstat?

The code for the whole actor is as follows:

useractor notenemy DOORKNOB
{
	ifaction 0
		action A_DOORKNOB //static animation
	else
	ifaction A_DOORKNOB
	{
		ifpdistl 768
			ifp pfacing
				ifhitspace
		{
			action A_DOORKNOB_JIGGLE //jiggle animation
			soundonce DOORKNOBJIGGLE
			resetcount
		}
	}
	else
	ifaction A_DOORKNOB_JIGGLE
	{
		ifcount 30
		{
			action A_DOORKNOB
			resetcount
		}
	}
}
enda

0

User is offline   Danukem 

  • Duke Plus Developer

#6

In your action definition make sure it uses a view angle setting of 1. If you have the view angle set to any of the pseudo-3D settings this prevents x-flipping from working since the view angles are designed to already flip sprites at certain angles (basically its a hardcoded safety measure).
0

User is offline   Reaper_Man 

  • Once and Future King

#7

No dice I'm afraid. The action defs were already minimal:

action A_DOORKNOB			0
action A_DOORKNOB_JIGGLE	1


But explicitly adding the full declaration with viewtype 1 to them didn't have any effect. I tried other viewtypes as well, and just different action settings in general, to no avail.

Someone suggested the model needs to be wall aligned (which seems like superstition IMO) but that also had no effect.
0

User is offline   Danukem 

  • Duke Plus Developer

#8

I guess its an eduke32 bug then.
0

User is offline   Mark 

#9

Thanks for your time.
0

#10

I can't reproduce this with my usual test models (including those with animations, defined as actors).

Can you make a small test package that showcases the problem so we can debug this?

This post has been edited by Doom64hunter: 21 September 2021 - 11:42 AM

0

User is offline   Reaper_Man 

  • Once and Future King

#11

Here you go, all of the code is in eduke.con. You can reproduce this in a fully vanilla Duke so it's not any other non-vanilla code interacting. The eduke32.exe in here is slightly older but it's been tested on the most recent version as well.

Attached File  test_duke.7z (2.7MB)
Number of downloads: 182

Here is the model with the code removed:
Attached Image: duke0000.png

And with the code added:
Attached Image: duke0001.png

I'm sure this is something on our side and not an engine bug, but I'm really scratching my head on this one.
0

User is offline   Mark 

#12

I messed with it for a while. I ended up commenting out everything inside the state except the first "action" line and the model would not stay flipped in game. So as far as I can tell, "action" initiates the flipping problem. It is present as far back as Jan of 2016. I didn't bother checking further. I have no idea if any of this was relevant but figured I would post it.

This post has been edited by Mark: 21 September 2021 - 08:49 PM

0

User is offline   Mark 

#13

View PostDoom64hunter, on 21 September 2021 - 11:41 AM, said:

I can't reproduce this with my usual test models (including those with animations, defined as actors).

Can you make a small test package that showcases the problem so we can debug this?
Have you had time to check out our test package?
0

#14

View PostMark, on 04 October 2021 - 07:04 AM, said:

Have you had time to check out our test package?

Sorry, I was busy with work on Fury.

Bisection indicates that this is a very old problem, likely going back to when model support was first introduced into eduke32.

Further testing shows that the model flipping only works if the actor's action is set to the literal '0'.
0

User is offline   Danukem 

  • Duke Plus Developer

#15

View PostDoom64hunter, on 07 October 2021 - 02:06 AM, said:

Further testing shows that the model flipping only works if the actor's action is set to the literal '0'.


It sounds like the workaround would be to make two different actors each with no action or action 0. A bit annoying to have to use two different tile numbers in the map editor just to have a flipped version, but doable.
0

User is offline   Mark 

#16

How would I trigger between the idle and animated frames without action?

Or would I have to make a duplicate of the model, one idle and one animated and then use something other than action.That would be a total of 4 versions of the same model. 2 for each direction it faces. I'm better off telling the mapper to make all his doors open from the same side. ;)

This post has been edited by Mark: 07 October 2021 - 02:05 PM

0

User is offline   Reaper_Man 

  • Once and Future King

#17

I went ahead and filed a bug report through gitlab. FWIW it appears they do obey cstat 8, so hopefully this is an easy fix.

Attached Image: duke0002.png
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options