Posted: Sun Sep 16, 2018 5:23 am Post subject:
[RA2/YR] Manual shadow drawing, beginner's guide
Ok I figured I'd whip this up for people who make (or want to make) cut&paste buildings, or even for more advanced graphic artists like me who wlil even start with distorted Google Maps imagery, to get a better sense of the rules on how shadows are made.
Now I do want to preface this by saying Westwood seems to have changed their mind on shadow direction a number of times, you can see this in the tree art especially where (most) shadows follow TS-like cell angles, and many civilian buildings fall into between angles that aren't covered here. I mention this because as yet no one seems to have put in the work to homogenize all the Westwood art to conform, and thus there will always be variations and exceptions. Even some of the 3D tutorials seem to create a slightly more extreme or pronounced shadow angle than Westwood's dominant one. You could also look at it as you don't have to be perfect, as long as it falls within a given area, most people won't notice or care.
The first thing to note is that the shadow falls at roughly 45 degrees from vertical, this makes it relatively easy as a vector, with most drawing programs holding SHIFT will snap you to standard angles 0/45/90 with their line tool, but visually it is also easy to keep track of the pixel slope of 1 X 1. What you'll want to do is mark out these vectors for all the top/front/left corner features, this will provide the approximate spacing of elements, and give a sense of the overall image width you will require.
The next step is figuring out the tilt angle for the shadows, it falls between the dimetric view of 30deg and the horizontal 0deg. As noted earlier, this isn't a hard mathematical constant you must obey, but it should be approximately halfway between those two angles, if you end up with 13.2deg or 16.6deg, most people won't be bothered by it in the slightest.
Where these two vectors intersect is where the top faces (outlines of flat roof elements) will meet the ground. Note that the shape of the shadow for level roofs will be an exact match for the actual artwork, there is no shrinkage in shadows. If there are protrusions, work out the straight angles first, then manually add the details later, they won't need to be so precise. The two most important planes on a squarish or rectangular building will be the (bottom middle) vertical/corner edge and (bottom right) horizontal/roof edges. Repeat for each of these that isn't blocked (correct term is occluded) by other features, in the majority of cases there will be no need to find vectors for invisible rear features.
Once the basic shadow outline is complete, draw connecting shadow lines underneath the building itself to create an unbroken loop which can be filled with the fill tool. As a side note here, shadows do not have to be colour #1 in the palette, the game literally treats any non-zero as the shadow, I always recommend picking something high visibility for your palette like bright green or yellow.
When you become adept at this, you should be able to eyeball the shadow layout without having to resort to construction lines, but pitched/sloped roofs and non-rectangular buildings will take a bit more effort to learn.
Lastly, before finalizing your shp art, in SHP Builder, enable shadows and in the Tools->Fix menu select Remove useless shadow pixels! Not doing this will cause the shadow to render over the building with CNC Map Renderer, as well as FA2, but can also have weird side effects like hiding a portion of your damage/garrison frame in game.
If you're using a new-ish version of photoshop you can also render a shadow by turning the layer into a 1px depth 3D of itself, turn on isometric depth and render the shadow to a new layer. Probably more complicated than it's worth unless you've done it 100 times.
Here's a tutorial if you want to learn more. _________________ "Don't beg for things; Do it yourself or you'll never get anything." QUICK_EDIT
Figured I'd add another example, something I've been meaning to do for ages.
The point here is to replicate horizontal planes on the ground, and stack them along the shadow axis. If you have a Minecraft-like pyramid, each top face square would get replicated on the ground for example, with the sides connecting at the shadow angle.
Tracing 45deg lines from the top face corners is easy in pixel terms, 1:1, and the RA2 dimetric axis is likewise simple at 1:2 or 2:1 depending on direction. The shadow angle is a bit interpretive since it falls between something like 3.5:1 to 4:1 and will never have an equal spacing of line segments.
If you do your 45deg axis lines and create your top face planes on the ground and the resultant shape is too large or small, then either your axis lines aren't parallel or you didn't follow the top corner point to the ground correctly. If you do this in a proper graphics editor, you can select and copy the top faces of your building and paste to a new translucent layer that can be overlaid on the shadow shape to be sure it's right. You can also work backwards, in that if you have the actual copied image in the right spot, connecting it back to the foundation is easy as well.
That's logical enough, that a simple algorithm could do it automatically. Might be a worthy little extra for SHP Builder. _________________ SHP Artist of Twisted Insurrection: Nod buildings
If there was a way to select planes, like a draw dimetric box tool on the shadow frames, this could absolutely be automated with 90-95% results... requiring a few minutes of detail work. _________________ http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai QUICK_EDIT
i would write the algorithm, like going up with a horizontal scan-line from the bottom of the canvas.
For each step moving 1 pixel up, draw for all non-transparent pixel along the line, a shadow pixel diagonally to the right (could even get an arbitrary angle set).
It's like for each non-transparent pixel, draw 0.75 pixel right and 0.3 pixel up a shadow pixel (if the location there is transparent and not blocked with a pixel already). The actual height multiplier determined by the difference between the current scan-line height and the lowest non-transparent pixel height.
I think i might give it a try as a new feature for Image Shaper when i have some time. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Can you please write a tutorial on creating cut-and-paste buildings with the game's existing buildings using only Photoshop/Paint Shop Pro and how to get them into the game as I have both of them but mainly work in PSP and use PS for its effects ?
I want to put these buildings into the game and create a city set pack for the modding community.
I have no knowledge of using 3D software, but read somewhere that you can create buildings just by using image editors.
As for how to turn these things into SHPs, that's easy.
First, take a single building, get rid of all background.
Second, copy that frame/image with Ctrl+C or something.
Third, open SHP Builder, and create a new file with the settings attached below.
IMPORTANT: the actual frame size (Width and Height) will need to differ. This depends on the size of the building.
Once you have at least the first frame, you'll have to center it so it shows up in-game properly.
You need to align a building in such a way that the most northern point of the building base/foundation is in the exact middle/center of the frame.
You can display the Grid by using the second button after the Save icon; hit the small triangle pointing downwards and select RA2. Now you can see the RA2 Grid!
Clipboard02.jpg
Description:
IMPORTANT. Again, change Width and Height Dimensions accordingly.
Filesize:
275.53 KB
Viewed:
33810 Time(s)
_________________ One and only developer of the Command & Conquer Dune "C&C D" mod.
m7 wrote:
I tend to release things I create so that assets are never lost to hard drive problems, accidental deletion, or me having to pretend to care about rippers taking things from my project when it is done.
Ok I figured I'd whip this up for people who make (or want to make) cut&paste buildings, or even for more advanced graphic artists like me who wlil even start with distorted Google Maps imagery, to get a better sense of the rules on how shadows are made.
Now I do want to preface this by saying Westwood seems to have changed their mind on shadow direction a number of times, you can see this in the tree art especially where (most) shadows follow TS-like cell angles, and many civilian buildings fall into between angles that aren't covered here. I mention this because as yet no one seems to have put in the work to homogenize all the Westwood art to conform, and thus there will always be variations and exceptions. Even some of the 3D tutorials seem to create a slightly more extreme or pronounced shadow angle than Westwood's dominant one. You could also look at it as you don't have to be perfect, as long as it falls within a given area, most people won't notice or care.
The first thing to note is that the shadow falls at roughly 45 degrees from vertical, this makes it relatively easy as a vector, with most drawing programs holding SHIFT will snap you to standard angles 0/45/90 with their line tool, but visually it is also easy to keep track of the pixel slope of 1 X 1. What you'll want to do is mark out these vectors for all the top/front/left corner features, this will provide the approximate spacing of elements, and give a sense of the overall image width you will require.
The next step is figuring out the tilt angle for the shadows, it falls between the dimetric view of 30deg and the horizontal 0deg. As noted earlier, this isn't a hard mathematical constant you must obey, but it should be approximately halfway between those two angles, if you end up with 13.2deg or 16.6deg, most people won't be bothered by it in the slightest.
Where these two vectors intersect is where the top faces (outlines of flat roof elements) will meet the ground. Note that the shape of the shadow for level roofs will be an exact match for the actual artwork, there is no shrinkage in shadows. If there are protrusions, work out the straight angles first, then manually add the details later, they won't need to be so precise. The two most important planes on a squarish or rectangular building will be the (bottom middle) vertical/corner edge and (bottom right) horizontal/roof edges. Repeat for each of these that isn't blocked (correct term is occluded) by other features, in the majority of cases there will be no need to find vectors for invisible rear features.
Once the basic shadow outline is complete, draw connecting shadow lines underneath the building itself to create an unbroken loop which can be filled with the fill tool. As a side note here, shadows do not have to be colour #1 in the palette, the game literally treats any non-zero as the shadow, I always recommend picking something high visibility for your palette like bright green or yellow.
When you become adept at this, you should be able to eyeball the shadow layout without having to resort to construction lines, but pitched/sloped roofs and non-rectangular buildings will take a bit more effort to learn.
Lastly, before finalizing your shp art, in SHP Builder, enable shadows and in the Tools->Fix menu select Remove useless shadow pixels! Not doing this will cause the shadow to render over the building with CNC Map Renderer, as well as FA2, but can also have weird side effects like hiding a portion of your damage/garrison frame in game.
Dude! Where can I find a tutorial about SHP software to learn the basic or from 0 to pro?
Thanks advance. QUICK_EDIT
You cannot post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum