Colourable Wheels

Discussion in 'Ideas and Suggestions' started by YellowRusty, Feb 2, 2018.

?

Is this something you would like to see in-game?

  1. Yes. I'd like to see this released sometime very soon.

    31 vote(s)
    73.8%
  2. Kind of. It'd be nice to have, but there are other things that I'd like to see in-game first.

    8 vote(s)
    19.0%
  3. No. I'd rather the dev team spend their time doing something else.

    3 vote(s)
    7.1%
  1. YellowRusty

    YellowRusty
    Expand Collapse

    Joined:
    Nov 9, 2016
    Messages:
    1,207
    ColourwheelsBurnside.jpg

    I've been sitting on this idea for a while now, and with the release of the Gavril Bluebuck (seemingly) imminent, I think it may be time to bring it up and see what the community thinks of it.
    ColourwheelsDseries.jpg ColourWheelsBarstow.jpg
    While I do enjoy the existing Body Coloured Classic Steel Wheels, I sometimes find myself frustrated by the way they always correspond to the main body colour. It's a well-known fact that many segments of car culture (most notably classic hot rodders and import tuners) often make use of wheels that contrast with the car they're mounted on:


    So I'd like to propose a system in which the "Body Coloured Classic Steel Wheels" are renamed to "Colourable Classic Steel Wheels", and a drop-box is mounted inside of them allowing users to choose which palette the wheel will draw its colour from:
    Menu.jpg ColourwheelsHopper.jpg

    This will allow the wheels to be any one of three colours (at the moment, we don't know if future plans might include more palettes), as well as allowing the front and rear axles to be separate colours. And all this without taking up a dedicated palette! That would allow for more elaborate, possibly even five-tone skins!

    ColourwheelsSunburst.jpg

    Of course, the fun need not be limited to the Classic Steel Wheels. The Okudai KRW is a prime candidate for a colourable version, as is the Folk ET73.

    The problem of course, is that I'm writing all of this in ignorance of how the wheel colouring system actually works. Can somebody give me an idea if any of this is feasible or not?
     
  2. Ai'Torror

    Ai'Torror
    Expand Collapse
    BeamNG Team

    Joined:
    Aug 29, 2015
    Messages:
    1,550
    Cool idea! It should actually be possibleto have the wheel part itself as the name adapter sort of thing which would contain the rim colour, (hubcap) and the tire slot. It should be quite easy to implement but quite time consuming. It would greatly improve the ease of use of the wheels selection
     
  3. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    The problem with that is adding one (or more) layer of texture to everything.
    Each layer of texture has it's impact on performance and memory.
    Also, we already use RGB for the body colors (each channel is a a color wheel, that's why you see 3 of them)
     
  4. Ai'Torror

    Ai'Torror
    Expand Collapse
    BeamNG Team

    Joined:
    Aug 29, 2015
    Messages:
    1,550
    Not really. You can make it the same way as we currently have let's say 7x15 old steel wheels ( i think that I've got the name right). Currently we've got 3 wheel types: body coloured, chrome and black I belive.
    I think thqt ot could be a good idea to make the selectable wheel essentially a slot holder wothout jbeam, model and so on and have a subpart called wheel colour in it. Parts under this slot would essentially act as the wheels that we've got currently.
    It would eliminate the problem of too many wheels and we could choose between 1st 2nd and 3rd colour chrome and maybe black or unpainted.
    The different colour selection is basically a case of making new materials for each of the rims.
    It would take time to convert most of the rims to this system, but it would at least triple the amount of rims that we could choose from.
    I don't see a need for new texture layer.
    I might be wrong, but thats how I see it.
     
  5. YellowRusty

    YellowRusty
    Expand Collapse

    Joined:
    Nov 9, 2016
    Messages:
    1,207
    I'm a bit confused ... are you responding to me or @Ai'Torror ?

    How would altering which channel the wheel draws its colour from require an extra layer of texture? Wouldn't it just switch the texture from one channel to another?
     
  6. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    Replying in general to the topic.

    See how current colourable skins work. It's the same thing.
    They requires an extra layer of texture that controls the color.
     
  7. Ai'Torror

    Ai'Torror
    Expand Collapse
    BeamNG Team

    Joined:
    Aug 29, 2015
    Messages:
    1,550
    But that's if you would like to keep it on the same model all the time, if there would be a separate model for the 1,2 and 3rd colour it would eliminate the need for new layers. If current wheels would be made as you re saying... The ingame wheels would already have 2 or more layers.
     
  8. YellowRusty

    YellowRusty
    Expand Collapse

    Joined:
    Nov 9, 2016
    Messages:
    1,207
    I'm trying to figure this out as best as I can.

    Let's take, by way of example, the 4-lug 13x8 Body Coloured Deep Dish Steel Rear Wheels.

    Assuming that I haven't screwed up navigating the game files, this would be the relevant portion of steelwheels_R_4.jbeam:

    Code:
    "steelwheel_11b_13x8_R": {
        "information":{
            "authors":"BeamNG",
            "name":"13x8 Deep Dish Rear Steel Wheels (Body Colored)",
            "value":170,
        }
        "slotType" : "wheel_R_4",
    
        "slots": [
            ["type", "default", "description"]
            ["tire_R_13x8","tire_R_195_65_13_sport", "Rear Tires"],
        ],
        "flexbodies": [
            ["mesh", "[group]:", "nonFlexMaterials"],
            //wheels
            ["steelwheel_11b_13x8", ["wheel_RR","wheelhub_RR"], [], {"pos":{"x":-0.48, "y":0.0, "z":0.0}, "rot":{"x":0, "y":0, "z":180}, "scale":{"x":1, "y":1, "z":1}}],
            ["steelwheel_11b_13x8", ["wheel_RL","wheelhub_RL"], [], {"pos":{"x": 0.48, "y":0.0, "z":0.0}, "rot":{"x":0, "y":0, "z":0}, "scale":{"x":1, "y":1, "z":1}}],
        ],
        "nodes": [
            ["id", "posX", "posY", "posZ"],
            //rear wheel nodes
            {"frictionCoef":0.5},
            {"nodeMaterial":"|NM_METAL"},
            {"chemEnergy":200,"burnRate":0.5,"flashPoint":300,"smokePoint":200,"selfIgnition":0,"specHeat":1},
            {"selfCollision":true},
            {"collision":true},
            {"nodeWeight":4.5},
            {"group":"wheelhub_RR"},
            ["rw1r", -0.31, 0.0, 0.0],
            {"group":"wheelhub_RL"},
            ["rw1l", 0.31, 0.0, 0.0],
            {"collision":true},
            {"group":"wheelhub_RR"},
            ["rw1rr", -0.57, 0.0, 0.0],
            {"group":"wheelhub_RL"},
            ["rw1ll", 0.57, 0.0, 0.0],
            {"chemEnergy":false,"burnRate":false,"flashPoint":false,"smokePoint":false,"selfIgnition":false,"specHeat":false},
            {"group":""},
        ],
        "beams": [
            ["id1:", "id2:"],
            {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
            {"breakGroup":""},
            {"beamSpring":801000,"beamDamp":6},
            {"beamDeform":78500,"beamStrength":434000},
            //rear wheels
            ["rw1r","rw1rr"],
            ["rw1l","rw1ll"],
            {"beamPrecompression":1, "beamType":"|NORMAL", "beamLongBound":1.0, "beamShortBound":1.0},
        ],
        "pressureWheels": [
            ["name","hubGroup","group","node1:","node2:","nodeS","nodeArm:","wheelDir"],
            {"disableMeshBreaking":false,"disableHubMeshBreaking":false,"hasTire":false},
    
            //general settings
            {"hubRadius":0.18},
            {"wheelOffset":-0.04},
            {"hubWidth":0.215},
            {"numRays":16},
    
            //hub options
            {"hubTreadBeamSpring":945900, "hubTreadBeamDamp":6},
            {"hubPeripheryBeamSpring":945900, "hubPeripheryBeamDamp":6},
            {"hubSideBeamSpring":1601000, "hubSideBeamDamp":6},
            {"hubNodeWeight":0.44},
            {"hubNodeMaterial":"|NM_METAL"},
            {"hubFrictionCoef":0.5},
            {"hubBeamDeform":15000, "hubBeamStrength":65000},
        ],
    },
    And this would be the relevant portion of the materials.cs:
    Code:
    singleton Material(steelwheel_11b)
    {
        mapTo = "steelwheel_11b";
        diffuseMap[2] = "vehicles/common/wheels/steelwheel_11b_c.dds";
        specularMap[2] = "vehicles/common/wheels/steelwheel_11a_s.dds";
        normalMap[2] = "vehicles/common/wheels/steelwheel_11a_n.dds";
        diffuseMap[1] = "vehicles/common/wheels/steelwheel_11b_d.dds";
        specularMap[1] = "vehicles/common/wheels/steelwheel_11a_s.dds";
        normalMap[1] = "vehicles/common/wheels/steelwheel_11a_n.dds";
        diffuseMap[0] = "vehicles/common/null.dds";
        specularMap[0] = "vehicles/common/null.dds";
        normalMap[0] = "vehicles/common/wheels/steelwheel_11a_n.dds";
        specularPower[0] = "128";
        pixelSpecular[0] = "1";
        specularPower[1] = "128";
        pixelSpecular[1] = "1";
        diffuseColor[0] = "1 1 1 1";
        diffuseColor[1] = "1 1 1 1";
        diffuseColor[2] = "1 1 1 1";
        useAnisotropic[0] = "1";
        useAnisotropic[1] = "1";
        useAnisotropic[2] = "1";
        castShadows = "1";
        translucent = "1";
        translucentBlendOp = "None";
        alphaTest = "0";
        alphaRef = "0";
        dynamicCubemap = true; //cubemap = "BNG_Sky_02_cubemap";
        instanceDiffuse[2] = true;
        materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
    Given that the .dds is a translucent white image that looks like this, wouldn't the materials.cs file pull the body colour from the first channel?:
    upload_2018-2-3_10-1-31.png

    So, in theory, would it be possible to change something in the materials.cs file to cause the wheel to draw colour from a different palette?

     
  9. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,685
    The wheels above pick the same color of the vehicle 'body'.
    (Notice that the material setup is almost identical)

    Code:
        diffuseMap[2] = "vehicles/common/wheels/steelwheel_11b_c.dds";
    Code:
        instanceDiffuse[2] = true;
    These are what controls the color.
    The game is coloring diffuseMap[2], which is the texture that controls which parts are colored or not.
    instanceDiffuse[2] is the special part that allows the game to give more objects that have the same material different colors (hence 'instancing' - allows you to have the same vehicles coloured differently).
    That works on the 'entire object', you can have only 1 instanceDiffuse per object. That means you cannot use that to color two things of the same object (ie. vehicle) in different colors.


    What can be used is the skin system:
    https://wiki.beamng.com/Introduction_to_skin_system#Colorable_Skins_.28Advanced.29
    See the 'Miramar Racing' skin. The colorwheels can color different parts of the skin.
    We also use that on some rollbars.

    The problem with that is that:
    1. It requires an additional texture (a palette map)
    2. Depending on the mesh, it requires adding a second UVMap.
    Last but not least, you can choose to assign your thing to one of the three color wheels in the Parts Selector menu (R G B)
    We already use those for other things, so we are not left with other colors to be used exclusively for wheels.
    You can reuse a color, for example the B channel, but you'll end up it being sync with other parts using that too (ie. wheels and rollbars would be synced)

    So yeah, with how it is now, you will never end up with a color wheel exclusively for wheels.
    Tried my best to explain it in the clearest way.

    Note that I'm not saying it's impossible, but it could require more stuff in the render queue, that it may not be worth at cost of performance.
     
  10. YellowRusty

    YellowRusty
    Expand Collapse

    Joined:
    Nov 9, 2016
    Messages:
    1,207
    Now it's clear... and that's perfect! This is the kind of system we wanted from the beginning:

    Of course it would be in sync with another part, like the rollbar or part of the skin - but that's not a big issue at all. The only reason I mentioned new colour wheels was that I thought an earlier version of the UI had six non-functional colour wheels (In hindsight, I think that may have been a false memory).

    To demonstrate this kind of colourable wheel setup, here are some pics of the Barstow I cooked up in Photoshop:
    upload_2018-2-4_10-59-41.png
    This one would have both axles set to the main body colour (presumably R). This is what's in-game at the moment.
    upload_2018-2-4_11-0-55.png
    This one would be set to the first detail palette (presumably G)
    upload_2018-2-4_11-1-38.png
    ...And this one would be set to the second detail palette (presumably B).
    upload_2018-2-4_11-2-20.png
    For this one, the front axle would be set to R and the rear axle to B.

    Wheels that contrast with everything else on the car would still be possible. For this Burnside, the wheels would be set to B, and since that colour isn't used on anything else, the result is uniquely green wheels:
    upload_2018-2-4_11-19-43.png

    That would mean the only hurdle would be devising a way to make the channel a selectable sub-part of the wheels, as shown in the original post's menu mockup.

    The worst-case scenario would be having an entirely separate wheel for each colour - but that would add a large number of wheels to the parts selector, quickly becoming a nightmare to maintain or update.
     
  11. enjoyinorc6742

    enjoyinorc6742
    Expand Collapse

    Joined:
    Dec 24, 2015
    Messages:
    1,631
    can we possibly have the ability to color every wheel?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice