Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411424 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 07:28:36 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 246 247 [248] 249 250 ... 279
Print
Author Topic: The happy programmer room  (Read 677754 times)
JWki
Level 4
****


View Profile
« Reply #4940 on: August 10, 2017, 03:13:09 AM »

I'll get back to it soon enough! c: Did a jam recently and exhausted myself. Considering doing some prototyping in Unity for the game I'll be making with my own engine in the end.

Looks good! Is that the brand new colour picker that Omar tweeted about, or one of the third-party ones?

Thanks, it's the new one that Omar tweeted about. I did this pretty much the instant he merged it. I REALLY really like how it turned out, it pushed my urge to roll my own UI lib back a bit.
Logged
oahda
Level 10
*****



View Profile
« Reply #4941 on: August 10, 2017, 11:58:43 AM »

Sounds good! c:





Here's the result of today's prototyping! I basically wanted something like Zelda's timeshift stones but in a bubble, and where things don't just pop in and out, but can be cut in half by the bubble.

Of course there can be things in the red area that don't show up in the blue bubble too:

« Last Edit: August 10, 2017, 01:00:10 PM by Prinsessa » Logged

JWki
Level 4
****


View Profile
« Reply #4942 on: August 10, 2017, 01:13:35 PM »

Nice! Stencil masking or something completely different?

Also I can now paint with textures:




Just need to extend this to paint like a full material texture set at once into multiple targets and tadaa, can do full material layering.
Logged
ferreiradaselva
Level 3
***



View Profile
« Reply #4943 on: August 10, 2017, 01:15:25 PM »

3 days without programming. That's why I'm happy, yall.
Logged

oahda
Level 10
*****



View Profile
« Reply #4944 on: August 10, 2017, 01:25:34 PM »

Nice! Stencil masking or something completely different?
Tried that at first, but didn't turn out that well. Anything that was visible through the bubble from the camera's perspective would get rendered no matter the distance from the camera. Tried to fix it with depth buffer trickery and stuff but it soon got very convoluted. Now I'm just checking if the fragment is within the radius of the sphere instead.

Also I can now paint with textures: Just need to extend this to paint like a full material texture set at once into multiple targets and tadaa, can do full material layering.
Cool! I've never implemented a painter, but I've done similar things in shaders anyway, so I think I understand how it works. E:

3 days without programming. That's why I'm happy, yall.
Me too, really, if not more. c: Lots of Netflix.
Logged

bateleur
Level 10
*****



View Profile
« Reply #4945 on: August 10, 2017, 10:43:37 PM »

Now I'm just checking if the fragment is within the radius of the sphere instead.

You also seem to be doing something slightly cleverer to get the white faces where the sphere cuts a "blue" object in the foreground or a red one in the background? Part of it is just rendering as white any fragment very close to the radius, but how do you get white pixels in places where there isn't a triangle at all? Or do all the meshes have double-sided geometry with a different material on the inside?
Logged

oahda
Level 10
*****



View Profile
« Reply #4946 on: August 10, 2017, 10:48:26 PM »

Now I'm just checking if the fragment is within the radius of the sphere instead.

You also seem to be doing something slightly cleverer to get the white faces where the sphere cuts a "blue" object in the foreground or a red one in the background? Part of it is just rendering as white any fragment very close to the radius, but how do you get white pixels in places where there isn't a triangle at all? Or do all the meshes have double-sided geometry with a different material on the inside?
It's unfortunately down to actually rendering the backfaces, yeah (but I don't think it's too much of a problem because only select objects are going to be governed by the bubble, and only a few at a time, and I could check first if it's entirely inside of the bubble and if so enable culling again) but I'm just checking the normals relative to the view angle in order to identify backfaces (if dot product is negative in my case) and change the colour in shader instead of having manually applied a different material.
« Last Edit: August 11, 2017, 12:47:59 AM by Prinsessa » Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4947 on: August 11, 2017, 04:55:37 AM »

Sounds good! c:





Here's the result of today's prototyping! I basically wanted something like Zelda's timeshift stones but in a bubble, and where things don't just pop in and out, but can be cut in half by the bubble.

Of course there can be things in the red area that don't show up in the blue bubble too:



Perfection  Tears of Joy
Logged

JWki
Level 4
****


View Profile
« Reply #4948 on: August 11, 2017, 02:36:26 PM »

Someone else in another forum made a nice frosting effect for dear imgui so I tried getting a similar effect - didn't take very long and looks nice:

Logged
oahda
Level 10
*****



View Profile
« Reply #4949 on: August 12, 2017, 12:23:06 AM »

Perfection  Tears of Joy
<'3

Someone else in another forum made a nice frosting effect for dear imgui so I tried getting a similar effect - didn't take very long and looks nice:
Oooh, bringing dat Aero back!
Logged

JWki
Level 4
****


View Profile
« Reply #4950 on: August 26, 2017, 06:44:03 AM »

Here's something exciting: Loading meshes from FBX.



Took me a while to mess around with all sorts of transformations for submeshes, eventually got them right I think.
Logged
JWki
Level 4
****


View Profile
« Reply #4951 on: August 29, 2017, 05:09:57 AM »



Metallic surfaces look pretty amazing with a cook torrance based shading model, even with very simple image based lighting that's not using proper convolution yet (atm just sampling the cubemap multiplied with metallic which is super incorrect).
Logged
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #4952 on: August 29, 2017, 05:31:49 AM »

Still looks awesome IMHO. You could probably emulate the roughness with a simple texCubeLod(). Bonus for pre-convoluted mipmaps of said cubemap.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
oahda
Level 10
*****



View Profile
« Reply #4953 on: August 29, 2017, 06:00:45 AM »

Cool stuff! I'm restructuring my stuff to get a better build system, so I can't work on anything else at all until I finish that. Tongue
Logged

JWki
Level 4
****


View Profile
« Reply #4954 on: August 29, 2017, 06:23:14 AM »

Still looks awesome IMHO. You could probably emulate the roughness with a simple texCubeLod(). Bonus for pre-convoluted mipmaps of said cubemap.

Yeah convolution into mipmaps is the next thing to do, both for the diffuse part and the specular part.

Then I can work on build systems too again. Tongue
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4955 on: August 29, 2017, 12:46:18 PM »

Still looks awesome IMHO. You could probably emulate the roughness with a simple texCubeLod(). Bonus for pre-convoluted mipmaps of said cubemap.
There was a paper to do that more or less correctly by biasing the sampling directly (no convolution) the lod by the BRDF, If anyone where I can find it back. ALL I find now is real time convolution using importance sampling which is the whole deal (analyzing and baking convolution into the mipmap) and not just a LOD sampling.
Logged

JWki
Level 4
****


View Profile
« Reply #4956 on: August 29, 2017, 11:10:51 PM »

Still looks awesome IMHO. You could probably emulate the roughness with a simple texCubeLod(). Bonus for pre-convoluted mipmaps of said cubemap.
There was a paper to do that more or less correctly by biasing the sampling directly (no convolution) the lod by the BRDF, If anyone where I can find it back. ALL I find now is real time convolution using importance sampling which is the whole deal (analyzing and baking convolution into the mipmap) and not just a LOD sampling.

You can translate the roughness into a lod level if that's what you mean - you do that anyways even with convolution because you usually store the different roughness levels in mip levels, but even with just regular mipmaps you get a blurrier -> "rougher" reflection with higher roughness levels if you do that.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #4957 on: August 30, 2017, 12:59:30 AM »

Yeah I know but the convolution is expensive to compute RealTime™ to stay Physically plausible, and then if you just linearly sample the LOD you don't have the right lighting response, which can be odd in varying lighting condition (mismatch in reflected energy), the paper was gear for real time refreshed cube map (think moving car reflecting the environement), they just bias the mipmap sampling (since you couldn't convolve in this condition) with the brdf to get a good enough approximation (though ther was still some energy mismatch in some condition).
Logged

JWki
Level 4
****


View Profile
« Reply #4958 on: August 30, 2017, 01:50:51 AM »

Yeah I know but the convolution is expensive to compute RealTime™ to stay Physically plausible, and then if you just linearly sample the LOD you don't have the right lighting response, which can be odd in varying lighting condition (mismatch in reflected energy), the paper was gear for real time refreshed cube map (think moving car reflecting the environement), they just bias the mipmap sampling (since you couldn't convolve in this condition) with the brdf to get a good enough approximation (though ther was still some energy mismatch in some condition).

Oh okay I think I know what you mean now.
I haven't seen the paper though so yeah that sounds interesting.
Logged
JWki
Level 4
****


View Profile
« Reply #4959 on: September 03, 2017, 03:48:14 AM »

Learned about the fact today that in C++ you can take pointers to specific overloads of functions, apparently.
This is nice because it allows for this:

Code:
namespace myApi
{
    void Foo(int);
    void Foo(float);
    
    struct Interface
    {
         void (*FooInt)(int);
         void(*FooFloat)(float);
    }
}

EXPORT
void my_api_get_interface(myApi::Interface* interface)
{
    interface->FooInt = static_cast<void(*)(int)>(&Foo);
    interface->FooFloat = static_cast<void(*)(float)>(&Foo);
}


which is useful for dynamically loaded modules and ABI interfaces in general - the implementing module can still work with the overloads so only outside binaries have to deal with the additional verbosity.
Logged
Pages: 1 ... 246 247 [248] 249 250 ... 279
Print
Jump to:  

Theme orange-lt created by panic