Popular Post vladislavbelov Posted June 26, 2018 Popular Post Report Share Posted June 26, 2018 I spent last 2 of my evening on the implementing of the addition light system in the pyrogenesis to find implementing bottlenecks for new objects. And I found some places, but that's not the topic. How additional lighting system looks: Fully dynamic lighting. And all light sources can be attached as props (i.e. to bones): "May the Light be with you..." But what restrictions do we have? We have 2 main: The lights can't throw shadows, because performance (we can implement it, but only few powerful videocards can handle it). There can't be many light sources in one place (at least for low videocards and since we don't support deferred rendering). Because shaders have own restrictions, particularly uniform sizes. But probably it's not the real problem. So I have a question: do we need additional light sources in near releases? Would it be real useful? P.S. I found strange normal values for some model, it should be investigated (probably the shader problem). 22 4 Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 26, 2018 Report Share Posted June 26, 2018 On 26/06/2018 at 9:04 PM, vladislavbelov said: The lights can't throw shadows, because performance (we can implement it, but only few powerful videocards can handle it). Expand "Ultra" Option maybe ? On 26/06/2018 at 9:04 PM, vladislavbelov said: There can't be many light sources in one place (at least for low videocards and since we don't support deferred rendering). Because shaders have own restrictions, particularly uniform sizes. But probably it's not the real problem. Expand Well it looks already gorgeous with the campfires. On 26/06/2018 at 9:04 PM, vladislavbelov said: So I have a question: do we need additional light sources in near releases? Would it be real useful? Expand Why not ? Do you have a patch somewhere@aeonios Ping On 26/06/2018 at 9:04 PM, vladislavbelov said: P.S. I found strange normal values for some model, it should be investigated (probably the shader problem). Expand Which one ? 2 Quote Link to comment Share on other sites More sharing options...
Trinketos Posted June 27, 2018 Report Share Posted June 27, 2018 maybe the alpha 24 is the last alpha that my pc cant run 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 27, 2018 Report Share Posted June 27, 2018 So, if we get glow maps implemented we can have light sabers. Nice. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 27, 2018 Report Share Posted June 27, 2018 (edited) On 26/06/2018 at 10:32 PM, stanislas69 said: "Ultra" Option maybe ? Expand Yes, please. Don't automatically nerf graphics options just because not everyone can see them (yet). I remember a time when the team poo pooed the idea of normal maps or even self-shadowing (!). Another thing we need is lighting conditions to affect particles correctly, such as smoke and dust. Edited June 27, 2018 by wowgetoffyourcellphone 1 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted June 27, 2018 Report Share Posted June 27, 2018 On 27/06/2018 at 7:04 AM, wowgetoffyourcellphone said: So, if we get glow maps implemented we can have light sabers. Nice. Expand Or glow aliens 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 27, 2018 Report Share Posted June 27, 2018 On 27/06/2018 at 7:05 AM, wowgetoffyourcellphone said: Don't automatically nerf graphics options just because not everyone can see them (yet). Expand IMO, I don’t see a reason as to why the capabilities of the engine should be held back just because there maybe people who can’t run it. Keeping features like this one as an option would give users with high-end machines a chance to enjoy them while at the same time others could still enjoy the game. The awesome graphics capabilites of Pyrogenesis is a huge plus point for it and I guess it wont hurt to have more Quote Link to comment Share on other sites More sharing options...
Stan` Posted June 27, 2018 Report Share Posted June 27, 2018 Also it's worth noting that Pyrogenesis should be a standalone engine. Just because 0 A.D. cannot handle it doesn't mean the engine shouldn't support it. IMHO the engine split would be great for that. 2 3 Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted June 27, 2018 Author Report Share Posted June 27, 2018 On 26/06/2018 at 10:32 PM, stanislas69 said: "Ultra" Option maybe ? Expand Of course as option I'm mostly interested, is it useful without shadows for artists/modders? On 27/06/2018 at 3:17 AM, Trinketos said: maybe the alpha 24 is the last alpha that my pc cant run Expand It'd be as option, so you'd can disable it. On 27/06/2018 at 7:04 AM, wowgetoffyourcellphone said: So, if we get glow maps implemented we can have light sabers. Nice. Expand It's a little bit different technique, the glow effect can exist without lightings. On 26/06/2018 at 10:32 PM, stanislas69 said: Do you have a patch somewhere Expand Yep, but it requires the refactoring as I mentioned. So you could test my phab patches to accelerate this implementation On 26/06/2018 at 10:32 PM, stanislas69 said: Which one ? Expand You may notice it on clothes on sticks near the bottom house of 2. 1 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted June 27, 2018 Report Share Posted June 27, 2018 Can be nice try to Hyrule conquest such feature, a game with magic can need it. Reveal hidden contents 2 Quote Link to comment Share on other sites More sharing options...
asterix Posted June 27, 2018 Report Share Posted June 27, 2018 On 27/06/2018 at 7:08 PM, Lion.Kanzen said: Can be nice try to Hyrule conquest such feature, a game with magic can need it. Reveal hidden contents Expand it definitely will for Gohma (eg. eggs, glowing eyes ...) and other civs, which means it would be useful to be able to make settings for this in Atlas editor such as brightness or where to attach it ... 2 Quote Link to comment Share on other sites More sharing options...
elexis Posted June 27, 2018 Report Share Posted June 27, 2018 The gifs look so good that it'd be a shame not to have it. Imagine some guys walking through the forest with torches or a campfire at night! 5 1 Quote Link to comment Share on other sites More sharing options...
aeonios Posted June 29, 2018 Report Share Posted June 29, 2018 Hm. Without using some form of complexity reduction lights become very expensive very rapidly. 0ad's art heavily uses transparency so deferred rendering isn't an option. Forward+ could work but I'm pretty sure that requires openGL 3.x. 1 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted June 29, 2018 Report Share Posted June 29, 2018 Reveal hidden contents Lighting/laser and fire attacks, force field shield...etc. Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted July 3, 2018 Author Report Share Posted July 3, 2018 On 29/06/2018 at 3:54 PM, aeonios said: Forward+ could work but I'm pretty sure that requires openGL 3.x. Expand Nope, it doesn't need it. On 29/06/2018 at 3:54 PM, aeonios said: 0ad's art heavily uses transparency so deferred rendering isn't an option. Expand The deffered rendering can be easily used with transparent objects too. Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted July 3, 2018 Author Report Share Posted July 3, 2018 Another using of lightings: 10 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted July 3, 2018 Report Share Posted July 3, 2018 Awesome! Are you working on rain effects too? Those raindrops seem to be falling correctly, not like they do now. Quote Link to comment Share on other sites More sharing options...
aeonios Posted July 3, 2018 Report Share Posted July 3, 2018 On 03/07/2018 at 11:16 PM, vladislavbelov said: Nope, it doesn't need it. Expand Eh, if you want more than a couple of lights then you do. I don't know if it absolutely needs openGL3.x but it does need to do some fancy data structure access in order to know which lights it needs to draw and to access the data for those lights. I don't know how all of that works unfortunately, and it seems to be more complicated to code than deferred rendering is. On 03/07/2018 at 11:16 PM, vladislavbelov said: The deffered rendering can be easily used with transparent objects too. Expand Sure, except that they won't be lit by dynamic lights at all, which would look really bad given the amount of transparency used in 0ad. Trees, bushes, even things like shields would stand out like a sore thumb. Everything under water as well. Forward+ would allow everything to be lit dynamically, deferred would not. On 03/07/2018 at 11:18 PM, vladislavbelov said: Another using of lightings: Expand That is pretty cool. Lightning looks kinda bad without dynamic shadows though. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted July 4, 2018 Report Share Posted July 4, 2018 On 03/07/2018 at 11:51 PM, aeonios said: That is pretty cool. Lightning looks kinda bad without dynamic shadows though. Expand Looks pretty good to me, even without dynamic shadows. 1 Quote Link to comment Share on other sites More sharing options...
Trinketos Posted July 4, 2018 Report Share Posted July 4, 2018 On 03/07/2018 at 11:18 PM, vladislavbelov said: Another using of lightings: Expand Weather confirmed? 1 Quote Link to comment Share on other sites More sharing options...
elexis Posted July 4, 2018 Report Share Posted July 4, 2018 Same question here, how is the rain implemented? (As the camera isn't moving it could also be a single 2D texture cheat) The rain we currently have is extremely low performant and rotates with the camera tilt which is incorrect as mentioned by wow. 2 1 Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted July 5, 2018 Author Report Share Posted July 5, 2018 On 03/07/2018 at 11:29 PM, wowgetoffyourcellphone said: Awesome! Are you working on rain effects too? Those raindrops seem to be falling correctly, not like they do now. Expand Currently I'm trying to add features that popular in modern engines and liked by players to find different implementation bottlenecks in our code. On 03/07/2018 at 11:51 PM, aeonios said: Eh, if you want more than a couple of lights then you do. I don't know if it absolutely needs openGL3.x but it does need to do some fancy data structure access in order to know which lights it needs to draw and to access the data for those lights. I don't know how all of that works unfortunately, and it seems to be more complicated to code than deferred rendering is. Expand Yes, I mentioned, that it doesn't support many lights per model. Usually video card can support from 8 to 128 lights per model. It uses simple uniform structs (even not UBO). // 8 floats per struct. struct PointLight { vec3 position; float radius; // vec2 - compressed 4 components, instead of unsupported "half". vec2 color; vec2 coef; // Cubic curve coef. }; So we can calculate how many lights we can use from GL_MAX_FRAGMENT_UNIFORM_COMPONENTS. On 03/07/2018 at 11:51 PM, aeonios said: Sure, except that they won't be lit by dynamic lights at all, which would look really bad given the amount of transparency used in 0ad. Trees, bushes, even things like shields would stand out like a sore thumb. Everything under water as well. Forward+ would allow everything to be lit dynamically, deferred would not. Expand There're 2 import notes: 1) we can use forward and deferred rendering simultaneously (i.e. for different distance), 2) as you noticed we don't have a lot of semitransparent objects; trees, bushes have transparent only for soft edges, so on enough distances we can render them without alpha blending and they're not transparent objects anymore (we don't need to be honest for rendering always; if it looks the same/very similar but cheaper, then we'd can use the cheaper one). On 03/07/2018 at 11:51 PM, aeonios said: That is pretty cool. Lightning looks kinda bad without dynamic shadows though. Expand If we assume that we don't have a sun at rain, then we'd easily add shadows to the lightnings On 04/07/2018 at 1:49 AM, Trinketos said: Weather confirmed? Expand Nope (at least not yet). It'd be confirmed when it'll be in the our main repository On 04/07/2018 at 12:03 PM, elexis said: Same question here, how is the rain implemented? (As the camera isn't moving it could also be a single 2D texture cheat) The rain we currently have is extremely low performant and rotates with the camera tilt which is incorrect as mentioned by wow. Expand It uses 2D rain texture (drawn by me in Ps for 5 mins ) on many long crosses with double side rendering (because many particles would be slow). They're not moving when the camera is moving. So it seems a correct rain. Current implementation doesn't use shaders yet, but with shaders it can be a little bit nicer. 4 Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 5, 2018 Report Share Posted July 5, 2018 On 05/07/2018 at 11:23 AM, vladislavbelov said: It uses 2D rain texture (drawn by me in Ps for 5 mins ) on many long crosses with double side rendering (because many particles would be slow). They're not moving when the camera is moving. So it seems a correct rain. Current implementation doesn't use shaders yet, but with shaders it can be a little bit nicer. Expand Can you make this a separate patch ? The best way, would be a simulation triggerable version of it But a map specific one is fine too. 1 Quote Link to comment Share on other sites More sharing options...
aeonios Posted July 5, 2018 Report Share Posted July 5, 2018 On 05/07/2018 at 11:23 AM, vladislavbelov said: There're 2 import notes: 1) we can use forward and deferred rendering simultaneously (i.e. for different distance), 2) as you noticed we don't have a lot of semitransparent objects; trees, bushes have transparent only for soft edges, so on enough distances we can render them without alpha blending and they're not transparent objects anymore (we don't need to be honest for rendering always; if it looks the same/very similar but cheaper, then we'd can use the cheaper one). Expand That's not actually true. Most of the foliage uses transparency not only for soft edges but also to blend with terrain and other foliage behind. I messed around with foliage a bit and found that the bleed-through effect was much more prominent than the soft-edge effect (which doesn't seem to be used particularly well at all). Fixing all of the art to use alpha test would take a lot of work and the results might be questionable. On 05/07/2018 at 11:23 AM, vladislavbelov said: It uses 2D rain texture (drawn by me in Ps for 5 mins ) on many long crosses with double side rendering (because many particles would be slow). They're not moving when the camera is moving. So it seems a correct rain. Current implementation doesn't use shaders yet, but with shaders it can be a little bit nicer. Expand Particles can be fast but you have to use drawinstanced and geometry shaders, which are GL3. Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted July 5, 2018 Author Report Share Posted July 5, 2018 On 05/07/2018 at 1:44 PM, aeonios said: That's not actually true. Most of the foliage uses transparency not only for soft edges but also to blend with terrain and other foliage behind. I messed around with foliage a bit and found that the bleed-through effect was much more prominent than the soft-edge effect (which doesn't seem to be used particularly well at all). Fixing all of the art to use alpha test would take a lot of work and the results might be questionable. Expand The terrain isn't transparent and blending doesn't make sense after the blending is done (especially on long distances), so there is no problem with it. Yes, it requires a work, but it's simple. On 05/07/2018 at 1:44 PM, aeonios said: Particles can be fast but you have to use drawinstanced and geometry shaders, which are GL3. Expand True, as the tessellation one But it's the another level. It can't be faster than simple quads with a texture. But it can be nicer. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.