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

Overlapping rooms geometry produces visual artefacts #49

Closed
vvs- opened this issue Jun 2, 2015 · 13 comments
Closed

Overlapping rooms geometry produces visual artefacts #49

vvs- opened this issue Jun 2, 2015 · 13 comments
Labels
Milestone

Comments

@vvs-
Copy link
Contributor

vvs- commented Jun 2, 2015

This is visible over certain angles only, e.g. setgamef(1,7) setEntityPos(player,38335,45407,4352,275,0,0) or setgamef(5,1) setEntityPos(player,52875,42308,3584,65,0,0). By rotating the camera the artifacts disappear. It may be related to #40.

Here's a link to screen shots.

@TeslaRus
Copy link
Contributor

TeslaRus commented Jun 4, 2015

It is overlapping rooms conflict... I though about these bugs too and I have one idea, how to fix it, but will it be enough good solution: to add stencil test to room rendering?

@vvs-
Copy link
Contributor Author

vvs- commented Jun 4, 2015

You mean that it's caused by Z-fighting? Although, I'm not a specialist in CG.

@TeslaRus
Copy link
Contributor

TeslaRus commented Jun 5, 2015

In TR different rooms (not alternative) may have some shared space, it is not Z-fighting... In engine uses VBO and if room has only one active frustum, the whole room mesh will be rendered. If both overlapped rooms has active frustums than we can see described bugs.

@vvs-
Copy link
Contributor Author

vvs- commented Jun 5, 2015

Thank you for your explanation. So, it wasn't the primary reason here. Though, the fix could be quite similar I suppose.

@TeslaRus
Copy link
Contributor

TeslaRus commented Jun 6, 2015

I add stencil frustum test in commit 3be9b71 + add some information to TR forum; TR3, map 13 (Area 51 map) looks better, but some glitches still exists (described in forum... but I found easy solution... heh...)

@vvs-
Copy link
Contributor Author

vvs- commented Jun 6, 2015

It was also on All Hallows level. Now all these artifacts seems to be fixed. I don't see any bad side effects except it's slower.

@vvs-
Copy link
Contributor Author

vvs- commented Jun 7, 2015

I was speaking too soon. Yes, there are problems now with frustums in Old Mill level and some others.

@TeslaRus
Copy link
Contributor

TeslaRus commented Jun 7, 2015

I test new system - it is really slow (fps drops to 30 on my old PC). I had add condition to use frustum test only with overlapped rooms. It reduce stencil test calls (fps increase).

@vvs-
Copy link
Contributor Author

vvs- commented Jun 7, 2015

Much faster and better now. But still a problem remains. At setgamef(5,10) setEntityPos(player,78222,46130,-5376,84,0,0) rotating camera to the left makes a pillar to disappear from view.

@TeslaRus
Copy link
Contributor

TeslaRus commented Jun 7, 2015

I check setgamef(5, 10) and setEntityPos(player,78222,46130,-5376,84,0,0) and must say one: why pillar are located in room 18 (where other pillars located, in left of Lara) instead room 86 where is pillar's really position!? Engine can't correctly render things that are located pretty incorrectly... It can be fixed only by new scripts functions and some level scripting. Level design surprise me... hehe...

@vvs-
Copy link
Contributor Author

vvs- commented Jun 7, 2015

Here's another: setgamef(1,1) setEntityPos(player,33909,74149,-2048,0,0,0), then rotate to the left. This one appeared after @cochrane recent VAO code merged in. I'm commenting here because it seems reasonable but may open separate bug if necessary.

This was referenced Jun 7, 2015
@vvs-
Copy link
Contributor Author

vvs- commented Jun 8, 2015

Seems that original bug is fixed now.

@vvs- vvs- closed this as completed Jun 8, 2015
@stohrendorf stohrendorf added this to the TR1 milestone Jul 1, 2015
@vvs-
Copy link
Contributor Author

vvs- commented Aug 2, 2016

Related to #367. It's arguable that OT frustums should work like this in Old Mill. There are incompatibilities in portals code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants