Jump to content

[1.12] (Solved) Rendering block layer with full-bright (IBakedModel?)


Arekkuusu

Recommended Posts

Hello, I wanted to create a block that has a bright texture layer over a normal texture (the overlay is decided by a blockstate, there are 16 different glyphs), but the current model system does not allow me to ignore lightning, only to turn off shadows, and a TESR seems like a bad idea since it might be used it in big quantities...

I was told an IBakedModel could allow me to turn off lightning for each side, but I do not know how to use it... are there any examples I could use? Or maybe modify the current baked model used to create that block?

 

This is what it looks like:

V9Xryi2.png

However, it does not "shine" when the lights are gone...

R41Nd6o.png

 

Do note that it is not a true overlay, just 2 block models...

{
	"parent": "block/block",
	"elements": [
		{
			"from": [ 0, 0, 0 ],
			"to": [ 16, 16, 16 ],
			"faces": {
				"down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "down" },
				"up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "up" },
				"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "north" },
				"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "south" },
				"west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "west" },
				"east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "east" }
			}
		},
		{
			"from": [ 0, 0, 0 ],
			"to": [ 16, 16, 16 ],
			"faces": {
				"down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "down" },
				"up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "up" },
				"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "north" },
				"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "south" },
				"west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "west" },
				"east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "east" }
			}
		}
	]
}

 

Thank you all :D

 

Edit:

Well, my main concern was being able to render a block with a shiny overlay, so the topic is solved :D

 

Edited by Arekkuusu

Aya Shamelessmaru at your service

Link to comment
Share on other sites

Try setting the "ambientocclusion" tag to false in your model file.

  • Like 1

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

4 hours ago, larsgerrits said:

Try setting the "ambientocclusion" tag to false in your model file.

No, that doesnt work. :(

Spoiler

gtyufih.png

I used this for the model:

Spoiler

{
	"parent": "block/block",
	"elements": [
		{
			"from": [ 0, 0, 0 ],
			"to": [ 16, 16, 16 ],
			"faces": {
				"down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "down" },
				"up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "up" },
				"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "north" },
				"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "south" },
				"west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "west" },
				"east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#all", "cullface": "east" }
			}
		},
		{
			"from": [ 0, 0, 0 ],
			"to": [ 16, 16, 16 ],
			"ambientocclusion" : "false",
			"faces": {
				"down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "down" },
				"up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "up" },
				"north": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "north" },
				"south": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "south" },
				"west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "west" },
				"east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "cullface": "east" }
			}
		}
	]
}

 

I actually did some research and found this:

Git repo

However the items are transparent/dont render (it can be fixed no big deal), the overlay shines wonderfully.

Spoiler

5Am1Kp3.png

LBMTxSY.png

Now I just have to figure out how to make each backed model for each state of my block, and make the items render... heh

 

 

Aya Shamelessmaru at your service

Link to comment
Share on other sites

  • 2 years later...

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.