Jump to content

How to make a transparent element in model


trollworkout

Recommended Posts

width=800 height=435http://picpaste.com/pics/Screen_Shot_2016-10-18_at_7.06.01_PM-aiK53Npp.1476832329.png[/img]

 

How to make the water in the vat transparent?

 

Also this json is not working for the SPOUT model

 

{
    "textures": {
        "#0": "blocks/stone"
    },
    "elements": [
        {
            "from": [ 6.5, 7.0, -1.0 ], 
            "to": [ 9.5, 9.0, 3.0 ], 
            "faces": {
                "north": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 3.0 ] },
                "east": { "texture": "#0", "uv": [ 1.0, 1.0, 5.0, 3.0 ] },
                "south": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 3.0 ] },
                "west": { "texture": "#0", "uv": [ 1.0, 1.0, 5.0, 3.0 ] },
                "up": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 5.0 ] },
                "down": { "texture": "#0", "uv": [ 1.0, 1.0, 4.0, 5.0 ] }
            }
        }
    ]
}

 

 

 

Yes is like the Witchery Silver Vat. Is intentionally done that way I'm making a mod  that borrows ideas and mechanics from older and abandoned mods that will never see 1.10 or over.  My mod is completely different tho. I'm not cloning older mods.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

You need to override:

 


@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer() {
	return BlockRenderLayer.TRANSLUCENT;
}

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I made some progress. Now my water renders properly and animates like still water. The spout now renders as well.

 

When I break the block, however, is still showing transparent texture bits.

 

And I can see some weird glitches some transparent sides from elements are showing through the block. I need to make them completely invisible.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Set your particle texture to a different texture.

 

As for the faces rendering wrong, there might not be a solution.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Thanks for your help guys. Is getting better.

 

I had no particle texture set so I think that was the issue. Let's see if it works now.

 

Also I figured out I don't need to define faces that are hidden. I erased all faces that will never be seen. Seems to reduce the issue with transparent water + tinting a bit.

 

 

Tinting has some weird ass issues sometimes MC can't decide if water is in front or behind of the objects is tinting (or not tinting). Sometimes water would render on top of your blocks or items even the ones held in hand. Haha So random. But overall is wayyy better.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

The block layer translucent works 100% but the problem is I think it confuses the game because I only have one element that is translucent  the rest of the object is solid. I guess there is no way to define only parts of the model as being translucent.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

I guess there is no way to define only parts of the model as being translucent.

 

Not that I am aware of

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I think the glitches MAY be caused by depth testing. My bounding box seems to be inside my multipart spout element so it confuses the tinting engine.

 

I'll play around with moving spout higher or other system.

 

Yep CONFIRMED.

 

Seems like the TRANSLUCENT uses block bounding box to calculate depth difference. So if you butt two things against one another MC considers them to be colliding meaning is both IN and OUT of the translucent object at the same time. To fix this you need to put the bits you want outside out of the collision box of the object.

 

Making some bits transparent and some not creates a few weird ass issues like some sides may vanish or appear inside one another. There's no way to properly make a model made out of both translucent and opaque elements.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

There's no way to properly make a model made out of both translucent and opaque elements.

 

Has to do with depth sorting, yeah.  Opaque elements are drawn front to back, translucent back to front.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

You can use the

forge:multi-layer

model to combine other models that are rendered in different layers. I explain this in more detail here.

 

Thank you. I will deff look into this . Right now it works okayish but with some glitches. Not too bad. After moving the spout 1 cubixel higher is much better

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Choonster the only issue with this is that my blockstate is in fact multipart

 

because my Vat block connects to a nearby furnace it has a spout piece that depends on wether there is a Furnance next to it and in which direction.

 

Can I use  forge:multi-layer AND multipart at the same time?

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

There's no way to properly make a model made out of both translucent and opaque elements.

 

Has to do with depth sorting, yeah.  Opaque elements are drawn front to back, translucent back to front.

 

 

To fix the sorting issue you need to make an object with no insides. So in my model I deleted all faces that are never visible. Seems to alleviate some of the issues with making the block completely translucent . You can only see the issues when you get really close to it at eye level and even then is not that big of a deal just looks weird but not broken.

 

Also for the water I originally had one block inside my Vat with water tex on all sides but I erased it and only UP face is there now and is the only one with tintindex . So it works like 90% OK but is not perfect.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Choonster the only issue with this is that my blockstate is in fact multipart

 

because my Vat block connects to a nearby furnace it has a spout piece that depends on wether there is a Furnance next to it and in which direction.

 

Can I use  forge:multi-layer AND multipart at the same time?

 

forge:multi-layer

requires you to use Forge's blockstates format to specify the models it should combine, but you can use submodels instead of multipart blockstates.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Choonster the only issue with this is that my blockstate is in fact multipart

 

because my Vat block connects to a nearby furnace it has a spout piece that depends on wether there is a Furnance next to it and in which direction.

 

Can I use  forge:multi-layer AND multipart at the same time?

 

forge:multi-layer

requires you to use Forge's blockstates format to specify the models it should combine, but you can use submodels instead of multipart blockstates.

 

I'm pretty newb and I'm not that advanced. I m happy I got to working this way thus far. I will keep it this way as is more than I hoped for to achieve.

 

However, I will come back at one point and try to do it the proper way. Is deff worth looking into it.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

You should be able to use mcrayfishs model creator to select different texture faces on the same element individually.

 

If you just re-texture the top element with water and then add both the image and mcmeta in your textures. The texture will render animated on the specified element, and the parts that aren't will be whatever you texture them as.

 

possible solution to possible z-fighting appearance:

replace the down north east south west parts of that element with the black part of either the black or white window pane png.

 

Works good with item models. The glass panes may render as black though on a block.

Link to comment
Share on other sites

You should be able to use mcrayfishs model creator to select different texture faces on the same element individually.

 

If you just re-texture the top element with water and then add both the image and mcmeta in your textures. The texture will render animated on the specified element, and the parts that aren't will be whatever you texture them as.

 

possible solution to possible z-fighting appearance:

replace the down north east south west parts of that element with the black part of either the black or white window pane png.

 

Works good with item models. The glass panes may render as black though on a block.

 

in fact that's exactly what i use. and it does not support forge's blockstate no multi layer format.  you can't even set translucency to an element. i do all that in post.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Cool beans man I just didn't know if you knew you could add your own custom texture for the block.

Like where your lang and model folders are, you can add one says textures inside it make two folders named entity and block inside of it.

 

Then have your json get it.

{

"ambientocclusion": false,

    "textures": {

        "0": "guru:entity/air_orb",

        "1": "blocks/glass_pane_top_black"

    },

 

 

The mcmeta photos should render partially invisible naturally. like nether portal, water, and lava(ok, maybe not lava).

end_gateways being a multilayered imaged block.

 

anyways, keep it real man!

Link to comment
Share on other sites

I recently switched it up to forge's own blockstate forge_marker 1 instead of multipart because you can do int properties not just boolean properties and seems much more configurable.

 

So ambientocculsion means simply a semi-transparent look?

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

So ambientocculsion means simply a semi-transparent look?

 

That is most definitely not what that means.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 1 month later...

sorry to resurrect this  but I just wanted to say I have tried this and at this time is not possible to do both multipart (using subblocks) and multi-layer at the same time. Translucent models get deleted by subblocks. When subblocks are not present then it works.

 

 

fMrxG47.gifv

 

 

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.