Jump to content

Rendering of 3D objects based on texture


Bedrock_Miner

Recommended Posts

Hey Guys!

 

I think you all know the Vanilla Item renderer. If the graphics are set to fancy it renders the Item in 3D with the shape based on the Alpha channel of the Item's texture. How can you use this method of rendering, for example to easily give a volume to a single face, while rendering Blocks or entities?

Link to comment
Share on other sites

It doesn't render them in 3D any more than it renders glass in 3D -- that option says whether or not to draw transparency in some common textures. If it's disabled, then there's no alpha channel so it shows up black. I believe you can specify this by overriding

Block#isOpaqueCube()

; at least it seems that way from a quick glance into the code for

BlockLeaves

.

I like to make mods, just like you. Here's one worth checking out

Link to comment
Share on other sites

I think you didn't understand me correctly.

 

An Item which is rendered in Fancy-mode or held in the player's hand is not just a flat surface. It has a volume. And this volume, or the edges of the volume, are defined by a change from alpha = 0 to alpha =255 in the Item texture. If you have a differen texture, the edges are similar to the edges of the texture, because they are generated dynamically and are not just a predefined shape. If you just say, well I create a shape like this in 3D, you can't make the shape reacting dynamically if you change the textures alpha.

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.