gMotor pitin/out and start glow

Discussion in 'Track Modding' started by roc-craven, Jan 17, 2012.

  1. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    Start 3ds max.
    Load up your scene.
    Enter the material editor.
    Navigate to the material of your pit/startglow.
    Click on it.
    Right at the top you will see dropdown selection boxes for "Source Blend" and "Dest[ination] Blend".
    Set one to Src Alpha and the other to Inv Src Alpha.

    Repeat for all your glow materials.
    Select all the objects that use said glow materials.
    Click on the hammer icon in 3ds max.
    Under Utilities (if set up properly), click on GMT Converter v2.52g.
    Under GMT Output, make sure the output path is set to the folder you want to export into and click "Do Mesh"
    Copy the generated .gmts to your ModDev path and fire up rF2 in dev mode.
    Check the materials.
    In case the glow appears inverted, re-set the Blend modes by switching them around (Inv Src Alpha for Source Blend, Src Alpha for Dest Blend) and re-export, copy over to ModDev, re-check.
    Profit.
     
  2. superkolos

    superkolos Registered

    Joined:
    Feb 1, 2012
    Messages:
    39
    Likes Received:
    0
    where in max materialeditor do i set up the animation frequences for the glows?
     
  3. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    In the substage of the material at the very bottom of the gMotorTexture v2.52g field, under Animation Data. You can control the frequency through the "Rate" variable.
     
  4. superkolos

    superkolos Registered

    Joined:
    Feb 1, 2012
    Messages:
    39
    Likes Received:
    0
    found it thx
     
  5. les

    les Registered

    Joined:
    Jan 19, 2012
    Messages:
    256
    Likes Received:
    1
    i left this area alone for a while worked on other things View attachment 1174

    i did as everyone suggested not sure how to fix i do have a question my pitlightin light and the glow are all one object should these be two separate objects ??

    i have been looking around and i hope im right but the glow and the pit lights should be two separate objects so im looking for a pitin and pitout ojects and glow and see if that is part of my problem
     
    Last edited by a moderator: Feb 16, 2012
  6. Simon Peace

    Simon Peace Registered

    Joined:
    Nov 10, 2011
    Messages:
    121
    Likes Received:
    0
    ethone, im doing this also, but my glows don't change with the src alpha dst alpha at all. they still look like squares fully coloured... what shader should they be using...? and is that the same for rF1?
     
  7. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    A simple T1 shader will do.
    Have you gotten other alpha blending materials to work correctly?

    Just guessing: Did you save the glow texture as a DXT5 dds and have you included a proper alpha channel?
    Are you sure that the gmts you're exporting are the first ones loaded which contain your glow material?
    Is the glow material named correctly (and uniquely so it's not "overwritten" by another material description?
     
  8. Simon Peace

    Simon Peace Registered

    Joined:
    Nov 10, 2011
    Messages:
    121
    Likes Received:
    0
    I have got trees to alpha blend... this is the first time for lights, so re-using glows from other tracks...
    I don't have paintshop but I attach the 3dsimed texture browser screen shot of one of the glows... they are all the same. All I did was import using the GMT importer (btw doing this for rF1 first)
    View attachment 1807
    does this look right?
     
  9. blakboks

    blakboks Registered

    Joined:
    Oct 20, 2010
    Messages:
    843
    Likes Received:
    30
    It sounds like maybe you have another object in the scene that is using the same material that you didn't re-export after making the changes. Try re-exporting all objects that use that material.

    P.S. Instead of 'T1', use 'No Lighting Tex1'. Glows are 'emissive' and thus should not be lit by the scene lights. 'T1' uses a diffuse lighting model. Lemme know if this doesn't make sense, and I'll try to offer a better explanation.
     
  10. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,242
    Sorry to bump an old post, but I am having trouble with pit entrance and exit lights. I have named them like the post earlier in this thread, and set the textures up as well, but the red and green lights do not activate, only the blue light for passing cars. Here are my materials for the lights.
    [​IMG]
     
  11. Radar

    Radar Registered

    Joined:
    Oct 20, 2010
    Messages:
    687
    Likes Received:
    60
    Is the Animation Cycle meant to be on Cycle ??? Ethone or anyone.. It's the only thing I can see wrong because I am sure that rF1 had cycle for the sequences, where the images above are set to Manual..
     
  12. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,242
    Ok, that got the pit in lights working, now I need to figure out why the out lights won't work. Thanks for the help.
     
  13. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    954
    Likes Received:
    213
    Pit Lights:
    - Objects need to be named: PitLightIn, PitGlowIn, PitLightOut, PitGlowOut
    - All lights and glow objects should have an on/off texture. Everything is done in-material. Remember to use Source Blend on glow material to achieve transparency.
    - Animation Source=Texture Maps
    - Animation Data: Manual, Name: <YourTexName>.dds, Frames=2, Rate=1.0, Seq.=(see below)
    - <YourTexName>00.dds is the “off” texture, <YourTexName>01.tga is the “on” texture. On/Off textures are different file format (dds/tga).

    Sequence:
    - Yellow/Blue ligh (ylopitla, ylopitglowa)t: 0,1,0
    - Green light (grpitla, grpitglowa): 1,1,0
    - Red light (rdpitla, rdpitglowa): 0,0,1

    Edit: Oh, sorry... Blakboks has wrote same information earlier on this very same thread...:eek:

    Cheers!
     
    Last edited by a moderator: Oct 16, 2012
  14. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    The animation should be set to manual. If you set it to cycle it will always cycle, instead of being hooked up to in-session timing and acting like the pit lights should (red until session starts, green when it starts to when it ends, red again from there, or the yellow/blue one will not respond to cars moving past the exit).

    The only thing I can see is that the Sequence values aren't in brackets. 1,1,0 should be (1,1,0). Or at least I always thought so, I have never tried if it works without the brackets. :)
     
  15. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,242
    Awesome, the brackets worked!
     
  16. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    So the devil actually is in the details... ;) Glad it works now.
     
  17. Radar

    Radar Registered

    Joined:
    Oct 20, 2010
    Messages:
    687
    Likes Received:
    60
    Thanks ethone for the clarification.
     
  18. wgeuze

    wgeuze Registered

    Joined:
    Oct 1, 2012
    Messages:
    1,608
    Likes Received:
    63
    I'm struggling with my startlights a bit as well. I'm looking at a sequence of 6 red lights to turn on, then the greenlight should come on. This is what I have:

    First red light (rdlta, rdltglowa): 0,1,1,1,1,1,1,0
    Second red light (rdltb, rdltglowb): 0,0,1,1,1,1,1,0
    Third red light (rdltc, rdltglowc): 0,0,0,1,1,1,1,0
    Fourth red light (rdltd, rdltglowd): 0,0,0,0,1,1,1,0
    Fifth red light (rdlte, rdltglowe): 0,0,0,0,0,1,1,0
    Sixth red light (rdltf, rdltglowf): 0,0,0,0,0,0,1,0
    Green light (grlta, grltglowa): 0,0,0,0,0,0,0,1

    As I have understood for this to work I have to add a line in the tracks' gdb file.
    The line I added is:

    NumStartingLights = 6

    However the lights still function as if there were 5 red ones, and the 6th one is the virtual green one, (horn only blows 5 times)
    I though maybe I had to make the total of lights into a 7, but that has the same result. If I try, as a check if the line works, a value of 3, rF2 crashes.

    Am I doing things wrong, or is this a bug?
     
  19. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    Last time we checked the NumStartingLights setting was bugged and was not working properly, defaulting to five lights.

    So probably a bug.
     
  20. wgeuze

    wgeuze Registered

    Joined:
    Oct 1, 2012
    Messages:
    1,608
    Likes Received:
    63
    Okay thanks, hope that will get fixed soon.

    Another thing, is there a way to have lights on the track flash when a safetycar is on track?
     
    Last edited by a moderator: Jun 16, 2013

Share This Page