Platform Masters - Will you be the world's next platform master?
Date: March 17, 2014
Screenshot #511: After plenty of fine tuning on the shapes and standardization among as many vehicles as possible, the last major task in the designing phase is the lighting. For this, I use the "sphere lighting" image I generated a few years back. I simply repeatedly scale, resize, and crop the source sphere to get the light map I need based on PM's lighting setup. I need one layer for the basic lighting arrangement and another for the shadows. The source image goes from pure white for maximum brightness to pitch black for maximum darkness. I make the image a grayscale image and set the layer mode to "multiply" and the layer opacity to 57.3% to get the final results. In this screenshot, I just scaled something for that exhaust pipe poking out of the tank truck. You can see the gradient and a few shadows in this.
Date: March 17, 2014
Screenshot #512: One of the toughest puzzles/problems I encountered while processing the lighting of the traffic is how to get everything to blend together. Back when I last made the traffic, I didn't have the sphere light map, only the imprecise zoning-based lighting system. Dead center in the sphere is grayshade 147 and yet, in the bottom right corner area, I have it as 190. There's a huge contrast jump between the full direct on shade to what I have, as shown in this screenshot. You can see that, in a few areas, the optimal contrast blends in quite well. I'm just trying various methods to figure out a solution to this long-standing problem. The only thing I can think of is to use a consistent span for the gradient on the outside or extend the sphere parts to where it just before it goes under 147. I'm thinking of the latter but if that doesn't work, the former is the only other alternative.
Date: March 18, 2014
Screenshot #513: It turns out that the latter method explains in screenshot 512 above works quite well. It took a bit of creative thinking in a few areas, but, in the end, it worked out very well. I had to think of an algorithm for processing the lighting on the tires. Basically, tires are nothing more than a flattened torus. Until this point, I couldn't think of a way to get lighting for a torus. When I thought of it in a different way, I came up with a system that definitely resembles a torus for lighting.
Because the tank on the tank truck is intended to be exactly the same one as that on the trains, I need to update the trains for this. In the end, the tank truck, based on the semis, really turned out nice. However, I don't have just the right-facing direction to deal with.
I also have the left-facing direction too which doesn't have the same lighting conditions. Although the tank on top is not affected at all (it'll just get flipped again), it's the front of the vehicle that needs the change.
Date: March 18, 2014
Screenshot #514: I thought it would've worked and it did... but only for the right-facing side. I'm now back to figuring out what's going on here and how to correct it. This is the left-facing side I'm working on which has darker lighting as it faces away from the Sun. The catch? The method I used before only works on the right-facing side. This method would work but only on the parts facing the bottom left.
I point out where the good parts are and where the bad parts are in this screenshot. Areas that are purely spherical work out fine. Areas that are perfectly straight and level also work out fine. It's the areas that are sloped that have the difficulty. It's the transitions from the spherical to the straighter areas that are just curved and also the transition from these into the actual head-on shade which is gray shade 147. I wonder what solution I'll come up with regarding this situation. Note the use of grayscale for lighting. I just use the "multiply" mode and set the alpha to 57.3% to get the final result with actual lighting.
Date: March 21, 2014
Screenshot #515: What a hassle that was! The only solution I could come up with for this was to apply a gradient that faded to the intended shade. A linear gradient is quick to do but it resulted in too sharp and sudden of a transition. The top was too strong. The only fix was to use a more complex gradient.
In this case, a squaring of the value relative to tha max. By this, I mean, for example, if I was at the exact halfway point on the gradient, I would use, not the 1/2 that a linear gradient would have, but 1/4 (meaning 64 for the value instead of 128). If I referenced the point 1/5 of the way to the max (value of 51), I would have 1/25 of the value instead (a value of 10). For something like 2/3 (170), I'd have 4/9 (113). This produced a much better result than the linear gradient but wasn't enough.
I tried a 6th power gradient (where the 1/2 (128) becomes 1/64 (4) and the 2/3 (170) becomes 64/729 (11)), after seeing how my math notes came out. Aside from the oversight where the starting point of my test blend (an average in the spreadsheet), was the end of the zone I needed, I saw that the gradient was way too sudden and too weak. The exponent was too high.
The next attempt was a middle ground, a 4th power gradient (where the 1/2 (128) becomes 1/16 (16) and the 2/3 (170) becomes 16/81 (50)). This screenshot shows the process of me making this 4th power gradient. Note the familiar use of Excel to determine what's what.
So, you're probably wondering, what's the cause of the problem and why do I need the gradient? My light map is based on a sphere. A sphere essentially has 2 angles present to indicate a specific point on it: an azimuth (a compass direction, in a sense), and an elevation (how far above or below the horizon it is). (There's also a distance, to complete the 3D polar coordinate system, but that is irrelevant for this.)
When I copy from the spherical lighting, I either copy entire sections of the sphere or straight lines. As you can see in the shape image, you can see that the elevation (slope) changes. As a consequence, I shift the image over to that approximate slope and copy that vertical line. The problem is, this only changes the elevation and not the azimuth. It's the fact that the azimuth isn't being changed that's causing the sudden contrasts in the lighting. If I go from the other direction, I would be changing the azimuth but not the elevation. Changing both together requires some really complicated math and would have to be done on a pixel-by-pixel basis and would just cost way too much time.
To fix this, I need to somehow "change" the second value. The only option for that that I can think of is using a gradient that gradually leads toward the intended shade. This is the most time-effective method that I could think of, given the large quantity of vehicles to process.
Date: March 21, 2014
Screenshot #516: The 4th power gradient, when checked, comes out very close. It's only slightly dark. I could tweak the exponent a bit, using a lower value (either base e (2.7183), a cube, or something around 3.6 to 3.9 should do), or I could leave it as is. Because the image is to be scaled down, these differences wouldn't be as noticeable. It seems that I would be much better off writing a program to generate the gradients instead of doing it the old-fashioned way as it's not as simple as I once thought.
Date: March 22, 2014
Screenshot #517: The solution? I tried base e but it was slightly too strong and very close. I then tried the cube and found it amazingly close, close enough for what I was after. Remember, the gradient shown above is actually the worst possible case, with 0 ambient and a pure white vehicle. PM, however, has a 42.7% ambient so that means the contrast is barely 57.3% (about 4/7) as strong as it could be otherwise. That's not the only effect. Vehicles going to the left are always farther away than those going to the right. This means, instead of being 5:2 scale down for the closest layer of cars (I might have them even closer (at 1 1/8 SU instead of 1 1/4), making a 9:4 scale down instead), it's actually a rather high 11:4 scale down at the closest possible. This means more pixel blending is needed so this offset is even harder to see making for a finer offset.
This screenshot, showing the ambulance, is how the closest known solution looks. You almost can't see the sudden shifts and this is the worst case possible - the bright white ambulance really stands out making for the highest contrast. A darker vehicle would only have less contrast.
Now all that's left is to process the lighting for every other vehicle. However, in order for the lighting to work out right, I have to have the curves all the same. Otherwise, I'd have to do more blending (best where it's easier to do - the perfectly flat areas). This means more shape adjustments are needed. This is also the last time I can make any adjustments to the vehicles without needing a lot of work to update them.
Date: March 25, 2014
Screenshot #518: Plenty of progress has been made with the traffic. The sheer number of variations among the cars makes for the need of a large number of layers (note the almost 300 layers, of which is to increase another roughly 40 on top of this (accounting for the temporary layers)). The semis are the biggest of all the vehicles making them the most visible of all. The Office 101 semi is shown here - a basic design using typical office supplies - printer ink (for the text), paper (or a facsimile - to print on), scotch tape (to keep something in place), staples (to keep sheets of paper together), and paper clips (a more temporary way to keep things together).
So then, just how visible are the vehicles? That's what this screenshot covers. The bottommost, largest image is what I'm using for my design, the original. It's based on being only 1/2 SU distant, closer than the closest objects used in PM (the limit is 1 SU). The center layer has 1 1/4, 1 1/2, and 2 SU. The layer at 1 1/4 SU is the point in which the smallest font used is marginally readable. This is also the closest that the traffic gets to the scene (I'm considering 1 1/8 SU, to be exclusive to world 11). At 1 1/2 SU, the next bigger font size starts to become difficult to make out. Typically, however, a center divider is at the 1/2 marks. At 2 SU, the next bigger font size (not used in this scene) becomes hard to see and a lot of the fine details become very hard or impossible to make out.
The top row contains the remaining samples. They start from 3 SU and continue all the way to an incredible 64 SU. The order is: 3, 4, 6, 8, 12, 16, 24, 32, 48, then 64. What was a nice, big 704x176 pixels (352x88 CU) gets reduced to a mere 5 1/2 by 1 3/8 pixels (barely more than 7 1/2 square pixels). Now think of the tiny motorcycle. It's 48x32 CU. That gets reduced to only 3/8 of a pixel - 3/4 by 1/2 - at 64 SU. That's so tiny that, even with the maximum possible contrast and no transparent space all around, it's almost impossible to see it at all. With all that transparency around, it's barely 1/8 opaque meaning a maximum possible contrast of 40 under perfect conditions. This is the very reason why I limit the visibility of the traffic. Currently, 16 SU is my target visibility limit. I'm considering raising it to 32 SU (with Lake Keveran and Carnivalesta being key exceptions, the latter due to the lights that make them very obvious). Beyond about 10 to 12 SU, provided you recognize the text from closer cases (6 to 7 SU if you don't recognize it), even the largest of the fonts that get used begins to become unreadable. That is some serious visibility! It is intentional though - it's something to fulfill that curiousity, to better appreciate all the finer details I put into the scenery.
At this point, only 3 vehicle types remain. The truck is the most basic and with the tow truck done, I can just copy its design. What I used to call a minivan is now called the sedan and is a larger-sized family car. What I used to call a sedan is now called a compact, a very small car meant for getting back and forth to work as it's very fuel efficient. Finish these 3 vehicles and I can finally begin the fun stuff. One thing I'm considering is making the semi and bus tires a bit bigger still. Currently, they're 16 CU in diameter, 33% bigger than the 12 CU car tires and 40% bigger than the 10 CU motorcycle tires. I'm leaning toward 20 CU for the diameter, making them 67% bigger than regular car tires (maybe 22 CU at the extreme biggest, for 83% bigger than a regular car's tire). No major change would be needed for this as it fits within the tire area itself with plenty of room to spare and that's quick enough to do with some basic copy paste.
Date: March 29, 2014
Screenshot #519: After a long time setting up the positions, taking longer than expected due to an oversight I made, and after a while rerandomizing the positions to get worthy screenshots, the traffic in world 11 is finally finished. This screenshot shows a good variety of the vehicles. The red motorcycle looks quite small even though it's very close. The Osa Police car is quite easily readable. Osa is a big city that's north of Carnivalesta just beyond the mountains though this location is farther north of Osa. The Sentus Bus Depot is basically a travel bus service specific to the Sentus region. The logo has the old style mountains I had, intentional.
In the other direction, on the left, is the Office 101 semi. Just to the right is the Hardwaremart semi which has ads for various flooring stuff. Note the use of "wood replica". The prices might seem rather high, especially concrete, but keep in mind that it's not the foot that's the standard unit, it's the block which 4.69 feet. Square that for the 3 that aren't concrete and cube that for the one for concrete and it really gets big numbers. In actualality, they are actually quite low. Just barely visible to the right is a tow truck. There is an actual hook on the back, but it's hard to see due to near-zero contrast.
As an enhancement, I've added shadows for the constant things like the rail supports and the fence. I've also updated the fence as well, to standardize it and make some slight improvements on it as well.
Date: March 29, 2014
Screenshot #520: This screenshot shows more traffic variety. The semi hauling hydrogen is quite familiar as it's also the same thing used with the train (note that I've enhanced it on the train too). Electronics Island is partially visible behind it and a motorcycle is present in front. In the foreground, there's a fire truck (the hoses and stuff are hidden behind hatches - that gray area), an ambulance, and a regular truck in orange.