Colourising a textured fill tool

Hi everyone!

Sorry if this is answered elsewhere - I Googled, but nothing quite came up. Inspired by the recent Ruins annual, and my experiments texturing the Ferraris city style, I decided to explore making a custom template for future city projects. I'm aiming for something with a pencil-esque finish for the urban blocks and buildings, so I've gone with a fractal shape base tool, with a texture fill. I'm creating an extra entity for the outline (thin black line, which I'm distorting with a watercolour texture and blurring slightly).

What I'd really like to do, though, is colourise the urban block based on the colour selected when I create it. Obviously I can do that if I don't texturise it, and if I didn't have the pencil-esque edge I could do it with an extra entity - but is there a way for me to do it while still having all of those things? (Having my cake and eating it too?) Basically, so I can get the effect below, without colourising an entire layer:


Best Answers

  • Accepted Answer

    So, to update, I've managed to sort the issue in a roundabout way. There are three sheets - BCOLOR (lowest), BUILDINGS (mid), BWALLS (top):

    i) Main object contains the texture, goes to BUILDINGS layer (which has an edge fade effect and caps at 15% opacity a few units in)

    ii) Outline command duplicates the poly, assigns it the currently selected colour, and saves it to the BCOLOR layer (which has a slight texturisation effect from a seamless watercolor bitmap, a wall shadow, and a slight glow)

    iii) Macro then SELBYPs the shape, sets width to 0.5, and sends it to BWALLS layer (which has a few effects but, importantly, a colorize effect as I want all wall lines to be pencil-black).

    The Macro code is:


    SELBYP

    COPYSHT BWALLS

    CHANGEFS SOLID

    CHANGELW 0.5

    CHANGEC BLACK (Doesn't seem to work, hence the colorizer effect in BWALLS)


    Here's the result when output at a reasonable resolution:

    Might seem like a lot of work for minimal return, but I like it!

  • MonsenMonsen Administrator 🖼️ 49 images Cartographer
    Accepted Answer

    Good work.

    CHANGEC requires a color number (black is 0), so unless you have defined a variable called BLACK and set it to 0, that's why it fails for you.

    LoopysueMythal82
  • MonsenMonsen Administrator 🖼️ 49 images Cartographer
    Accepted Answer

    GE vshape SELBYP

    GV vrandom RANDOM*360

    You cannot use the commands like that. SELBYP doesn't return entities that can be stored in a variable, all it does is change the selection mode to be by prior instead of the normal selection procedure. Also note that GE doesn't actually store an entity, it stores a set of coordinates where the entity is located, that can be used to grab the entity but it doesn't store the entity itself.

    Likewise, RANDOM doesn't have a return value. The command is used very similar to the GV and similar command, i.e. RANDOM varname will cause a random number between 0 and 1 to be stored in varname. You can then manipulate this further.

    The SHADEPOLY command also need a second argument for the pitch.

    Also be careful with those semi-colons. Commands in CC3+ are executed by using either a new line OR a semicolon. Using both means you are basically creating an empty line, and in CC3+ that means repeat the previous command.

    You can find the correct syntax of all the commands in the table in the tome, or in the spreadsheet in @documentation\tome\commands.xlsx

    Mythal82JimP

Answers

  • Further to this, I've made a little progress using draw tool macros. The plan is simple:

    Base object has the semi-transparent tile texture (middle layer)

    First copy is the colour layer - copies the shape, sets fillstyle to solid, and colorises it (bottom layer)

    Second copy is the wall layer - copies the shape, sets fillstyle to solid, sets width to 0.5, and colors it black (top layer)

    The steps work individually, but when I combine them there's a selection issue.


    The complete macro is:

    SELBYP

    COPYSHT BCOLOR

    CHANGEFS SOLID

    CHANGEC

    COPYSHT BWALLS

    CHANGEFS SOLID

    CHANGELW 0.5

    CHANGEC BLACK


    When I run this, I get an error saying copysht bwalls doesn't have a selection to copy. But if I add another SELBYP just before the second COPYSHT, it doesn't fix the issue. I've tried assigning the initial selection a variable name using STORE, then referencing the variable using SELECT, but that doesn't seem to work either (I'm unsure if I'm declaring the variable correctly - the alphabetical instruction list doesn't have a command for declaring a variable, so I just tried giving it a unique name on the STORE line, then SELECTing that name).

    Any and all assistance gratefully received!

  • Accepted Answer

    So, to update, I've managed to sort the issue in a roundabout way. There are three sheets - BCOLOR (lowest), BUILDINGS (mid), BWALLS (top):

    i) Main object contains the texture, goes to BUILDINGS layer (which has an edge fade effect and caps at 15% opacity a few units in)

    ii) Outline command duplicates the poly, assigns it the currently selected colour, and saves it to the BCOLOR layer (which has a slight texturisation effect from a seamless watercolor bitmap, a wall shadow, and a slight glow)

    iii) Macro then SELBYPs the shape, sets width to 0.5, and sends it to BWALLS layer (which has a few effects but, importantly, a colorize effect as I want all wall lines to be pencil-black).

    The Macro code is:


    SELBYP

    COPYSHT BWALLS

    CHANGEFS SOLID

    CHANGELW 0.5

    CHANGEC BLACK (Doesn't seem to work, hence the colorizer effect in BWALLS)


    Here's the result when output at a reasonable resolution:

    Might seem like a lot of work for minimal return, but I like it!

  • MonsenMonsen Administrator 🖼️ 49 images Cartographer
    Accepted Answer

    Good work.

    CHANGEC requires a color number (black is 0), so unless you have defined a variable called BLACK and set it to 0, that's why it fails for you.

    LoopysueMythal82
  • Do you happen to know of any way to randomise the alignment of the textures? Or at least make them unique to the object? (Which wouldn’t break the initial solution!)

  • MonsenMonsen Administrator 🖼️ 49 images Cartographer
    edited August 2023

    I haven't tried this, so don't know if it works but you should be able to use a series of commands:

    RANDOM - to generate a random number (multiply the result of the command by 360 to get random degrees)

    SHADEPOLY - to make it a shaded polygon at the randomized angle

    SETFSFLAGS 192 - Turns off shading by light, leaving only rotation.

    Mythal82
  • Thanks for the advice - I've tried it, but I think I'm having some syntax issues (errors with object selection). I've tidied up my macro, and compared my syntax to some of the examples in ToUM and it seems to hang together, but evidently I'm missing something. Here's the macro itself:

    SELSAVE

    SAVESETTINGS

    GE vshape SELBYP

    GV vrandom RANDOM*360

    SELECT vshape

    SHADEPOLY vrandom;

    SELECT vshape

    SETFSFLAGS 192;

    SELECT vshape

    COPYSHT BWALLS

    CHANGEFS SOLID

    CHANGELW 0.2

    CHANGEC 0;

    GETSETTINGS

    SELREST;

  • MonsenMonsen Administrator 🖼️ 49 images Cartographer
    Accepted Answer

    GE vshape SELBYP

    GV vrandom RANDOM*360

    You cannot use the commands like that. SELBYP doesn't return entities that can be stored in a variable, all it does is change the selection mode to be by prior instead of the normal selection procedure. Also note that GE doesn't actually store an entity, it stores a set of coordinates where the entity is located, that can be used to grab the entity but it doesn't store the entity itself.

    Likewise, RANDOM doesn't have a return value. The command is used very similar to the GV and similar command, i.e. RANDOM varname will cause a random number between 0 and 1 to be stored in varname. You can then manipulate this further.

    The SHADEPOLY command also need a second argument for the pitch.

    Also be careful with those semi-colons. Commands in CC3+ are executed by using either a new line OR a semicolon. Using both means you are basically creating an empty line, and in CC3+ that means repeat the previous command.

    You can find the correct syntax of all the commands in the table in the tome, or in the spreadsheet in @documentation\tome\commands.xlsx

    Mythal82JimP

  • Thanks for this! After a little meddling, following your advice, I've managed to get this working. I've also added a more subtle randomisation to the pitch, which has the added benefit of giving 'similar-but-not-the-same' colorisation when constructing a block of a given colour - which is something that always appeals to me. I've made a tool for each texture using the same macro, which helps further with the variety.

    Here's an example of the eventual output:


    QuentenMonsenLoopysueJimPRalfMapjunkie
Sign In or Register to comment.