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

Possibilities of this pack #3

Open
Camotoy opened this issue Mar 3, 2021 · 10 comments
Open

Possibilities of this pack #3

Camotoy opened this issue Mar 3, 2021 · 10 comments

Comments

@Camotoy
Copy link
Member

Camotoy commented Mar 3, 2021

Doable without issue?

  • Arrows stay stuck to player

  • Glowing effect

  • Skeleton firing animation

Requires Minecraft Java textures, but is probably doable:

Requires Minecraft Java textures, is probably doable, but would not be optional:

  • Furnace minecart and knowledge book items
@Kas-tle
Copy link
Member

Kas-tle commented Mar 3, 2021

Spectral Arrows:

  • Arrow Item
    • Currently not possible to implement at an inventory level, as the client cannot seem to recognize custom items as loadable into a bow
    • We would need some way of changing the icon used by vanilla items, which to the best of my knowledge, is not currently possible
    • In 210 we should be able to define some sort of attachable, so at least first and third person rendering can show it properly, even if the inventory cannot
  • Arrow Entity
    • This can likely be accomplished with a simple texture swap, as the arrow is simply an entity
    • We define an array in the arrow render controller and toggle between position 0 and 1 with a boolean flag that has no effect on arrow behavior
    • Glowing may also be possible, described further herein
  • Glowing Effect
    • It appears it may be possible to mimic some sort of glowing affect via a custom material that is visible through all other materials
    • At the moment I have no idea what I am doing when it comes to materials, and they're basically undocumented, so here's to searching with site:nvidia.com and trying to understand some unnecessarily dense documentation every time I don't know what a term means :/
    • It will likely adopt the form of:
{
  "materials": {
    "version": "1.0.0",
    //entity_emissive_alpha_spectral is the new material we are defining
    //we are inheriting the properties of the material entity_nocull
    "entity_emissive_alpha_spectral:entity_nocull": { 
      //we are defining an emissive material (USE_EMISSIVE) with transparency support (ALPHA_TEST)
      //we may be able to create an outline by defining LINE_STRIP... need to look into how this works a bit more
      //more info: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/drawElements
      "+defines": [
        "ALPHA_TEST",
        "USE_EMISSIVE",
        "LINE_STRIP"
      ],
      //we need these for LINE_STRIP
      "primitiveMode": "Line",
      "vertexFields": [{ "field": "Position" }],
      //we are ensuring that this material is always rendered
      //more info: https://developer.download.nvidia.com/cg/DepthFunc.html
      "depthFunc": "Always",
      //more info: https://developer.download.nvidia.com/cg/DepthBias.html
      "depthBias": 1000000000.0,
      //more info: https://developer.download.nvidia.com/cg/SlopScaleDepthBias.html
      "slopeScaledDepthBias": 0.1,
      //unsure of what these define... appear to be part of OpenGL, given the OGL suffix, but I cannot find usage outside Minecraft
      //based on the notes from NVIDIA, these might refer to some scaling to applies when Open GL is being utilized rather than DirectX
      "depthBiasOGL": 0.5,
      "slopeScaledDepthBiasOGL": 0.5
    }
  }
}

Addendum: Materials currently behave oddly on devices using the Render Dragon engine so we may need to wait until this stabilizes (assuming it ever does). I've heard that some materials can work if they are completely defined as a root material, as its primarily material inheritance that's broken on at the moment. Generally, we should avoid material-based solutions if possible since they are completely undocumented and subject to change at any time, though for this problem I do not see any other possible solution.

Furnace Minecart:

The icon for this is actually still present in the default resources, so I believe we can just pass a custom item using it's texture short name as minecraft:icon, minecart_furnace.

Sounds:

We'll need to define custom sound events that geyser can trigger... imo this should be optional, as audio will add quite a bit of bloat to the pack size. Alternatively, we should at least make it easy for an experienced user to use their own default pack.

@Kas-tle
Copy link
Member

Kas-tle commented Mar 9, 2021

Planned particle changes via this pack

Particles missing

  • minecraft:ash
  • minecraft:barrier
  • minecraft:bubble
  • minecraft:bubble_column_up - essentially interchangeable for bubble
  • minecraft:bubble_pop
  • minecraft:crimson_spore
  • minecraft:current_down - essentially interchangeable for bubble
  • minecraft:dolphin
  • minecraft:elder_guardian - apparently this is an entity on bedrock... elder_guardian_ghost
  • minecraft:flash
  • minecraft:landing_honey
  • minecraft:landing_lava
  • minecraft:landing_obsidian_tear
  • minecraft:nautilus
  • minecraft:underwater
  • minecraft:warped_spore
  • minecraft:white_ash

Particles requiring edits

  • minecraft:squid_ink
    • particle is too small
  • minecraft:totem_of_undying
    • minecraft:totem_particle technically equivalent but more numerous

@Kas-tle
Copy link
Member

Kas-tle commented Mar 9, 2021

Notes regarding player model materials

In order to bring player model materials in line with Java Edition, I believe we should use the material entity for the bottom layer and and entity_alphablend for the hat layer. Currently, player models use entity_alphatest, making it possible for a player to upload a skin that is fully transparent. This will only be seen if a player manually disables trusted skins (in a vanilla setting at least), but I still think that this change should be made, if nothing other than an anti-cheat measure. It will also allow those that use translucency in the hat layer of their skin, which is supported on Java Edition, to have that translucency displayed for Bedrock Edition players.

If this change is made, we will need to test on the beta versions as well, as at one point there were changes in the 210 series betas that prevented editing the geometry of the player model.

This issue was initially brought to my attention by LichLord91#3963

@Camotoy
Copy link
Member Author

Camotoy commented Mar 9, 2021

minecraft:falling_dust is more than likely an error on the Geyser side we can fix.

@zimzaza4
Copy link

zimzaza4 commented Apr 4, 2021

Will it support sweeping sword particles?

@Kas-tle
Copy link
Member

Kas-tle commented Apr 4, 2021

Will it support sweeping sword particles?

@zimzaza4 Yes, this is actively being worked on, as well as support for other missing particles. See #9. The implementation, however, will not be available until the Geyser fork for optionalpack is also merged.

@zimzaza4
Copy link

zimzaza4 commented Apr 4, 2021

Cool.

@zimzaza4
Copy link

zimzaza4 commented May 2, 2021

Can it display the player's head blocks?

@humematt190
Copy link

no

@Camotoy
Copy link
Member Author

Camotoy commented May 2, 2021

Can it display the player's head blocks?

No, this will not be addressed through this resource pack. That will be a separate "pack" that has to be built to include the player heads you wish to see.

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

No branches or pull requests

4 participants