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

Body Harvest Clipping Issue #550

Closed
theboy181 opened this Issue May 23, 2015 · 26 comments

Comments

Projects
None yet
8 participants
@theboy181

theboy181 commented May 23, 2015

This game works fine in AL RDP, but you clip through walls in GLideN64..

Not sure if this has been brought up before, I think the emulator has always been blamed int he past.

@AmbientMalice

This comment has been minimized.

Contributor

AmbientMalice commented May 24, 2015

It's colour-buffer related, to my knowledge. Same underlying problem as Pokemon Snap. It would be nice to see the problem solved.

@theboy181

This comment has been minimized.

theboy181 commented May 24, 2015

Are there any articles to support that?

@purplemarshmallow

This comment has been minimized.

Contributor

purplemarshmallow commented May 26, 2015

It can be colour-buffer related because filling it with white color fixed the subscreen delay in Zelda OOT. And it is believed that it's the same problem. But nobody seems to know for sure.

@AmbientMalice

This comment has been minimized.

Contributor

AmbientMalice commented May 26, 2015

I don't have any documentation on hand. But, for example, Pokemon Snap uses the colour buffer to detect whether you're looking at a Pokemon. But for some reason, very little study has gone into figuring out how Body Harvest calculates collision.

@theboy181

This comment has been minimized.

theboy181 commented Jun 18, 2015

Could Gliden64 share the same bug?
https://dolphin-emu.org/blog/2015/06/01/dolphin-progress-report-may-2015/
The Depth Divisor and its Farfetch'd Solution. This may be how the depth is calculated for collision in this game too?

@olivieryuyu

This comment has been minimized.

olivieryuyu commented Jul 12, 2015

dunno

what you can see how the framebuffer is used in game. interesting

@olivieryuyu

This comment has been minimized.

olivieryuyu commented Jul 26, 2015

how fill color could help to calculate collision. Very odd

@olivieryuyu

This comment has been minimized.

olivieryuyu commented Aug 10, 2015

i analyse the rom and i can see something odd:

sans titre

is there some kind of check that all data are always correct in ram? in case of errors, the game goes crazy.

It is as well odd to see that with Glide64, with or without fb on, glide64 have different bugs, as if reading the memory of the emulated N64 had on impact on the behavior of the plugin.

The worst being with Nemu plugin: it blocks at the very beginning of the first level, when other can go through.

It seems like a self code checkings.

@AmbientMalice

This comment has been minimized.

Contributor

AmbientMalice commented Mar 23, 2016

I have a theory that for whatever reason, the game thinks the buildings are destroyed. Damaged buildings lose their collision in Body Harvest. What is especially interesting is that if you boot Body Harvest with a normal plugin, then switch to Angrylion's, the collision stays broken. But if you boot with Angrylion's, you can switch to another plugin and it works for a while. So my theory is that the game writes the status of each object into a buffer area or something.

@LegendOfDragoon

This comment has been minimized.

LegendOfDragoon commented Dec 21, 2016

iirc it's generated in the z-buffer. The calculations need to be accurate and it involves coverage. Easiest method I can think of, is to do it in software, but not sure how much overhead that would have.

@AmbientMalice

This comment has been minimized.

Contributor

AmbientMalice commented Feb 1, 2017

@Frank-74

This comment has been minimized.

Frank-74 commented Jun 6, 2017

@theboy181
This can be closed I think.

I played through Body Harvest using Software Depth Buffer. Well, I got upto the end of America without any clipping issues. I completed Greece and Java, found America level a bit of a pain and gave up.

But it's fully playable now.

@theboy181

This comment has been minimized.

theboy181 commented Jun 6, 2017

Are the settings now included in the ini?

@theboy181 theboy181 closed this Jun 6, 2017

@loganmc10

This comment has been minimized.

Contributor

loganmc10 commented Jun 6, 2017

Software depth buffer is the default now, so Body Harvest works with the default settings

@theboy181

This comment has been minimized.

theboy181 commented Jun 6, 2017

I guess a new thread needs to get started stating that the software mode needs improvement. Are there still issues ?

@loganmc10

This comment has been minimized.

Contributor

loganmc10 commented Jun 6, 2017

@olivieryuyu

This comment has been minimized.

olivieryuyu commented Oct 9, 2017

interestingly it seems that this issue was somehow fixed by using G_CULL_FRONT instead of G_CULL_BACK for the depth buffer before b6c6ac0. Not sure what is related between G_CULL and depth buffer but there can be a link.

@Frank-74

This comment has been minimized.

Frank-74 commented Oct 10, 2017

Body Harvest clipping only works properly with G_CULL_BACK, the change to FRONT is what broke it again.

@gonetz

This comment has been minimized.

Owner

gonetz commented Oct 10, 2017

G_CULL_BACK and G_CULL_FRONT are valid culling modes. N64 can use both.
I need to understand what goes wrong. I asked @LegendOfDragoon to help, since he
Investigated this issue, but I did not get any answer.

gonetz added a commit that referenced this issue Nov 15, 2017

Fix renderTriangles when polygon culling is disabled.
Fixed Body Harvest Clipping Issue #550
@gonetz

This comment has been minimized.

Owner

gonetz commented Nov 15, 2017

@AmbientMalice

This comment has been minimized.

Contributor

AmbientMalice commented Nov 15, 2017

Seems fixed. And properly fixed, this time. AFAIK, the collision on these stairs were broken, but they seem fine now.
gliden64_body_harvest_000

@gonetz

This comment has been minimized.

Owner

gonetz commented Nov 15, 2017

As usual, it wouldn't bad to test for regressions in other games.

@olivieryuyu

This comment has been minimized.

olivieryuyu commented Nov 15, 2017

finally this game is totally fixed! let's see indeed for regression.

@gonetz

This comment has been minimized.

Owner

gonetz commented Nov 15, 2017

finally this game is totally fixed

There was also a bug with map transition effect.

gonetz added a commit that referenced this issue Nov 18, 2017

Fix renderTriangles when polygon culling is disabled.
Fixed Body Harvest Clipping Issue #550
@olivieryuyu

This comment has been minimized.

olivieryuyu commented Dec 1, 2017

can it be closed?

@gonetz

This comment has been minimized.

Owner

gonetz commented Dec 2, 2017

I think, yes. Original issues is fixed. It can be reopen in case of regressions.

@gonetz gonetz closed this Dec 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment