Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[WIP] Glass Frame Block (test release)


  • Please log in to reply
88 replies to this topic

#1

Valance
    Valance

    Coal Miner

  • Members
  • 125 posts
  • Location: Germany

Posted 15 November 2010 - 02:36 AM

Have you seen this thread about improving glass blocks? I really fell in love with SpGreys suggestion, and started to code it some hours ago.

Here's the result (sorry for using such a ugly glass texture, but I need it while coding):

Posted Image

Posted Image

Posted Image

Posted Image

Textures I used:
Posted Image

The red arrows are there to show a problem that needs to be solved before I'll release something. Is there an artist out there able to draw glass textures without this issue? If not I need to use much more textures... Or is there a modder who can tell me how to use textures from another image?
Posted Image

Register or log in to remove.

#2

Shykary
    Shykary

    Redstone Miner

  • Members
  • 595 posts
  • Location: Brazil

Posted 15 November 2010 - 02:46 AM

This looks a-w-e-s-o-m-e. I totally want it. *-*
Keep the good work. (:

#3

Jay
    Jay

    Diamond Miner

  • Members
  • 866 posts
  • Minecraft: Jay

Posted 15 November 2010 - 02:52 AM

The immediate problem I'm seeing is that your 3x3 shape there uses a combination of all of the smaller textures, so fixing those frame issues in the textures would create small blips of frame in the middle of the 3x3 area, which obviously is not ideal.
(If my posts seem hostile, read my "About me" page!)

#4

AFloppyDrive

Posted 15 November 2010 - 02:55 AM

Loving this idea :SSSS: keep going with it, amazingly i was thinking of something similar earlier today before i saw this thread.

#5

GGreenBass

Posted 15 November 2010 - 02:58 AM

I'm bringing this post up, looks like you've got something great on your hands.
I haz a minecraft firefox theme and a minecraft desktop background. <3

#6

jack_in_the_dark

Posted 15 November 2010 - 03:07 AM

This was a very suggested thing on the suggestion forum wen i used to go there, it's hard to believe that notch still didn't implemented this to this day, i had though of a concept for this that invoved 5 layers of textures, but it would be harder to mod, awesome work

#7

scamp500
    scamp500

    Zombie Killer

  • Members
  • 195 posts
  • Location: Canada

Posted 15 November 2010 - 03:12 AM

This sounds like a good idea but it seems like it could get complicated. I have a tower, at the top of which is a glass room to see out of everywhere, 7x7x5 - LxWxH. Imagine trying to get a glass wall 7x5 and a ceiling and floor 7x7. You would have to make so many combination possibilties, and there just aren't enough blocks in terrain.png to cover them all. The method you are using would probably make my tower look strange, as well as other people's glass houses, so I probably wouldn't use this mod like it is. If you got it to work for larger projects, I definitely would use it. I don't mean to sound negative or put you're work down, I'm just being realistic. I hope you do find a solution, or someone's able to help you, cause it sounds like a great idea.

#8

biodude94566
  • Location: San Fransisco Bay Area, California

Posted 15 November 2010 - 04:03 AM

The corner files could easily be fixed by doing something like this with each one: Posted Image I can't think of how to explain it other than "it just works", so you'll just have to try it out.

However, the center is going to be a lot harder to do because there's a lot that can go on with a center block and you're going to need code that can sense what kind of center it is. It could be in a

[]  :Frame:  []
:)  :Glass:  :Glass:
[]  :Glass:  []

arrangement, when all it should have is the four corners like the lower right one in the above image. However, it could also be in a

:Glass:  :Glass:  []
:Glass:  :Glass:  :Glass:
[]  :Glass:  []

arrangement, where the top left corner should be completely invisible, but the upper right and both lower corners should have the corner like the example glass.

Posted Image


#9

Valance
    Valance

    Coal Miner

  • Members
  • 125 posts
  • Location: Germany

Posted 15 November 2010 - 04:41 AM

Perhaps it would help if I explain what I'm doing codewise...

For every face that get's to be drawn I'm checking direct adjacent sides if there is a glass block in the same plane and set the corresponding bit in a special variable. Bit 1 if block to the "north" is glass, bit 2 if the right one, ... this gets me my texture index to use when actually draw the face. (In real I'm not only checking if the adjacent block are made of glass, I also check if there's another glass block in front of them to fix another visual issue I noticed.) The same procedure should get used for the four adjacent corners, but then I would need seperate textures for all pieces that could have a corner.
Posted Image

#10

scamp500
    scamp500

    Zombie Killer

  • Members
  • 195 posts
  • Location: Canada

Posted 15 November 2010 - 04:47 AM

Wow, i never even considered, the depth or thickness aspect, makes it seem even more complicated, but it sounds like your on it.

#11

drenith
    drenith

    Coal Miner

  • Members
  • 107 posts

Posted 15 November 2010 - 05:38 AM

Doing my part by bumping this awesome idea :o.

#12

lubey
    lubey

    Stone Miner

  • Members
  • 76 posts

