Greetings and salutations!
For this week's screenshot, a look at a change made to the lighting of darker areas under the sun-light:
The work of the week just past was somewhat of a miscellany, almost all focussed on level-geometry and shaders, but across a variety of individual elements.
Monday, November 20. 2017
Lighting, Colours, and Textures
First, however, a salient change that is not related to level-geometry or shaders: There is now a "Goal" tab in the "Collections" screen, which holds a brief description of the player's current objective. Along with this is a new popup, informing them when this text changes.
This does use an entire tab for a single, brief piece of text, but I think that it may be useful, and I didn't see a better place for it. It was tempting to add it to the "Inventory" tab, which has space, but I felt that this would be a rather unobvious place to look for a reminder of one's goal.
I was also tempted to put the new tab to greater use, adding in further notes discovered over the course of a level. However, I think that I felt this to be a bit too much of an addition to the game at this stage in development.
Moving on to matters of the first level, work continues on the woods that surround the barrow. These are coming along, I do think.
One element that I'm particularly happy with is the use of a "noise image" to vary the colour of the trees. I had previously achieved this via a shader input applied to each individual tree-top, and this worked well enough. However, I realised that it had a problem: For performance reasons, I wanted to merge the trees into a few large chunks, reducing the number of nodes in the scene-graph. But in doing so, I would of course lose those individually-applied input-values, since there would no longer be individual nodes to which to apply them.
So what I now have is a texture that is sampled to replace that shader-input, using the world-space coordinates of the trees' vertices to generate coordinates. This seems to work well, and has the additional advantage that these colour-offsets blend into each other, rather than changing sharply from one tree to the next.
Unfortunately, the woods are currently somewhat broken: I'm trying to squeeze some additional data in via multiple sets of texture-coordinates, but for some reason I'm not getting that data out in my shaders. I've asked for help on the Panda3D forum, and am waiting for a reply!
I've shown my sky-shader before, I believe. Something that I've been unsatisfied with in it has been the lack of clouds--the sky is always entirely clear. In the week just past I gave some time to addressing that.
My first attempt, as I recall, was to generate them in the shader itself, using a noise-texture as their basis. This proved quite difficult: creating cloud-like forms wasn't a major problem, but generating texture-coordinates that spread them across the sky in appropriate fashion proved more troublesome. In the end I gave up on this approach.
Instead, what I've done is somewhat simpler, and in many ways rather easier: Clouds are represented via flat geometry with an appropriate texture applied, tagged to be treated as part of the "view" (much like the surrounding countryside in the prologue level). "View" objects are automatically attached to the sky-object, and thus remain in place as the player moves, giving the impression of distance. Painting the clouds themselves proved a minor challenge, but I think that I'm fairly happy with the result.
The sunlight shader saw two changes that I'd like to mention:
First is a "saturation" value, stored in vertex colours. This allows me to selectively desaturate certain elements, thus varying their colours a little bit. I added it for use on the trunks of the woodland trees, as I recall, but I could see it being used elsewhere in future.
Second is a change to the lighting: where before parts of a model that were turned away from the sun-light were uniformly dim, they are now darker the more they're turned from it. This, I feel, gives darker areas a little more shape than they previously had, and allows their normal-maps to show. The effect is, however, still somewhat experimental and probationary.
I also did a little work on two of the level's 3D models, finishing off the the wooden keys used to access the upper tombs and a small hinged box in which some important items are found. (Although the latter might see some touch-ups.)
And finally, a few other things were done that don't seem worth further lengthening this post!
That then is all for this week--stay well, and thank you for reading! ^_^
This does use an entire tab for a single, brief piece of text, but I think that it may be useful, and I didn't see a better place for it. It was tempting to add it to the "Inventory" tab, which has space, but I felt that this would be a rather unobvious place to look for a reminder of one's goal.
I was also tempted to put the new tab to greater use, adding in further notes discovered over the course of a level. However, I think that I felt this to be a bit too much of an addition to the game at this stage in development.
Moving on to matters of the first level, work continues on the woods that surround the barrow. These are coming along, I do think.
One element that I'm particularly happy with is the use of a "noise image" to vary the colour of the trees. I had previously achieved this via a shader input applied to each individual tree-top, and this worked well enough. However, I realised that it had a problem: For performance reasons, I wanted to merge the trees into a few large chunks, reducing the number of nodes in the scene-graph. But in doing so, I would of course lose those individually-applied input-values, since there would no longer be individual nodes to which to apply them.
So what I now have is a texture that is sampled to replace that shader-input, using the world-space coordinates of the trees' vertices to generate coordinates. This seems to work well, and has the additional advantage that these colour-offsets blend into each other, rather than changing sharply from one tree to the next.
Unfortunately, the woods are currently somewhat broken: I'm trying to squeeze some additional data in via multiple sets of texture-coordinates, but for some reason I'm not getting that data out in my shaders. I've asked for help on the Panda3D forum, and am waiting for a reply!
I've shown my sky-shader before, I believe. Something that I've been unsatisfied with in it has been the lack of clouds--the sky is always entirely clear. In the week just past I gave some time to addressing that.
My first attempt, as I recall, was to generate them in the shader itself, using a noise-texture as their basis. This proved quite difficult: creating cloud-like forms wasn't a major problem, but generating texture-coordinates that spread them across the sky in appropriate fashion proved more troublesome. In the end I gave up on this approach.
Instead, what I've done is somewhat simpler, and in many ways rather easier: Clouds are represented via flat geometry with an appropriate texture applied, tagged to be treated as part of the "view" (much like the surrounding countryside in the prologue level). "View" objects are automatically attached to the sky-object, and thus remain in place as the player moves, giving the impression of distance. Painting the clouds themselves proved a minor challenge, but I think that I'm fairly happy with the result.
The sunlight shader saw two changes that I'd like to mention:
First is a "saturation" value, stored in vertex colours. This allows me to selectively desaturate certain elements, thus varying their colours a little bit. I added it for use on the trunks of the woodland trees, as I recall, but I could see it being used elsewhere in future.
Second is a change to the lighting: where before parts of a model that were turned away from the sun-light were uniformly dim, they are now darker the more they're turned from it. This, I feel, gives darker areas a little more shape than they previously had, and allows their normal-maps to show. The effect is, however, still somewhat experimental and probationary.
I also did a little work on two of the level's 3D models, finishing off the the wooden keys used to access the upper tombs and a small hinged box in which some important items are found. (Although the latter might see some touch-ups.)
And finally, a few other things were done that don't seem worth further lengthening this post!
That then is all for this week--stay well, and thank you for reading! ^_^
Trackbacks
Trackback specific URI for this entry
No Trackbacks