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
- 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.
- Download lamp.anim shader mod
[ external image ]
- 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
- 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
- Make sure left_blink and right_blink part EXIST in SCS Parts of root object and NOT checked in any variant.
[ external image ]
- 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.)
- Select blinkers mesh and add UV_1 to both of them one by one.
[ external image ]
- Create new material and change shader to lamp.anim.add.env.
- 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
- 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)
- Create an empty 8x4 all black texture
Save it to whatever name you want. (animated_blinker_empty.tga in this example)
[ external image ]
- Add created mask textures to shader and change sheet frame size values to match uv cordinate.
[ external image ]
V. Def, lamp setup and Test
- 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)
- Open it with text editor and replace line 56, 57 with these lines.
[ external image ]
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
- 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)
- 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)[ external image ]Code: Select all
lamp_setup: "/def/vehicle/truck/man.tgx_2020/lamp_setup.sii"
- 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)
- 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