Posted 15 November 2010 - 05:41 AM

Nice, keep up the good work!  I hope to use this as soon as it's available.

#13

scamp500
    scamp500

    Zombie Killer

  • Members
  • 195 posts
  • Location: Canada

Posted 15 November 2010 - 06:01 AM

Do you have to have a double frame around the edges? It would be simple to have just single brown frame, then when it comes to the corner, where your pointing just add a block.

#14

scamp500
    scamp500

    Zombie Killer

  • Members
  • 195 posts
  • Location: Canada

Posted 15 November 2010 - 06:09 AM

Also you're going to have to get it to check, not just the immediate adjacent block, but the corner block as well. If it's there = no frame, if not there but yes to top and side than corner block frame. So I guess in all you check 4 places - side, top, front and corner.

#15

HeadB0x -F1N-
  • Minecraft: HeadB0xF1N

Posted 15 November 2010 - 06:34 AM

scamp500 said:

This sounds like a good idea but it seems like it could get complicated. I have a tower, at the top of which is a glass room to see out of everywhere, 7x7x5 - LxWxH. Imagine trying to get a glass wall 7x5 and a ceiling and floor 7x7. You would have to make so many combination possibilties, and there just aren't enough blocks in terrain.png to cover them all. The method you are using would probably make my tower look strange, as well as other people's glass houses, so I probably wouldn't use this mod like it is. If you got it to work for larger projects, I definitely would use it. I don't mean to sound negative or put you're work down, I'm just being realistic. I hope you do find a solution, or someone's able to help you, cause it sounds like a great idea.
You could easily make another image file, like glass.png or something, and if needed, glass2.png
Not sure tough, because i don't know is it so easy to code something like that.
And then the message ended...

#16

lemongt
    lemongt

    Coal Miner

  • Members
  • 101 posts

Posted 15 November 2010 - 06:37 AM

Will this require a specific texture for the mod to work or will it somehow work for any texture?
I am the terror that flaps in the night!  I am the raspberry seed you can't floss out.  I am... strangely...blocky?

#17

g1real
    g1real

    Carpenter

  • Members
  • 58 posts

Posted 15 November 2010 - 06:38 AM

Is it possible for you to render two textures on one block?

If so, just create the small dot textures for every combination possible.
[] [] :D
[] [] []
[] [] []

[] [] :RedShroom:
[] [] []
:RedShroom: [] []

etc. and render them over the block.

It's the only way really.

To make this clear: Unless you find a way to obfuscate certain pixels of a texture, you'll have to include more textures for the corners.

Edit: I swear I'm getting tired of the forums not actually updating my post/posting my post when I press submit.

#18

biodude94566
  • Location: San Fransisco Bay Area, California

Posted 15 November 2010 - 07:23 AM

Valance said:

Perhaps it would help if I explain what I'm doing codewise...

For every face that get's to be drawn I'm checking direct adjacent sides if there is a glass block in the same plane and set the corresponding bit in a special variable. Bit 1 if block to the "north" is glass, bit 2 if the right one, ... this gets me my texture index to use when actually draw the face. (In real I'm not only checking if the adjacent block are made of glass, I also check if there's another glass block in front of them to fix another visual issue I noticed.) The same procedure should get used for the four adjacent corners, but then I would need seperate textures for all pieces that could have a corner.
I don't quite get what you're checking, but you only need to check one block in each direction, from what I can think of myself. An example, where we're checking the black cloth block.
[]  :Green:  []
:Green:  :)  :Green:
:Green:  :Green:  :Green:
:Green:  :Green:  :Green:

The Red block isn't going to affect the black block's orientation in any way, because there is nowhere for it to touch and interact with the black block. The gray blocks will all effect the corners of the block, depending on which grey blocks are occupied by a glass block. The white blocks are obviously going to affect the black block the most, dictating which sides should have sides or not.

[E] Thinking about each possibility of what blocks can and can't be occupied and how they affect all the other blocks - the grey blocks should only be checked if an adjacent white block is present. That's the only time that the grey block will affect how the black block should be rendered.

Posted Image


#19

Seiseki
    Seiseki

    Lapis Lazuli Collector

  • Members
  • 1028 posts
  • Location: Sweden
  • Minecraft: Seiseki

Posted 15 November 2010 - 08:08 AM

Could we have something similar for wood? :cobblestone:

I made this on the suggestion forum like half a year ago:

Posted Image

Would be a pain if each part of the trunk was an unique block though..
Posted Image

#20

Megadog
    Megadog

    Gold Miner

  • Members
  • 477 posts

Posted 15 November 2010 - 10:22 AM

Seiseki said:

Could we have something similar for wood? :||||:

I made this on the suggestion forum like half a year ago:

Posted Image

Would be a pain if each part of the trunk was an unique block though..
WOW!

If I ever see a mod that does that, I shall download it so fast our internet data cap for the month will vanish.
Passive minecrafter FTW.

Hamumu.com, the site I should thank for helping me find minecraft.