Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor bug fixes (Senko) #15

Open
wants to merge 4 commits into
base: Senko
Choose a base branch
from

Conversation

FunnyShadow
Copy link

@FunnyShadow FunnyShadow commented Mar 3, 2024

First of all, thank you very much for making such a beautiful model !

I found that this model didn't work well on Figura 0.1.3+ and it didn't work well with First Person Model and Real Camera mods, after some consulting and learning I fixed both problems and they seem to work perfectly fine now!

Since GitHub can only create PRs for one branch at a time, I've created four PRs

This PR is the first PR to fix some problems with Senko branching.

These PRs might be able to fix some of the problems in the following two Issues (I don't really understand what's wrong with these two Issues due to the language barrier, sorry about that)

Special thanks to ZhuRuoLing for help on the Lua code!

@FunnyShadow FunnyShadow changed the title Some minor bug fixes Some minor bug fixes (Senko) Mar 3, 2024
@Gakuto1112
Copy link
Owner

Thanks for your pull request! I will review this later. However, I'm busy for another project that has a deadline, so it may takes long time to deal with it. I will do it as soon as possible. Thanks for your corporation!

@Gakuto1112 Gakuto1112 self-requested a review March 3, 2024 13:46
@Gakuto1112 Gakuto1112 self-assigned this Mar 3, 2024
@Gakuto1112 Gakuto1112 added the adaption For new Minecraft or Figura version label Mar 3, 2024
Copy link
Owner

@Gakuto1112 Gakuto1112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With your changes, Figura no longer emits errors. However, your change which fixes the problem with First Person Model and Real Camera doesn't seem to work. Can you fix this?

if context == "MINECRAFT_GUI" then
shouldRenderHead = true
end
models.models.main.Avatar.Head:setVisible(shouldRenderHead)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In these code, I think that you want to hide the head model in first person perspective with First Person Model or Real Camera. However, these code doesn't seem to work. Even if I checked with only Figura and First Person Model installed. Can you fix this?

2024-03-04_22 58 09

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retried it and it didn't have any problems

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick question, have you uploaded your model to Figura's servers before?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, you may need to reset your model and re-upload it first, otherwise it will be the old code model that is used

This comment was marked as outdated.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick question, have you uploaded your model to Figura's servers before?

I tested the avatar with your changes.
This is tested with the local avatar. (Actually, my global avatar is another one.) I think that this problem doesn't matter if the avatar is local or global.

This comment was marked as outdated.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I resolved this problem by hiding the head in OTHER context.

events.RENDER:register(function (_, context)
	models.models.main.Avatar.Head:setVisible(context ~= "OTHER")
end)

However, the shadow of the head isn't casted. This doesn't look good...

2024-03-05_11 24 09

This comment was marked as outdated.

This comment was marked as outdated.

@FunnyShadow
Copy link
Author

hmmmmmm, that's weird, this thing is working fine on my client, please wait, I'll check again

@Gakuto1112
Copy link
Owner

Which Minecraft version and mod loader (Forge, Fabric, etc.) are you using? Some minor things may be deferent depending on witch Minecraft version and mod loader you are using.

@Gakuto1112
Copy link
Owner

Another thing that I concerned is that the head of the avatar has gone in preview. Can you show it?

2024-03-05_10 51 24

@Gakuto1112
Copy link
Owner

The head problem seems to be occurred with First Person Model v2.3.4. This is no longer occurred if the mod is downgraded to v2.3.3. This may be the mod's problem...?

@Gakuto1112
Copy link
Owner

Gakuto1112 commented Mar 5, 2024

I submitted this issue to First-person Model repository.
tr7zw/FirstPersonModel#431

@FunnyShadow
Copy link
Author

Which Minecraft version and mod loader (Forge, Fabric, etc.) are you using? Some minor things may be deferent depending on witch Minecraft version and mod loader you are using.

I'm using the latest version of Fabric (0.15.7), tested on both 1.20.2 and 1.20.4

@FunnyShadow
Copy link
Author

Another thing that I concerned is that the head of the avatar has gone in preview. Can you show it?

2024-03-05_10 51 24

I can't solve this one either, like the shadow one, because the context doesn't include this interface, so I can't exclude it

@FunnyShadow
Copy link
Author

FunnyShadow commented Mar 5, 2024

The head problem seems to be occurred with First Person Model v2.3.4. This is no longer occurred if the mod is downgraded to v2.3.3. This may be the mod's problem...?

Looks like it should be ....
I'll submitted this Issue to RealCamera, too.
xTracr/RealCamera#57

@FunnyShadow
Copy link
Author

Okay, I've added more context checks based on the developer's tips, and now the rendering in the shadow and Figura GUI should all be working correctly

@FunnyShadow
Copy link
Author

I also realized that RealCamera seems to come with some compatibility options and perspective shifting, so maybe this could be a direct solution to the head model rendering errors?

Copy link
Author

@FunnyShadow FunnyShadow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More context checking has been added, which should fix all the rendering issues this time around

if context == "MINECRAFT_GUI" then
shouldRenderHead = true
end
models.models.main.Avatar.Head:setVisible(shouldRenderHead)

This comment was marked as outdated.

if context == "MINECRAFT_GUI" then
shouldRenderHead = true
end
models.models.main.Avatar.Head:setVisible(shouldRenderHead)

This comment was marked as outdated.

