Jump to content

Transparency Issues


l33tmaan

Recommended Posts

I'm going crazy trying to figure out why these bottles aren't showing the liquid inside of it. I looked at the display case's shape for reference and as far as I can tell I have everything transparent, so why isn't there any water inside this thing? When I disable one of the faces I can see it's in there, it's just being blocked by this transparent texture... I'm very confused.

bottle1.JPG

glassbottle.json

Link to comment
Share on other sites

I played around with the display case in VSMC and I couldn't see through its glass either. My first suspicion is that's being handled in game via one of the block's json properties - namely

drawtype: "json" 

Maybe?  If not, it's most likely handled via the DisplayCase entity class.

Edited by Spear and Fang
Link to comment
Share on other sites

How would VSMC know that just from the shape file, though? I was able to get the contents to show up, but only by modifying the display case's shape. It even shows up in your hand properly!

bottle.JPG.852e19b26b30ae6adadc15cb95fc7517.JPG2021-03-20_09-40-43.jpg.9e8c3ca2b136ccf44d3da66f6df2aae4.jpg

The real fun starts when you place the bottle.
2021-03-20_09-40-55.jpg.70814bca6f9fac20292e1971d94f703c.jpg

Not only is it invisible, but if you start placing a bunch of them it starts to de-render other blocks. I had invisible trees and stuff. @jakecool19 has been talking to people on Discord trying to figure it out, but it may just be a bug in the game's rendering system. Here are the files if you want to take a look.

glassbottle.json bottle.json

Edited by l33tmaan
Link to comment
Share on other sites

@l33tmaan

Holy can 'o worms.  That's one big json file!

I've made some progress on this, but I've hacked and slashed things to pieces so I'll just comment on some things that I believe to be true:

1.  The model - Changing the Render Pass on the liquid cube back to default seemed to solve the biggest issue causing that big old rendering bug  

2. The json - this is duplicated so it can be removed

   "sidesolid": {
        "all": false
    },

3. The json - I'd be a little nervous/reluctant to use dashes in my variant groups i.e. "treesyrupportion-birch", since dash is the separator between variant groups.  It might work aok, but if for example you or Jake wanted to write code based on those later, it could be a pain.
 

Edited by Spear and Fang
Link to comment
Share on other sites

One other thing before I forget - I've got z-fighting between the bottom of the bottle and the ground.  I'd probably just move the bottle up a smidge, or of course you could deal with that in the json (via sidesolid and/or sideopaque).

Here's a small sample with the model moved up a bit and the textures overridden.  Needs some work 

Untitled.png.b36acf5d4fce6c00ea489cc24c521bbd.png
 

Edited by Spear and Fang
Link to comment
Share on other sites

1 hour ago, Spear and Fang said:

@l33tmaan

Holy can 'o worms.  That's one big json file!

I've made some progress on this, but I've hacked and slashed things to pieces so I'll just comment on some things that I believe to be true:

1.  The model - Changing the Render Pass on the liquid cube back to default seemed to solve the biggest issue causing that big old rendering bug  

2. The json - this is duplicated so it can be removed

   "sidesolid": {
        "all": false
    },

3. The json - I'd be a little nervous/reluctant to use dashes in my variant groups i.e. "treesyrupportion-birch", since dash is the separator between variant groups.  It might work aok, but if for example you or Jake wanted to write code based on those later, it could be a pain.
 

Thank you so much Spang, the liquid thing fixed the bug!

  • Like 1
Link to comment
Share on other sites

7 hours ago, jakecool19 said:

Thank you so much Spang, the liquid thing fixed the bug!

You bet!  Not sure how far you want to take this, but you *could* apply a waterwave effect to the liquid part of a model (that's how I animated my fish fins), or apply particle effects to the liquid in the bottle.  Alternatively, the liquid in the bottle could be an entirely separate model and you could overlay the bottle and liquid models ontesselation/onrender, in which case you could probably change the render pass back to liquid without things sh*tting the bed.  Just spit-balling, since you clearly have the mad skills to make it happen.

  • Mind=blown 1
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.