How to create full functional Mirrors

Discussion in 'Car Modding' started by redapg, May 26, 2023.

  1. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    Due to a new Request, about how to fix Mirrors of a converted Car, i've made a new Video where i describe some Things.
    I hope it is understandable and i didn't forgot to mention too much. :D

     
    Emery, philrob, atomed and 3 others like this.
  2. Manfredk2

    Manfredk2 Guest

    Is there something to pay attention when editing the mapping of the center mirror?
    I could edit the left and right mirror with blender without issues but when editing the center mirror it gives me this view in game (the kink is because triple screen). All three mirrors are black and key 3 for showing/unshowing mirrors do not work anymore. When going back to the old center mirror gmt everythings works. I have to edit the center mirror because it looks a bit to the left and should look more to the middle.
    Screenshot 2023-06-26 170859.jpg

    so it looked before editing
    Screenshot 2023-06-26 170121.jpg
     
  3. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    Don't know if you can do this in blender, but it needs to be tagged as render target and add z buffer.
    upload_2023-6-26_12-5-8.png
     
  4. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    @Manfredk2 If what @Coutie has said doesn't work, try this:
    - import the in Blender modified Mirror in 3DSimEd3
    - import the former working Mirror into 3DSimEd3 too and copy the Material from that Mesh
    - paste that Material to the modified Mirror, save it and and export the Mesh
    That should make it work.
     
    Brent likes this.
  5. Manfredk2

    Manfredk2 Guest

    @redapg What should i do without you? You are the man. Works perfectly. Thanks again for your help :)
     
    redapg likes this.
  6. DiggerHawk

    DiggerHawk Registered

    Joined:
    Jul 29, 2020
    Messages:
    250
    Likes Received:
    315
    I have successfully exported mirrors from Blender. Left, right and centre all work with the following JSON material override.

    {
    "dstBlend" : "CUBEAB_ZERO",
    "flags" : [ "CUBEMAT_AMBIENTMAT", "CUBEMAT_DIFFUSEMAT", "CUBEMAT_SPECLARDIR", "CUBEMAT_EMISSIVMAT", "CUBEMAT_EMISSIVDIR" ],
    "name" : "MIRROR",
    "parameters" : {
    "StandardInfo" : {
    "ambientColour" : [ 1, 1, 1, 1 ],
    "blendPercent" : 0,
    "bumpScale" : 0,
    "cubeMapFresnel" : {
    "Exp" : 5,
    "Max" : 0.9,
    "Min" : 0.1
    },
    "diffuseColour" : [ 1, 1, 1, 1 ],
    "emissiveColour" : [ 0, 0, 0, 1 ],
    "refEnhance" : 0,
    "specFresnel" : {
    "Exp" : 1,
    "Max" : 4,
    "Min" : 0
    },
    "specPower" : 1,
    "specularColour" : [ 0, 0, 0, 1 ]
    }
    },
    "preprocessorFlags" : {
    "COCKPIT_MODE" : "1"
    },
    "refName" : "",
    "shader" : "L2NOLIGHTINGT0",
    "sortOffset" : 0,
    "srcBlend" : "CUBEAB_ONE",
    "textures" : [ {
    "AnisoLevel" : 0,
    "ChromaColor" : 0,
    "Flags" : [ "CUBETF_RENDERTARGET", "CUBETF_AUTOMIPMAP", "CUBETF_TRILINEAR", "CUBETF_OWNEDBYMATERIAL" ],
    "FrameCount" : 1,
    "MipBias" : 0,
    "MipLevels" : -1,
    "Name" : "sTex0",
    "ShaderPass" : 0,
    "ShadowMipBias" : 0,
    "StageType" : "CUBETST_DIFFUSEMAP",
    "TexChannel" : 0,
    "Texture" : "MIRROR",
    "hasDefault" : false,
    "inactive" : false,
    "runtime" : false
    } ]
    }
     
    Emery likes this.
  7. DiggerHawk

    DiggerHawk Registered

    Joined:
    Jul 29, 2020
    Messages:
    250
    Likes Received:
    315
    One thing I noticed with your mirror is that it is named "gsc_sonic_cmirror_in.gmt". I could be wrong but I think it should be "gsc_sonic_mirror_in.gmt". I think the names are important if you want them to be adjustable.
     
  8. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    Normally, besides of some other Things, it has to be XXX_cmirror_in.gmt, XXX_lmirror_in.gmt and XXX_rmirror_in.gmt, to get the Mirrors being independently adjustable.
    But i say "Normally", because Things can change. ;)
     
    Emery and Brent like this.
  9. philrob

    philrob Registered

    Joined:
    Jan 12, 2012
    Messages:
    573
    Likes Received:
    1,207
    Great tutes guys, very informative.
     
  10. DiggerHawk

    DiggerHawk Registered

    Joined:
    Jul 29, 2020
    Messages:
    250
    Likes Received:
    315
    You are correct, I was getting confused. The CART 98 update I am working on doesn't require the centre mirror obviously. I managed to get all three mirror names to work with the JSON I posted above when exported from Blender. So there is no need to mess about with 3DSimEd3 in this case. They are exported with the L2DiffuseT0 material preset, then overridden with the JSON.
     

Share This Page