if context == "MINECRAFT_GUI" then
shouldRenderHead = true
end
models.models.main.Avatar.Head:setVisible(shouldRenderHead)

This comment was marked as outdated.

if context == "MINECRAFT_GUI" then
shouldRenderHead = true
end
models.models.main.Avatar.Head:setVisible(shouldRenderHead)

This comment was marked as outdated.

@Gakuto1112 Gakuto1112 self-requested a review March 5, 2024 17:04
@Gakuto1112
Copy link
Owner

Okay. I will review your changes tomorrow. Good night.

Copy link
Owner

@Gakuto1112 Gakuto1112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the result of your code that you want me to try.

[lua] Vinny_san: Context:  OTHER  
[lua] Vinny_san : FirstPerson:  true  
[lua] Vinny_san : Head Visible  true  
[lua] Vinny_san : Context:  FIRST_PERSON  
[lua] Vinny_san : FirstPerson:  true  
[lua] Vinny_san : Head Visible  false  
[lua] Vinny_san : Context:  PAPERDOLL  
[lua] Vinny_san : FirstPerson:  true  
[lua] Vinny_san : Head Visible  true  
[lua] Vinny_san : Context:  OTHER  
[lua] Vinny_san : FirstPerson:  true  
[lua] Vinny_san : Head Visible  true  
[lua] Vinny_san : Context:  FIRST_PERSON  
[lua] Vinny_san : FirstPerson:  true  
[lua] Vinny_san : Head Visible  false  
[lua] Vinny_san : Context:  PAPERDOLL  
[lua] Vinny_san : FirstPerson:  true  
[lua] Vinny_san : Head Visible  true  

According this, the head of the avatar is hidden in FIRST_PERSON context. However, the head in first person perspective is controlled in OTHER context, so can you try if you can hide the head in OTHER context?

However, this causes another problem. As I said, the shadow of the head isn't shown if the head is hidden in OTHER_CONTEXT. Another solution is make the avatar transparent instead of hiding it, but in this case, some translucent objects like water and colored glass, aren't shown if the camera and the head are overlapped.

2024-03-06_11 27 33

According to the case that this problem is no longer occurred in First-person Model 2.3.3 or older, it may be caused by dependent mods. Waiting until it is fixed might be one of solutions.

@FunnyShadow
Copy link
Author

uhhhh, what other Mods did you use?
The first person avatar rendering actually relies on FIRST_PERSON to control it, and that log showing three actually means everything in the current context, because Figura doesn't seem to support expanding an array all at once, so it outputs them sequentially instead of in a single line.

@FunnyShadow
Copy link
Author

The reason I excluded OTHER from the list is because some other mods are influenced by it, such as the paperdoll feature in the Bedrockify mod.

@FunnyShadow
Copy link
Author

Normally, context ~= "FIRST_PERSON" and (not renderer:isFirstPerson()) should rule out other first person perspectives altogether, and I added renderer:isFirstPerson() here mainly because I realized that the RealCamera mod doesn't detect standard first person when rendering in first person, so it doesn't provide a FIRST_PERSON context.

@FunnyShadow
Copy link
Author

FunnyShadow commented Mar 6, 2024

As for the shadow issue, theoretically the context == "FIRST_PERSON_WORLD" and context == "WORLD" rules should take the shadow rendering part out of the equation, but due to my computer's performance I can't use shader packs to render out the shadows so I can't actually test it

Here are the names of all the contexts that can be used to recognize renderer patterns:
https://applejuiceyy.github.io/figs/latest/RenderModes/

@FunnyShadow
Copy link
Author

But now that it's fixed, I'll just revert that part of the commit? The author of the issue I submitted with RealCamera also gave me a solution to this problem.

@Gakuto1112
Copy link
Owner

uhhhh, what other Mods did you use?
The first person avatar rendering actually relies on FIRST_PERSON to control it, and that log showing three actually means everything in the current context, because Figura doesn't seem to support expanding an array all at once, so it outputs them sequentially instead of in a single line.

I tested it again with the following environment:

Item Version
Minecraft 1.21.4
Fabric Loader 0.96.4+1.20.4
Figura 0.1.4+1.20.4
First-person Model 2.3.4

No other mods are used for testing. However, the issue is still confirmed.

@Gakuto1112
Copy link
Owner

Gakuto1112 commented Mar 7, 2024

But now that it's fixed, I'll just revert that part of the commit? The author of the issue I submitted with RealCamera also gave me a solution to this problem.

Is the issue fixed? I still have confirmed the issue with First-person Model.

@FunnyShadow
Copy link
Author

hmmmmm, no fix?...Then maybe I misunderstood ()

@Gakuto1112
Copy link
Owner

There may be a discrepancy in our perceptions. The issue that we're discussing is the issue that the head of the avatar is visible in first person perspective with some mods that modifies behaviors in first person perspective, like First-person model and Real Camera. The expected behavior is that the head of the avatar should be hidden in first person perspective.

Is my thought correct?

2024-03-04_22 58 09

@FunnyShadow
Copy link
Author

There may be a discrepancy in our perceptions. The issue that we're discussing is the issue that the head of the avatar is visible in first person perspective with some mods that modifies behaviors in first person perspective, like First-person model and Real Camera. The expected behavior is that the head of the avatar should be hidden in first person perspective.

Is my thought correct?

2024-03-04_22 58 09

yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adaption For new Minecraft or Figura version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants