basetexture transform center

Discussion in 'Mapping Questions & Discussion' started by Uriak, Jan 22, 2010.

  1. Uriak

    Uriak L8: Fancy Shmancy Member

    Messages:
    543
    Positive Ratings:
    70
    I'm currently figeting with proxies and something keeps ruining my efforts :

    Whenwhever I want to use $basetexturetransform, be it as material property or from proxy scaling or rotating never works the way I expect them to do.

    Let's say I wan't to rotate my texture from x°

    I write something like this

    "$basetexturetransform" "center 0.5 0.5 scale 1 1 rotate x translate 0 0"

    But the texture never seems to rotate along its own center, but a virtual center somewhere on the map. If I modify the center values (said to be used between 0 and 1) I modify my result as show in game and in hammer, but still, the texture is rotated but not along it's own center. Same thing with scale by the way.

    One could say, then "if you absolutely want it rotated, just adjust the translation in hammer", yes for a static texture, that is. But would it be for the skybox or a rotating texture, I must have control over the damned thing.

    Any idea ?
     
  2. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    Is it the centre of the brush/entity its applied to perhaps?

    VFIG is your man here, his Earth in his contest entry should provide him with enough info to answer this
     
    • Thanks Thanks x 1
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    It is rotating around the map origin (0 0 0), I never figured out why.
     
    • Thanks Thanks x 1
  4. VelvetFistIronGlove

    aa VelvetFistIronGlove

    Messages:
    567
    Positive Ratings:
    437
    If the texture is on a brush or a brush entity, it will rotate around the map origin as Boojum says. If you specify centre coordinates, they are relative to the map origin.

    If the texture is on a prop, it will rotate relative to the prop origin (or the mesh origin, possibly; look at the computerwall prop with the radar for example).

    Oddly enough on a brush it sometimes doesn't seem to rotate around the map origin but another point, but I've never been able to pin down why.

    The Earth example in my cpoint contest entry was highly specific to the location and size of the brush that the texture was on, not only so the scaling and rotation would be about the right centre, but also so that the perspective would look correct.
     
    • Thanks Thanks x 1
  5. Uriak

    Uriak L8: Fancy Shmancy Member

    Messages:
    543
    Positive Ratings:
    70
    So you have to make texture values specific to brush location ? What a shame :(

    Ironicaly, I planned to use it on a brush above the origin, maybe I'm not that screwed.