micdoodle8 / Galacticraft

An advanced Space Dimension Mod for Minecraft
Other
617 stars 334 forks source link

[1.11.2] build 80 - minor problems using with [Vivecraft 3D] #2675

Open fayer3 opened 7 years ago

fayer3 commented 7 years ago

I tested Vivecraft 9r1 with Galacticraft and run into some Problems:

  1. when entering a rocket the camera changes to 3rd person view (I once kept the 1st person view, but I don't know why)
  2. when opening the galaxy map it messes with the rendering of the left eye: screenshot_thu_may_04_17-18-50_2017_vr
  3. after launching a Rocket when the planet selection GUI opens there is no cursor (items are selectable)
  4. when braking the rocket the camera doesn't switch back to 1st person view. It only switches back when right clicking

all tested in creative mode tested with: Galacticraft 1.11.2 build 80 Vivecraft 1.11.2 9r1 Forge 1.11.2-13.20.0.2282 (required by Vivecraft) Optifine 1.11.2 HD U B5 (required by Vivecraft) jei 1.11.2-4.3.3.270

I also reported this to the vivecraft devs https://github.com/jrbudda/Vivecraft_111/issues/46

radfast commented 7 years ago
  1. is a duplicate of #2405, please do a search before posting.

(Vivecraft is an easy and obvious term to search for...)

There is a config setting which you can use to disable this zoom and third person rocket view when using Vivecraft, look for the config:

Disable Vehicle Third-Person and Zoom

  1. Looks like a Vivecraft issue, the issue is rendering the world behind the Galaxy map not in the Galaxy map. (If it's a Galacticraft issue then why is it affecting only one eye?) Probably a GLState issue.

  2. Again probably a Vivecraft issue, maybe another GLState issue like the state is not what we're expecting it to be when we start rendering the GUI and the cursor

  3. That one sounds like a Galacticraft issue. Please explain how you're breaking the rocket? Are you inside the rocket and hitting your own rocket from the inside?

radfast commented 7 years ago

I'm happy to work with Vivecraft developers on anything needed on our side to help fix 2 and 3, but I'm going to need them to tell me exactly what needs fixing on our side. I don't have HTC Vive to test this at all...

fayer3 commented 7 years ago

Regarding 1.: I'm sorry, I thought the game would automatically detect Vivecraft, I must have missed that it needs to be configured in the config. With that config set to true the camera works perfectly.

Regarding 4.: Yes I hitted the rocket from inside until it broke. I just tried all ways of getting out of the rocket:

I also noticed, that if exiting the rocket by breaking it or shift clicking the player takes damage.

fayer3 commented 7 years ago

I just wanted to play survival and noticed, that since build 82 the inventory tabs are not shown, the inventory is not useable and there are some graphical glitches on the left eye: water not drawn, entities parts flying above the players head: screenshot_thu_may_11_19-50-45_2017_vr screenshot_thu_may_11_19-51-22_2017_vr

fayer3 commented 7 years ago

regading 2: it looks like reenabling the glDepthMask at the end of setBlackBackground() https://github.com/micdoodle8/Galacticraft/blob/MC1.11/src/main/java/micdoodle8/mods/galacticraft/core/client/gui/screen/GuiCelestialSelection.java#L2241 fixes this problem. Is there a reason why the glDepthMask is kept disabled?

radfast commented 7 years ago

Thank you! No reason, probably an oversight. I'll test that now without Vivecraft and if it works OK, we can make that change.

Some of the issues you're seeing here may be simply Optifine / Galacticraft compatibility. Optifine is a big pain to work with because they don't publish their source code. We are seeing what we can do, but it will happen slowly.

Two changes were made in build 82:

  1. Inventory Tab now uses GLStateManager and this

  2. The render layer order for the player model was changed to be more like vanilla

I don't see how (2) can have affected the inventory tabs, so this is likely to be caused by (1).

fayer3 commented 7 years ago

After some trial and error with the source code it looks like https://github.com/micdoodle8/Galacticraft/commit/e45e658a7bfcf3022ee532317232a27b41e1ad5a causes the non working tab. With that this error is thrown while the inventory is open: [22:44:02] [Client thread/ERROR]: ########## GL ERROR ########## [22:44:02] [Client thread/ERROR]: @ post 2d [22:44:02] [Client thread/ERROR]: 1283: Stack overflow

radfast commented 7 years ago

Thank you, this is very helpful. I'll look at this next and maybe we can fully resolve this.

radfast commented 7 years ago

The Celestial Selection depthMask causes no issues, so that fix is in. Still looking at the inventory tab, that one is tougher...

UPDATE: I can't find the cause of the GL ERROR, maybe because Vivecraft also wants to modify the LayerHeldItem. So for now I've just disabled this Galacticraft item-render-suppression mechanism if the Vivecraft config (disable vehicle 3rd person view) is set.

Anyhow the item-render-suppression in rockets is not really needed unless you're looking at the rocket in 3P view.

radfast commented 7 years ago

Please try new build 91 and see if that fixes all of this? You'll need to set the config to true, I'm sure you did already.

fayer3 commented 7 years ago

The inventory tab works now and the galaxy map doesn't cause visual glitches any more, but there is still no cursor, could be a vivecraft issue. I played some more now and noticed these additional issues:

  1. that the parachute is most of the time not activated when landing on the overworld.
  2. the rocked is disappearing mid-flight (maby connected to https://github.com/micdoodle8/Galacticraft/issues/2480 T?)
  3. when flying with a rocket the overworld/sun is distorted screenshot_thu_may_18_11-36-30_2017_vr
radfast commented 7 years ago

Re-opening this for 5, 6, and 7. I have not succeeded in installing Vivecraft on my test machine so it's not possible for me to test these issues directly, I'm going to have to rely on your help here unless one of the other developers steps in.

5 Could it be this parachute issue is happening without Vivecraft also? This we can probably check. Which exact Galacticraft version are you seeing this in? Any specific conditions to reproduce, e.g. parachute already equipped / not-equipped when you enter the dimension, height when it happens, 1P or 3P view?

6 Does this happen every time you take a rocket? 1st person or 3rd person view or both? is there a specific y= height when it happens? all tiers of rocket? overworld only or all dimensions? Any GL errors, does it depend on what the player is wearing/equipping, rocket tilt, etc?

7 This is likely connected with the Optifine issue #2084, that pale blue sky in your screenshot looks similar. Please explain what you mean by "distorted", could it be some kind of depth / perspective issue? The z-depth at which we render the Sun and the Overworld is a bit weird - shorter than you might expect - this is so that it will show up even for 2D players who have set short render distances, though there can still be artifacts or non-rendering if the render distance is 4 chunks or less.

fayer3 commented 7 years ago

I tested all of these on the new build 1.11.2-4.0.0.91-BETA regarding 5: It does not happen with only Galacticraft. All i do is the following:

regarding 6: happens every time 1st or 3rd person. It starts at height ~250 and is dependent on the view direction. The higher the payer is it is more likely that the rocket gets invisible. At height ~250 it only gets invisible when looking upwards, at height ~700 it is also invisible when looking downwards. happens with all rockets, tested on overworld, no GL errors, only depends on the players view direction.

regarding 7: could probably be the short z-depth. It looks like it is on an other z-depth than the clouds. With distorted I meant, that if the player tilts his head the overworld/sun looks more like a Parallelogram like in the previous picture, the overworld should align to the clouds.

here is a video: https://www.youtube.com/watch?v=VvwbtnXoiug

I also noticed, that when rotating the rocket the arms rotate with the rocket. in the tier 3 rocket the player starts rotated ~45 degrees. (in video at 0:15)

radfast commented 7 years ago

Thanks for this extra info. I'm not sure how easily we can fix 7, the rendering seen there is a complex mixture of Galacticraft, Optifine and Vivecraft. You're welcome to have a poke around yourself with SkyProviderOverworld as it sounds like you know what you're doing!

Regarding 6, from your video it looks like this is a frustum check issue. Maybe it is related to T like you said ... T is connected with the vanilla render engine only attempting to render entities if some part of the entity's chunk (more specifically, the sub-chunk segment with size 16x16x16) is inside the frustum. In vanilla, above y==256 the rendering of entities still works (vanilla treats every entity above y==256 as still part of the topmost segment of the chunk - so above 256 is the same as being at 255 - and renders the higher entities if any part of the chunk above y == 240 is on screen). It looks like Optifine (or Vivecraft?) is changing that and cutting off the "is the chunk in the frustum" check at y==256, somebody forgot that players and other entities can be higher up than 256. I think that's the most likely cause here. If it is that, then it's not us causing this and we can't really do anything about it - I'm not aware of any way to force an entity to be rendered in the game world if the render engine doesn't want to render it. It's an issue Optifine (or Vivecraft?) needs to fix...

Regarding 5, I noticed your player died in the video. Are you saying that this is more than just a rendering issue, you didn't have a parachute at all, not even an invisible parachute, even though a parachute was equipped in the inventory slot? Or it's a render issue only?

fayer3 commented 7 years ago

regarding 5: the parachute does not activate even if equipped. The player falls like he has non. Maybe re equipping would activate it, I need to test that.

edit: I can't test the re equipping currently, because the inventory is hardly useable, with vivecraft, when falling. After some testing the parachute does activate when travelling from an other planet to the overworld. it only does not activate when travelling from overworld -> overworld.

edit2: looks like the Celestial Selection depthMask didn't fix the problem completely. There are sometimes still issues: screenshot_fri_may_19_13-35-15_2017_vr

radfast commented 7 years ago
  1. the rocket is disappearing mid-flight

I'm seeing this in standard Galacticraft (no Vivecraft) also, with a Tier 1 Rocket - but strangely Tier 2 and Tier 3 Rocket seem OK.

parachute only does not activate when travelling from overworld -> overworld.

Again seems likely to be an issue in standard Galacticraft, testing now.