Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Tue Mar 19, 2024 4:51 am
All times are UTC + 0
[RA2/YR] Manual shadow drawing, beginner's guide
Moderators: Global Moderators, Media Hut Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Sep 16, 2018 5:23 am    Post subject:  [RA2/YR] Manual shadow drawing, beginner's guide Reply with quote  Mark this post and the followings unread

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.



shadowtut1.jpg
 Description:
 Filesize:  55.87 KB
 Viewed:  15170 Time(s)

shadowtut1.jpg



shadowtut2.jpg
 Description:
 Filesize:  62.83 KB
 Viewed:  15170 Time(s)

shadowtut2.jpg



shadowtut3.jpg
 Description:
 Filesize:  57.03 KB
 Viewed:  15170 Time(s)

shadowtut3.jpg




Key Words: #Tutorials #SHPs #Graphics #Media #RedAlert2 #YurisRevenge #Ares #OpenRA #XCCUtilities #Photoshop #OSSHPBuilder 

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri Oct 26, 2018 9:15 am    Post subject: Reply with quote  Mark this post and the followings unread

Thorough utilitarian shadow guide thanks

_________________

Back to top
View user's profile Send private message Skype Account
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Fri Oct 26, 2018 1:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

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."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
cxtian39
Commander


Joined: 11 Feb 2016

PostPosted: Fri Oct 26, 2018 4:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

Nice to know but I’m not sure I can get one

_________________

Back to top
View user's profile Send private message Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Mar 03, 2020 8:06 am    Post subject: Reply with quote  Mark this post and the followings unread

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.



shadowex.jpg
 Description:
 Filesize:  214.2 KB
 Viewed:  9895 Time(s)

shadowex.jpg



_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Last edited by G-E on Tue Mar 03, 2020 9:51 am; edited 3 times in total

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Mar 03, 2020 8:30 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Mar 03, 2020 8:32 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Mar 03, 2020 9:13 am    Post subject: Reply with quote  Mark this post and the followings unread

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

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
adamstrange
Tiberian Fiend


Joined: 07 Mar 2013

PostPosted: Tue Jun 08, 2021 9:05 am    Post subject: Reply with quote  Mark this post and the followings unread

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.

I made these in PSP 2020



2020-12-31_041537.png
 Description:
 Filesize:  1.75 MB
 Viewed:  7655 Time(s)

2020-12-31_041537.png



Back to top
View user's profile Send private message
TAK02
General


Joined: 28 Jun 2015
Location: It was Damascus.

PostPosted: Tue Jun 08, 2021 1:24 pm    Post subject: Reply with quote  Mark this post and the followings unread

This is some nice-looking copy-paste stuff.

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:  7631 Time(s)

Clipboard02.jpg



_________________
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. #Tongue

Back to top
View user's profile Send private message Send e-mail Visit poster's website ModDB Profile ID YouTube User URL Twitter Channel URL Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
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


Powered by phpBB © phpBB Group

[ Time: 0.1434s ][ Queries: 19 (0.0129s) ][ Debug on ]