(August 2023) Monthly WIP Screenshot Thread

It’s looking very good so far. I’ll be happy to try it out :smiley:

2 Likes

Looks good! (Could your problem be two transparent quads intesecting; this leads to the engine being unable to find a correct order for rendering them - because part of one quad is in front and the other part behind so there is no possible consistent order)

1 Like

Another demo, this time it’s the pbr shader

https://test-jme-web4.rblb.it

It is not production ready, but i think it is almost usable, so i will look into cleaning up and publishing the code as soon as possible.

However the support to readPixels on HALF_FLOAT on firefox seems to be missing:
WebGL warning: readPixels: Format and type RGBA/HALF_FLOAT incompatible with this RGBA16F attachment. This framebuffer requires either RGBA/FLOAT or getParameter(IMPLEMENTATION_COLOR_READ_FORMAT/_TYPE) RGBA/FLOAT.
this might be the right time to merge my old PR Accelerated env baking on the GPU by riccardobl · Pull Request #1165 · jMonkeyEngine/jmonkeyengine · GitHub

10 Likes

I think that specific issue I was noticing is something else, but what you are mentioning will also be a potentially bigger issue when I add the secondary bolts sticking out of the main ones in all different directions, since then there will be more quads overlapping for more potential sorting issues.

I’m still playing around with different generation options and am trying to decide if its better for each bolt to be a single big geometry or if its best split into multiple geometries (in my previous post each bolt is a single geometry). I’m thinking the best solution could be to give the option for either single geometry bolts or to split up each quad as its own geometry. And I think this will have a big effect to help fix sorting issues, but I also struggle to simulate sorting issues accurately in my head until I see them happening, so hopefully it will all work out and the sorting issues will be minimal when the bolts get even more detailed.

I would think lightning wouldn’t need to be sorted since alpha additive blending is just about ideal for something like lightning. Depth write off, blend mode alpha additive… then render order doesn’t matter.

5 Likes

AI brain far*!

9 Likes

What can my legendary blacksmith, Mopalmo can make for us in his smithy?

At the moment only farming tools :slightly_smiling_face:

11 Likes

…People gotta eat.

2 Likes

@yaRnMcDonuts, while surfing on Sketchfab I saw this free Lighting Pack and thought you might find it useful in your project. Leaving a link here just in case.

Mixing with a top-down dissolve shader it can produce a nice effect I guess. :slightly_smiling_face:

5 Likes

Those look like they would work well for normal lightning strikes, but I think randomly generated bolts will still be best for my project, since I also intend to use this to make other lightning effects like ball lightning, chain lightning, and other non-straight lightning effects for magic spells.

I also hope and am planning to be able to get a wider variety of randomness by generating them, since I’m still adding more params for tweaking minor parts of the effect. I think I may have done my library a slight disservice posting a screenshot so early since it missing alot of features, my last video/screenshot was the result of on only 1 unusually productive night of coding and I was exited to share what I had at that point, so I hope it will look more impressive once I’ve made more progress.

I also do plan to add some dissolve effect to the shader, but just haven’t got there yet. Although for realistic lightning strikes I think that may barely be noticeable unless the game is running in slow-mo, since a lightning strike happens so fast. But I still plan to add dissolve shader support anyways since it could be very slightly noticeable still, even with a fast flash of lightning. And I think that will be especially useful for magic lightning spells where a slow build up of lightning would make even more sense since its being cast with magic where there’s more allowance for unrealistic behavior.

2 Likes

Nah, it’s cool to see WIP stuff.

The only case I will say someone posts something too early is if the “buzz” they get from showing it early causes momentum to disappear because now there is slightly less drive to show off the final product (early buzz versus later bigger buzz).

3 Likes

Working on gamepad support for Depthris.

The gameplay was the easy part, but navigating through the UI is the challenge but Lemur surprised in making it easy for selecting and focusing on elements.

7 Likes

Super cool!

I ported PBRLighting.frag to its own glsllib file, so it can be imported into custom shaders. I think this will be very useful for creating procedurally generated textures:

#import "ShaderBoost/glsl/PBR.glsllib"
#import "ShaderBoost/glsl/utils.glsllib"
#import "ShaderBoost/glsl/mapping.glsllib"
#import "ShaderBoost/glsl/textures.glsllib"

#ifdef DIFFUSE_MAP
    uniform sampler2D m_DiffuseMap;
#endif
#ifdef NORMAL_MAP
    uniform sampler2D m_NormalMap;
#endif
#ifdef PARALLAX
    uniform float m_ParallaxHeight;
#endif

uniform vec4 m_BaseColor;
uniform float m_Metallic;
uniform float m_Specular;
uniform float m_Roughness;
uniform float g_Time;

varying vec2 texCoord;
varying vec3 wPosition;
varying vec3 wNormal;
varying vec4 wTangent;

void main() {
    
    vec3 viewDir = getViewDirection(wPosition);
    
    // parallax
    #if (defined(NORMAL_MAP) && defined(PARALLAX))
        vec2 newTexCoord = steepParallax(m_NormalMap, viewDir, texCoord, wNormal, wTangent, m_ParallaxHeight, true);
    #else
        vec2 newTexCoord = texCoord;
    #endif
    
    // diffuse
    #ifdef DIFFUSE_MAP
        vec4 diffuse = texture2D(m_DiffuseMap, newTexCoord);
    #else
        vec4 diffuse = m_BaseColor;
    #endif
    
    // normal
    #ifdef NORMAL_MAP
        vec3 normal = normalMap(wNormal, wTangent, texture2D(m_NormalMap, newTexCoord));
    #else
        vec3 normal = wNormal;
    #endif
    
    // checker splatting
    float diff = dot(abs(normal - wNormal), wNormal);    
    float checker = checkerTexture(newTexCoord + vec2(g_Time * 0.1), 5.0 + diff * 0.01);
    if (checker > 0.5) {
        diffuse = mix(diffuse, vec4(1.0, 0.0, 0.0, 1.0), 0.8);
    }
    
    // PBR
    vec4 color = physicallyBasedRender(wPosition, diffuse, m_Metallic, vec4(m_Specular), m_Roughness, normal, wNormal);
    
    // fragment output
    gl_FragColor = color;
    
}
10 Likes

In last night’s live stream, I was able to get the basic tailor’s dummy loaded and basic in-game clothing design area hooked up. Later that night, I finally got the modes and show/hide toggles working. Today I will be adding swatch editing to make clothes similar to what was displayed in a prototype months ago.

Imgur

Imgur

Imgur

Imgur

Imgur

8 Likes

Every FPS must have a Shotgun, it’s the law.

Imgur

10 Likes

Or as GanLives would say “Then, you’re dead to me”

2 Likes

Looks good.

1 Like

Thanks! Turning off depth write got rid of all the sorting issues, which became worse as I put more quads on screen.

And Using Alpha Additive also makes the lightning look much better especially with very bright colors. It fixes some minor artifacts and also gives the lightning a brighter glow so it stands out better against the scene more than it did with blendmode alpha

Although (similar to how I recently learned with ParticleEmitters) Additive blending seems to get less effective with darker colors, and eventually doesn’t work at all once you get close to full black. But in this case, using blend mode alpha with depth write off still seems to work too. So I’ll probably turn DepthWrite off by default and then recommend others to use AlphaAdditive for effects with bright colors and Alpha for dark effects.

2 Likes

AlphaAdditive is best for things like lights/fire/glows because it really should be cumulative… so for lighting it seems appropriate since I’d expect lightning to be nothing but light.

Even with depth write off, alpha can still have sorting artifacts if there are darker non-transparent colors since a far thing might overwrite a near thing.

1 Like