Omicron - prerelease 0.7 "Tweaky Update"

Post Reply
User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by LMD » Post

I wonder whether we *should* start off something completely new, probably using my Java Game Engine.
I mean I feel comfortable with Java, and it's platform independent. Also, I know already have Geometry Shaders running in my Java Game Engine.

How would we call it ? I'd like "Dig'n'Build" :P

https://learnopengl.com/Advanced-OpenGL/Geometry-Shader <- Reference you asked for
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by azekill_DIABLO » Post

No. I hate Java. I started I finish, unless I die before.

Thx for the ref.
Spoiler
Just a question about it: it acts like another fragment over the vertex or something like that?

EDIT: Apparently not. LOL. Is there a way to make this code work as a *two-time render*?

Code: Select all

void main() {
// First layer, DISCARD all alpha. (ex: water will go invisible)
    vec4 color_1 = vec4(texture(sampler, fragment_uv));

    bool cloud = color_1 == vec4(0.0, 0.0, 0.0, 1.0);
    if (cloud && bool(ortho)) {
        discard;
    }
    if (color_1 == vec4(1.0, 0.0, 1.0, 1.0)) {
        discard;
    }
    
	if (color_1.a < 1.0) {
       //color_1.a = 0.0;
       color_1 = vec4(0.0);
    } else {
	//color_1.a = 1.0;
	}
	
// Second layer, will render everything. 
   //NOTE: alpha will be detected but shown as opaque
   //      as the layer is already transparent.
	
	vec4 color_2 = vec4(texture(sampler, fragment_uv));
    
    if (color_2.a == 1.0) {
        color_2.a = 0.0;
    } else {
		color_2.a = 1.0;
	}
    gl_FragColor = vec4(color_1); //_1
    gl_FragColor += vec4(color_2.xyz, 0.7);
}
Achieving transparency without any depth sorting nor visual bugs
details: I splited the code in the spoiler in a two pass render. No geometry shader used, no impact of performance. I'm proud of myself, can I? :D
Image
Forget the color of water (it's for debug) and the weird faces inside water this isn't related to shaders. Should be fixable more easely now.

EDIT<lost count>: for some reason the grass is pink. xD
Attachments
*I'm smiling like a debil since 5 hours*
*I'm smiling like a debil since 5 hours*
screenshot-THUGLIFEOFTRANSPARENCY.jpg (94.4 KiB) Viewed 1373 times
Last edited by azekill_DIABLO on Tue Aug 28, 2018 13:06, edited 3 times in total.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by LMD » Post

No, there's no way. 2nd rendering stage can only be achieved by FBOs.
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by azekill_DIABLO » Post

There's a way, it works :D

Just calling two different rendering functions. One only render opaque things, doesn't even consider alpha (no performance loss) and the second only renders transparent things. (some small optimization can still be achieved, but my fps sticks up to 60fps so I see no problem)

Image
The ugly faces will be removed, I need to edit the chunk renderer in order to make him forget transparent blocks in some way.
Attachments
*after removing debug colors*
*after removing debug colors*
screenshot-transparency-works.jpg (147.81 KiB) Viewed 1373 times
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by LMD » Post

ah, seems I got you wrong.
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by azekill_DIABLO » Post

NP dude. IT works and only this counts!


EDIT: I have an idea on how to get rid of this bug. I will try to make blocks near transparent blocks render their faces. It shouldn't lower performance at all (60fps with every water block rendering all his faces), and it should even get rid of the ugly bug with slabs (place Something opaque on top of it, the top face of the slabs disapear allowing easy Xray). If I manage to do that, update.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by azekill_DIABLO » Post

DEVLOG: Image speaks for itself...
Image

EDIT: Made water much darker now, looks better.
Attachments
Chunk errors are really visible however. It's another glitch.
Chunk errors are really visible however. It's another glitch.
screenshot-water-works.jpg (100.02 KiB) Viewed 1373 times
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by azekill_DIABLO » Post

OMICRON pre-release 0.4 "Aquatics"

Image
Here is another update in relation with water... But there's a good reason, you'll find out why quickly!!!
  • Mapgen
    • Oceans added using this method. They cover a big part of the terrain and allow the formations of multiple islands.
    • Addition of icebergs in taiga biomes.
    • Addition of rare ravines underground.
  • Blocks
    • Addition of ice block.
    • Addition of ores blocks.
    • Ores textures re-done and unified.
  • /help and /help <pages> commands added, providing info on all other commands available.
  • Shaders
    • Transparency (alpha support for textures) has been implemented successfully allowing to make half-transparent blocks.
    • Block shaders have been tweaked and simplified.
*red is important.

Images of what you can now see ingame (note some are a bit out-of-date):
Image
An ice biome with icebergs on water (now transparent).

Image
A ravine featuring new ore textures.

Image
New textures for minerals!

Image
The /help command in use.

Image
Transparency at work! (water is much darker now, this shade was used to debug)

Image
New shaders (almost no visual difference except a smoother ambient occlusion)

This is the biggest update I did so far... Please tell me what do you think of it!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by LMD » Post

0.0 so how did you finally fix the transparency
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.3 "A little wet"

by azekill_DIABLO » Post

Do you want technical info? It's a bit long to explain

EDIT: in short, water looks around to see if one of it's buddies here. If there is one the face touching it becomes transparent... It's still really experimental...
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by LMD » Post

So you only draw the top faces, and are somehow lucky Omicron's renderer already sorts 'em in right order ? Noice !
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by azekill_DIABLO » Post

There is no luck, only skill :P I changed the renderer.

BTW: I Don't only render the top faces it renders one that you're supposed to see (if you put a flying block of water it will render all it's faces for example). There isn't overlapping problems as far as I know :D
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
LMD
Member
Posts: 1396
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by LMD » Post

So it renders all faces with no neighbouring face ?
My stuff: Projects - Mods - Website

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by azekill_DIABLO » Post

LMD wrote:So it renders all faces with no neighbouring face ?
When nothing except transparent blocks other than water are near it renders all it's faces. I think this kind of optimization will be done with all transparent blocks :D It will allow leaves to be to.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by azekill_DIABLO » Post

DEVLOG: Added new blocks: -> use
  1. Clay -> generated in ocean in small common patches
  2. Sandstone -> generated underground in deserts
  3. Sandstone bricks -> X
  4. Stone bricks (uses cobble texture) -> X
Block modification : Cobble has new texture.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: Omicron - prerelease 0.4 "Aquatics"

by texmex » Post

Figured I'd take this for a spin but there's a problem: https://pastebin.com/f1LBkaZ9

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by azekill_DIABLO » Post

Okay so all the warnings and stuff it's normal, for a 2015 project, there is obviously a lot of deprecated stuff. Well the compilation worked… (it's amazing btw)
For the shaders it's the fault of open GL, It needs to be recent enough to support version 130. you should try to update it… But I have a fix for you!

Go in Omicron dir, go to shader folder (omicron/shaders/)

1> step one
open block_fragment.glsl and edit the first line to '#version 120'. That's the first step… then edit Line 20 to :

Code: Select all

vec4 color = vec4(texture2D(sampler, fragment_uv));
2> step two
then open block_vertex.glsl and edit the first line to '#version 120'. Only this.

3> step three
then open tblock_vertex.glsl and edit the first line to '#version 120'. That's it!!

This should work fine. You don't even have to recompile the project.

h

EDIT / DEVLOG: I added a bunch of new blocks. Here's a screenshot of the actual state:
Image
On the foreground there is clay next to sand. A bit behind, on the ground, there's sandstone and sandstone bricks. Then there's a line of plants, from left to right : New cactis textures, fern, mushroom, mushroom patch. Finally in the background you can see a wall made of cobble and stonebricks.
Attachments
screenshot-new-blocks.jpg
screenshot-new-blocks.jpg (82.78 KiB) Viewed 1373 times
Last edited by azekill_DIABLO on Sun Sep 09, 2018 08:45, edited 1 time in total.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by azekill_DIABLO » Post

*bump*
----------
Texmex any news? Did someone found out some odd things in the update?
I can only work the weekend for now, and not Always… Sorry!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: Omicron - prerelease 0.4 "Aquatics"

by texmex » Post

I haven’t got around to try it again. Will report back once I have.

crazy_baboon
Member
Posts: 96
Joined: Sat Oct 17, 2015 10:47

Re: Omicron - prerelease 0.4 "Aquatics"

by crazy_baboon » Post

+1 for being written mostly in C

crazy_baboon
Member
Posts: 96
Joined: Sat Oct 17, 2015 10:47

Re: Omicron - prerelease 0.4 "Aquatics"

by crazy_baboon » Post

it looks promising. But it won't start on my Xubuntu system. But Craft and CraftNG do.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by azekill_DIABLO » Post

can you give me some debug? seems some linux are allergic to some database glitch. Does it segfaults at start?

Thx for trying out btw :D
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

Re: Omicron - prerelease 0.4 "Aquatics"

by Stix » Post

Unfortunately i'm ignorant on how to compile things, so i haven't been able to test this out yet. But i do visit this thread almost every day for updates, and i like the direction things are going.
Hey, what can i say? I'm the bad guy.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Omicron - prerelease 0.4 "Aquatics"

by azekill_DIABLO » Post

Stix wrote:Unfortunately i'm ignorant on how to compile things, so i haven't been able to test this out yet.
I promise the releases will be usable without compilation. I may need someone to compile out things Under Windows and Mac. (my Windows is an horrible glitched mess, every update brings new bugs, and I Don't have a Mac nor a way to use one)
But i do visit this thread almost every day for updates, and i like the direction things are going.
Thank you stix. I'm happy to hear you like my work :D It makes me feel like I'm not doing Omicron for nothing.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

crazy_baboon
Member
Posts: 96
Joined: Sat Oct 17, 2015 10:47

Re: Omicron - prerelease 0.4 "Aquatics"

by crazy_baboon » Post

azekill_DIABLO wrote:can you give me some debug? seems some linux are allergic to some database glitch. Does it segfaults at start?

Thx for trying out btw :D
Your welcome Azekill.

Unfortunately, the game just exists immediately without any note on the terminal! But it still displays the artwork of "a game by azekill Diablo" and the "press return to start". After that, a black window appears and then disappears immediately. That's all I get!

ps: I dislike seeing "a game by azekill_DIABLO" when most of the ground work was done by fogleman's Craft and CraftNG.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests