Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1366136 Posts in 64012 Topics- by 55898 Members - Latest Member: obemef

September 17, 2019, 09:11:34 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 275 276 [277]
Print
Author Topic: The happy programmer room  (Read 541183 times)
InfiniteStateMachine
Level 10
*****



View Profile WWW
« Reply #5520 on: August 20, 2019, 05:20:57 PM »

Princessa : In regards to the ability to have a lot of lights. Are we talking lots of shadow casting lights?

The reason I ask was because the technique looks similar to a deferred style but if you can have a lot of shadow casting lights then that's really awesome. (edit, not that it's not already awesome, just more so Smiley )
Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #5521 on: August 21, 2019, 03:08:15 AM »

All the shadows would be composited in one step this way, but you’d have to render shadow maps from the perspective of every light unless there is some technique I don’t know about so dunno how performant that would be.
Logged

InfiniteStateMachine
Level 10
*****



View Profile WWW
« Reply #5522 on: August 21, 2019, 08:53:43 AM »

All the shadows would be composited in one step this way, but you’d have to render shadow maps from the perspective of every light unless there is some technique I don’t know about so dunno how performant that would be.

Have you tried seeing how far you can push it? I'd be curious to know. Unreal engine has a thing where if there are more than 4 lights on a fragment (polygon? can't remember) it starts ignoring lights influences on the surface.
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #5523 on: August 21, 2019, 09:15:49 AM »

In order to implement that "wall of text" Global Illumination solution, I need to look at space partitioning ... I looked at voxelization briefly and realized that I could rasterized directly into a voxel texture in open GL  using bitfield trick. That is, hash the depth of the fragment to te voxel volume position, instead of z culling then bit insert it in the framebuffer ... which openGl  don't support, but we can abuse the fact that bitshift are x2 and x0.5 and find equivalence (there is difference in rounding I think) and we can abuse the fact it's just an "add" of number at specific position, the idea comme from overdraw shader, but instead of fixed transparency you inject the number of the bit position. While I was trying to solve the edge case (bit that write at teh same bit depth and jusxt reading bit as fast as possible) I found a paper that already do that, they used look up texture (8x256 and 1x8) to do that ... The end result is that you need 8 texture (3 x 8 renders on each axis to capture triangle) of 256 to get a 256 voxel cube (only volume data, no color or extra info), that's "kinda" cheap and practical. Most game don't have that range on vertical axis, so I probably could stop at a single 32x256² volume texture.

BUT voxelization was just a trail, I need to a limit of 256 probes to place, ideally I wouldn't want  to place a probe at each voxel, so I need to find way to aggregate volume in a smart way.
Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #5524 on: August 21, 2019, 09:42:47 AM »

Good luck, Gimmy!! Kiss

Is there a problem in this industry as far as a proper payscale is concerned?

Short answer: yes. If I've understood correctly, the big companies (especially in the US) can get away with paying lower salaries and preventing their employees from unionising because there are so many people willing to work in the field that they can just hire someone else if anybody puts up a fight, so people are very much treated as disposable. /:

Have you tried seeing how far you can push it? I'd be curious to know. Unreal engine has a thing where if there are more than 4 lights on a fragment (polygon? can't remember) it starts ignoring lights influences on the surface.

I did try like 50+ point lights which barely differed performance-wise from just one, so without shadows it scales very well, but I haven't tested with shadows yet. But I also haven't implemented cascaded shadow maps yet (there is only one so far) so I guess I need to do that first.

Thing is I guess there are two ways of going about this:

1) pass everything into one render pass as uniforms and process it all in a loop, having prerendered one shadow map per light (which is what I'm doing ATM cos it was faster and easier to set up)

or

2) render one shadow map, do a composite step and apply that, then render another shadow map reusing the same texture as before, do another composite step and so on, and keep applying each shadow in its own pass which is theoretically infinite unlike using uniforms which have a limit to them (especially texture samplers) and uses less memory but probably takes longer.

What's best probably depends on the use case and since I'm not super interested in lots of different shadow sources (I might do two, one for the sun and one for the nearest lamp) I'm not sure I wanna change it up. D:
« Last Edit: August 22, 2019, 04:12:48 AM by Prinsessa » Logged

InfiniteStateMachine
Level 10
*****



View Profile WWW
« Reply #5525 on: August 21, 2019, 10:56:00 AM »

Fair enough, if you don't need it then you don't need it Smiley
Logged

ProgramGamer
Administrator
Level 10
******


The programmer of games


View Profile
« Reply #5526 on: September 09, 2019, 03:53:43 PM »

Logged

Schrompf
Level 6
*

Currently off any meaningful development


View Profile WWW
« Reply #5527 on: September 09, 2019, 10:10:15 PM »

I like the "luambda" keyword. Apart from that I'm pretty sure you'd build a perfect lua func wrapper with arbitrary arguments with a few template lines. And now that I think of it, someone probably already did it and put it to github,
Logged

Let's Splatter it and then see if it still moves.
Daid
Level 2
**



View Profile
« Reply #5528 on: September 09, 2019, 10:45:09 PM »

I like the "luambda" keyword. Apart from that I'm pretty sure you'd build a perfect lua func wrapper with arbitrary arguments with a few template lines. And now that I think of it, someone probably already did it and put it to github,
Actually, decomposing the function arguments into luaL_check* functions requires a bit of metaprogramming magic.

I've done both, registering C functions with templates in lua. And calling lua functions as if they are C functions (automatic conversion of parameters)

This is the start point for the function registering:
https://github.com/daid/SeriousProton2/blob/master/include/sp2/script/environment.h#L36

But the real magic starts here:
https://github.com/daid/SeriousProton2/blob/master/include/sp2/script/luaBindings.h#L143
Where you need to construct the function arguments from the lua stack.


(The whole code is a lot bigger, as it also handles binding to object functions, and direct property binding)
Logged

Software engineer by trade. Game development by hobby.
Richard Kain
Level 10
*****



View Profile WWW
« Reply #5529 on: September 13, 2019, 08:45:49 AM »

Short answer: yes. If I've understood correctly, the big companies (especially in the US) can get away with paying lower salaries and preventing their employees from unionising because there are so many people willing to work in the field that they can just hire someone else if anybody puts up a fight, so people are very much treated as disposable. /:

Sadly, yes, this is the current state of affairs. What's even more infuriating is how short-sighted the whole mess is. Of all the industries out there, game development is one of those that benefit the most from experience. Seasoned, capable game developers are usually able to improve their efficiency and avoid pitfalls that rookies commonly run across. And this is also true of programming in general. I'm a far better and more efficient programmer now than when I first started out. Solutions to problems come faster and easier than ever before, frequently because I've encountered similar problems before and already know where and how to start working.

But the meat-grinder that is game employment basically insures that the current inefficiencies and crunch in the industry will constantly remain in place. The best way to combat that sort of structure is to have capable, experienced developers in charge of the production process. They're the one who are best suited to identify inefficiencies, establish tool-chains and processes, and train up-and-coming rookies. Yet the nature of the current game dev industry grinds developers up and burns them out before they can reach that point. The vast majority of developers leave the industry before their best days.

On a more personal note, I finally learned C++ recently, and have been having a lot of fun digging into some lower-level coding. Pointers, memory management, and header files confounded me for a long time. But some experience with Python and some practice tying a C library into Unity helped me to overcome that mental hurdle. Now I have an SDL2+OpenGL project running on my raspberry pi 3. Fun stuff.
Logged
Schrompf
Level 6
*

Currently off any meaningful development


View Profile WWW
« Reply #5530 on: September 13, 2019, 10:55:45 AM »

Grats. It can be satisfying.
Logged

Let's Splatter it and then see if it still moves.
Pages: 1 ... 275 276 [277]
Print
Jump to:  

Theme orange-lt created by panic