Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorMonsen
    • CommentTimeDec 4th 2017 edited
     

    Index

    1. List (Basic)
    2. Symbols Along (Intermediate)
    3. Fractalise (Intermediate)
    4. Edit Text (Basic)
    5. Link with Map/File (Intermediate)
    6. Offset (Intermediate)
    7. Measuring Tools (Basic)
    8. Change like draw tool (Basic)
    9. Modifiers (Intermediate)
    10. File Paths (Intermediate)
    11. Complex Shapes [Combine Path] (Intermediate)
    12. Complex Shapes [Multipoly] (Intermediate)
    13. Break (Intermediate)
    14. Map Notes (Basic)
    15. Coordinates (Intermediate)
    16. Macros (Advanced)
    17. Search Files for Text (Basic)
    18. Text Justification (Basic)
    19. Mirrored Polygons (Intermediate)
    20. Managing Drawing Tools (Intermediate)
    21. Named Views (Basic)
    22. Symbol Lookup Sheets (Intermediate)
    23. Symbol Catalog Settings (Advanced)
    24. Symbol Catalog Filters (Advanced)
    25. Symbol Control Points (Advanced)
    26. Define Symbol (Intermediate)
    27. Curves (Basic)
    28. Selections (Intermediate)
    29. Sort Symbols in Map (Basic)
    30. Extract Properties (Basic)
    31. Convert File (Basic)
    32. Get Extents (Advanced)
    33. Quick Move (Basic)
    34. Menu Editing (Advanced)
    35. Trace (Basic)
    36. Array Copy (Intermediate)
    37. Explode (Basic)
    38. Clipboard Copy (Basic)
    39. Rename & Reorder (Intermediate)
    40. Drawtools Edit (Basic)
    41. Trims (Basic)
    42. Symbol Attributes (Intermediate)
    43. Fill Style Selection Mask (Basic)
    44. Browse Files (Basic)
    45. Node Editing (Intermediate)
    46. Automatic Sheet Selection (Basic)
    47. Scale (Basic)
    48. Text along a Curve (Basic)
    49. Shaded Polygons (Intermediate)

    CC3+ contains a huge amount of various commands and features. In this series, I plan to highlight some of these. There won't be any special progression to this series, and the command will be selected from the entire range, from the simple basic commands, to more advanced features intended for the more advanced users. Feel free to use this topic to discuss the command presented. If you have a command you wish to have showcased, feel free to request it, and it may get presented.
    This series is called the command of the week, but it could also explain a feature or effect. The explanations will tend to explain the technical parts of the command, and is intended to highlight the basics (and complexities) of the command, but won't be a detailed tutorial on how to use it. It is up to you to use it creatively in your maps.

    Week 49 - Shaded Polygons

    You may have noticed that even if you rotate an entity, it's fill is not rotated, but it always oriented on screen the same way as the orientation of the source image file. Except for the roofs of drawn houses in CD3 and Per3 drawings. These two products uses a special kind of entity, a shaded polygon to accomplish this. A shaded polygon actually does a whole bunch of different things, but for normal use, there are two features that we are particularly interested in, and that is the ability to rotate a fill, and the ability to apply light and shading to entities based on the direction they are facing in relation to the global sun.

    roof.png

    Where to find it?

    Toolbar: Right Click polygon.png -> Shaded Polygon, Shaded Polygon (Angle By Edge), Change Shade Angle, Change Shade Pitch
    Command Line: SHADEPOLY, SHADEPOLY2, SHADEANGLE, SHADEPITCH, EDITSHADING

    How to use it?

    To use any of these commands, you first need to start by drawing yourself a nice polygon, preferably at an angle to properly observe the effects. For my example here, I have drawn two polygons right next to each other with the intention of drawing the roof of a house seen from above, like in a CD3 map. The first drawing doesn't look much as a roof at all, it looks very flat, and the roof tiles are angled very wrong. If your roof tiles look like that, you're going to need to have a serious talk with whoever built it.
    Now, to turn this abomination into a proper roof, we can use the Shaded Polygon command on it. When it comes to roofs, using the Angle by Edge variant is the easiest, since you don't normally need the extra control the regular version gives you. Simply start the command, and then click on the side of the roof poly that represents the lower edge of the roof. You should see that the fill orients itself so that the bottom of the fill points toward the side of the polygon you chose (Marked with red circles in my example), and it gets lighted or shaded depending on if it is facing the sun or not.

    Pitch

    By default, the Shaded Polygon (Angle By Edge) uses a roof Pitch of 45 degrees. If you wish to use a different value, simply type it in on the command line before clicking on the polygon edges. You can also change the pitch of the roof later with the Change Shade Pitch command, or through the more advanced EDITSHADING command.

    Angle

    Shaded Polygon (Angle By Edge) automatically sets the shade angle based on the edge you clicked on, this greatly simplifies the task of getting this value correct. If you used the regular Shaded Polygon command, you would have needed to provide the angle yourself instead. The angle can later be changed by using the Change Shade Angle command, or through the EDITSHADING dialog.
    Note that the appropriate shading angle for a roof is the angle perpendicular to the angle of the lower edge, in the direction from the lower edge to the upper edge. While not hard to calculate, simply using the Angle by Edge version instead saves you from both knowing and calculating this, the only requirement is that when using Angle by Edge, you MUST click on edge that represents the lower end of the slope, while the regular Shaded Polygon work no matter where on the entity you select it.

    Rotated fill without shading

    There are also times when you just want to rotate the fill, but you don't want shading. For example, you wish to rotate the floorboard fill of your floor to match the actual direction of the house, the way any sane carpenter would do it.
    When you use Shaded Polygon (any version) on your floor, you'll notice that the shading causes it to change color no matter what pitch you use, but you really want to use the original non-shaded version of the fill. To do this, simply use Shaded Polygon on it first, getting the correct alignment. Then, run the EDITSHADING command, select your new shaded polygon, Do It, and the 'Roof shaded Polygon' dialog should show. A lot of the options in this dialog are needed for Perspective entities, but there is a couple of interesting options in here. First, we can see Angle and Pitch up at the top. These can be changed through other commands too, but this is also a nice place to change them. Then we have the "Shade Only Copy" and "Don't Rotate Fillstyle" options. If you want rotated fill styles without shading (like for our floor), then check the "Shade Only Copy" checkbox. To get the opposite result, shading only, but do not align the fillstyle, enable the "Don't Rotate Fillstyle" option.
    floor.png

    Notes

    Shaded Polygon works like most other commands, i.e. it lets you select multiple entities in one go, and then hit 'Do It' to run the command on all of them. When doing this, make sure that all entities selected should indeed have the same shading options. For example, in the roof in the top example, the left and right halves of the roof needs completely opposite settings for the shade angle, so you cannot do both with one command. Keep this in mind when doing your selections for this commands. The Angle By Edge version on the other hand only does one polygon at a time, but the command stays active so you can click on the entities one by one, but each is processed individually.
    Also note that the Change Shade Angle, Change Shade Pitch and EDITSHADING only works on polygosn that have already been turned into a shaded polygon by either the use of Shaded Polygon or Shaded Polygon (Angle By Edge).

    Video Tutorial

    Dogtag also created a video tutorial for this command.
    •  
      CommentAuthorQuenten
    • CommentTime7 days ago
     
    I found this SO useful in lining up the fills for my docks in Stromphe. Thanks again Remy, for your 'private' tutorial when I faced the problem, and so glad to see it now in Command of the Week. These tutorials are SO magnificent. Looking forward to the milestone of No 50 as a Christmas present.
    • CommentAuthorScottA
    • CommentTime7 days ago
     
    I was JUST looking for this in the Tome!