Animated Blinker workflow

Post any tutorial and tools you might find it useful for other creators.
Post Reply
User avatar
AmirMahdavi
Posts: 157
Joined: 16 Feb 2017 13:03
Location: Gilan, Iran

Animated Blinker workflow

#1 Post by AmirMahdavi » 20 May 2024 14:43

Project-based tutorial for Animated Blinker Lamp-System

This tutorial only explain how to create an animated blinker shader and mask.
But in post 2, i will explain every part seperately to light up on this hidden, old and unused feature.

‌‌‌ ‌‌‌‌
‌‌‌‌
[ external image ]


I. Install modification
  1. Because SCS Blender Tools not support this shader officially, i edited addons file to support this shader.
    So you must download and install it seperately from official addon.
    ‌‌‌‌‌‌‌
  2. Download lamp.anim shader mod
    [ external image ]
    ‌‌‌
  3. Extract it and copy io_scs_tools folder to blender addons folder.
    C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\3.X\scripts\addons
    - USERNAME is your user name in windows.
    - 3.X is your blender version. (must be 3.3 or 3.6)


II. Import model
  1. Import lights from dlc_man_tgx_2020.scs/vehicle/truck/man_tgx_2020/accessory/f_light_chs/led.pmd (Man TGX 2020 in this example)


III. Prepare requirement
  1. Make sure left_blink and right_blink part EXIST in SCS Parts of root object and NOT checked in any variant.
    [ external image ]

    ‌‌‌‌‌‌
  2. Select and assign each blinker mesh object to correct part. Left blinker mesh object to left_blink part, right blinker mesh object to right blink part.
    (In this Man TGX example, part and object assignment of blinker has already been done.)

    ‌‌‌‌‌‌
  3. Select blinkers mesh and add UV_1 to both of them one by one.
    [ external image ]
    ‌‌‌
    ‌‌‌‌
  4. Create new material and change shader to lamp.anim.add.env.
    ‌‌‌‌‌
    ‌‌‌‌‌‌
  5. Resize and place uv in center of a 1024x1024 texture and export uv in png format with 1024x1024 size and opacity 100.
    ‌‌


IV. Create and use mask
  1. Create mask from exported uv
    1024x1024 texture, 2 column with 8 row and 8 frame in total. (half of row are empty)
    Remember to give it all white Alpha channel and DON’T use color in rgb channel, just black and white.
    Save it to whatever name you want. (animated_blinker_mask.tga in this example)
    ‌‌‌ ‌‌‌
    ‌‌‌
  2. Create an empty 8x4 all black texture
    Save it to whatever name you want. (animated_blinker_empty.tga in this example)
    [ external image ]
    ‌‌‌
    ‌‌‌
  3. Add created mask textures to shader and change sheet frame size values to match uv cordinate.
    ‌‌‌‌‌‌ ‌‌‌‌
    [ external image ]


V. Def, lamp setup and Test
  1. Copy def.scs/def/default_vehicle_lamp_setup.sii and paste it to MOD_BASE/def/vehicle/truck/MODEL/lamp_setup.sii
    - MOD_BASE is your mod base folder that light imported.
    - MODEL is the truck you work on it. (man.tgx_2020 in this example)
    ‌‌‌
    ‌‌‌‌‌‌‌
  2. Open it with text editor and replace line 56, 57 with these lines.

    Code: Select all

    	channel_r_wire: front_right_turn_signal
    	channel_r_anim_frame_count: 8
    	channel_r_anim_fps: 24.0
    	channel_g_wire: front_left_turn_signal
    	channel_g_anim_frame_count: 8
    	channel_g_anim_fps: 24.0
    [ external image ]
    ‌‌‌
    ‌‌‌‌‌‌
  3. Copy BASE.scs/def/vehicle/truck/MODEL/chassis/sound.sui and paste it to MOD_BASE/def/vehicle/truck/MODEL/chassis/sound.sui
    - BASE.scs is archive where your truck models and defs are placed. (dlc_man_tgx_2020.scs in this example)
    - MOD_BASE is your mod base folder that light imported.
    - MODEL is the truck you work on it. (man.tgx_2020 in this example)

    ‌‌‌‌‌‌
  4. Add this line lamp_setup: “/def/vehicle/truck/MODEL/lamp_setup.sii” to end of sound.sui.
    - MODEL is the truck you work on it. (man.tgx_2020 in this example)

    Code: Select all

    	lamp_setup: "/def/vehicle/truck/man.tgx_2020/lamp_setup.sii"
    [ external image ]
    ‌‌‌‌
    ‌‌‌‌‌
  5. Also you can add this line to chassis sii file if sound.sui not exist.
    (actually i use sound.sui because included in all chassis file)
    ‌‌‌‌‌
    ‌‌‌‌‌
  6. Pack files and put zip to mod folder.
    If you do all steps correctly then you can see it in game! ;)
    Have fun.


Credit

Thanks to
  • @himopan - his topic
  • @MehdiAnti - help and instruction
  • Myself - Whole project, mod, test, tutorial making
Last edited by AmirMahdavi on 28 May 2024 07:55, edited 7 times in total.
User avatar
AmirMahdavi
Posts: 157
Joined: 16 Feb 2017 13:03
Location: Gilan, Iran

Re: Animated Blinker workflow

#2 Post by AmirMahdavi » 20 May 2024 14:44

Reserved for part 2 of tutorial
Last edited by AmirMahdavi on 26 May 2024 13:04, edited 1 time in total.
User avatar
Bimo Wahyu Saputro
Posts: 128
Joined: 31 Mar 2020 13:47
Location: Indonesia
Contact:

Re: Animated Blinker workflow

#3 Post by Bimo Wahyu Saputro » 26 May 2024 09:22

seems the video on "III. Prepare requirement" number 4 and "IV. Create and use mask" on number 1 and 3 cannot be played.
i hope you can fix that soon as possible.
| catch me if you can |
User avatar
AmirMahdavi
Posts: 157
Joined: 16 Feb 2017 13:03
Location: Gilan, Iran

Re: Animated Blinker workflow

#4 Post by AmirMahdavi » 26 May 2024 13:04

@Bimo Wahyu Saputro thank you for report
all videos moved to youtube
User avatar
Bimo Wahyu Saputro
Posts: 128
Joined: 31 Mar 2020 13:47
Location: Indonesia
Contact:

Re: Animated Blinker workflow

#5 Post by Bimo Wahyu Saputro » 27 May 2024 01:52

thank you
| catch me if you can |
User avatar
Fen00b
Posts: 1
Joined: 23 Jul 2019 08:01
Location: Indonesia
Contact:

Re: Animated Blinker workflow

#6 Post by Fen00b » 27 May 2024 14:56

Very helpful thanks ;)
"Flying Low!"
User avatar
Bimo Wahyu Saputro
Posts: 128
Joined: 31 Mar 2020 13:47
Location: Indonesia
Contact:

Re: Animated Blinker workflow

#7 Post by Bimo Wahyu Saputro » 09 Jul 2024 16:04

hello

i have a problem like this

https://streamable.com/g062ml

the main light collides with the turn signal when it is in the on position.

is there a solution for this?
| catch me if you can |
himopan
Posts: 17
Joined: 18 May 2019 09:58
Contact:

Re: Animated Blinker workflow

#8 Post by himopan » 10 Jul 2024 14:12

I think you're doing an excellent job.
I would like you to explain in more detail what each of the four numbers in "sheet_frame_size_r,g" mean.
In Renault T, there is a block that "turns off while flowing", so when you use the hazard lights, it becomes the normal flashing method that "does not flow".
Post Reply

Return to “User Tutorials & Tools”

Who is online

Users browsing this forum: No registered users