Jump to content

[1.5] Issue involving textures, TileEntity, and mixed slabs


Koopinator

Recommended Posts

Here's a screenshot of the mod for context:

 

 

kECG6kX.png

 

 

Each double slab is created using a single blockID with textures assigned through a TileEntity. The main issue that I'm having is that all of the textures on the sides of the blocks are pre-made:

 

 

L5JKNXV.png

 

 

Because there are an exponentially large number of slab combinations added, I would much rather set things up so that the textures are created while the game is running. Ideally I would merge two preexisting textures on top of one another and use an alpha layer used to "erase" half of the top texture. Unfortunately I have very little experience with graphics programming, and so I have no idea how to start work on this, if it's the best approach to use, or if it's even possible to do in Java.

 

Please let me know if there's any other information I can provide. Any help will be greatly appreciated  :)

Link to comment
Share on other sites

yeah it is, though if you have more then 16 different combinason youll have to use tile entities. then just use a tile entity special renderer and you're good to go

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

yeah it is, though if you have more then 16 different combinason youll have to use tile entities. then just use a tile entity special renderer and you're good to go

At the moment I already have the combinations set up with a basic TileEntity, and have the textures assigned by using an instance of IBlockAccess from the getBlockTexture(...) method in my block class. Will this work, or do I need a TileEntitySpecialRenderer in order to combine multiple images into a single texture?

Link to comment
Share on other sites

id honestly suggest TESR as it is way easier to do then making texture on the spot.

Sorry if I'm missing something obvious, but I've been looking into it and I'm still completely lost as to how I can start writing the code for merging textures together. From your posts I'm guessing that there are methods I can use that are accessible with TESR? Or is there a different approach to the problem that using TESR would help with?

 

Edit: Scratch that. I'm guessing that the best way to implement the process of merging textures is to tie it to the rendering of the block, and so I need to set up a TESR for that purpose. As far as the merging itself, I need to study GL11 to find the correct methods to use. Is this correct?

Link to comment
Share on other sites

well, yeah, but you wouldnt require a LOT of openGL. just a little, you could mostly do this using the tessellator. but with a TESR youwouldnt "merge texture" you would just sorta render 2 half slab on top of each other

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

  • 1 month 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.