Add Attributes to flare_vehicle and flare_blink

Post Reply

Is this a good idea?

Yes
13
100%
No
0
No votes
Maybe. . . (comment!)
0
No votes
 
Total votes: 13

User avatar
LeafeonGold
Posts: 1834
Joined: 09 Jun 2013 03:11
Location: Philadelphia, PA
Contact:

Add Attributes to flare_vehicle and flare_blink

#1 Post by LeafeonGold » 26 Oct 2016 02:31

3/2/2017: I wanted to expand on this request thread a little more, though this would probably be best if SCS was planning any sort of rework or addition to their light system. Essentially, what i'm asking for are for these three attributes to be added to the light type "flare_vehicle" and "flare_blink".

Code: Select all

	blink_delay_on (parameter to set how long a flare is on)
	blink_delay_off (parameter to set how long a flare is off)
	blink_cycle_shift (parameter to set a "delay" before the blink pattern starts when triggered. For example, one of the flashing red lights at railroad crossings use a value of 0.5, which means theres a delay of 0.5 seconds after the initial trigger before the light starts it's blink pattern)
Now, other than modded content, how could this be used in SCS Content? For one, there's LED lightbars and beacons that can take advantage of this. These are common on things like construction vehicles, recovery vehicles (like tow trucks), vehicles for heavy/ oversized loads, police cars, pilot cars, and show vehicles.
Only downside of this system: Unless something was put in place to enable some sort of pattern (like some sort of pattern string with pattern speed at the end (4)) this limits this system to only a simple wig-wag system if only using two flares. This can be tweaked by adding more flares, and flare definitions, but then excess file size would become a problem, and also requiring 3+ flares in the same spot for a simple led flasher might be unfavorable.

(4): I play another game, Rigs of Rods, which allows something like this by setting a new material with a texture animation, then calling that material as a flare. So for example, a string of code like this:

Code: Select all

anim_texture whiteflare.dds off.dds whiteflare.dds off.dds off.dds off.dds off.dds off.dds 0.8	
...with a material to call it will yield the flashing pattern of the left rear reverse light in this video:
Breaking that code block down, it's essentially the textures to be used, and the number at the end refers to how long, in seconds, the whole animation should be. The whole flash pattern will play for 0.8 seconds, then automatically repeat until it's trigger is turned off. The downside of this system is that it would be impossible to have any of these flares cast light, unless you make new materials for every single texture that does cast light, which would essentially make any def or material file a massive block of text. This would be a good system to get an idea from, however.


Original Post:
Requested a couple of times before:

(1) (2) (3)

But this request will be something a little bit different. I tried a little proof of concept to do a simple strobe light by emulating the flares for the rail road crossings, but changing the sii file up a bit. This didnt work, and caused the whole file to be ignored, but its something interesting to look into. I believe a simple flash pattern or something of the sort could be done this way. Something like the lights in the grill of this BMW:
Here's what I did:

Code: Select all

flare_blink: flare.patrol.red
{
	ambient_color: (0.0000, 0.0000, 0.0000)
	diffuse_color: ( 0.15632, 0.0, 0.0)
	specular_color: ( 0.15911, 0.0, 0.0)
	model: "/model/flare/vehicle_redl.pmd"
	
	type: spot

	range: 5.0
	inner_angle: 20.0
	outer_angle: 90.0

	dir_type: wide
	flare_inner_angle: 40.0
	flare_outer_angle: 110.0

	pitch_offset: -65
	fade_distance: 200
	fade_span: 100
	blink_delay_on: 0.5
	blink_delay_off: 0.5
	scale_factor: 2
}

flare_blink: flare.patrol.red2
{
	ambient_color: (0.0000, 0.0000, 0.0000)
	diffuse_color: ( 0.15632, 0.0, 0.0)
	specular_color: ( 0.15911, 0.0, 0.0)
	model: "/model/flare/vehicle_redl.pmd"

	type: spot

	range: 5.0
	inner_angle: 20.0
	outer_angle: 90.0

	dir_type: wide
	flare_inner_angle: 40.0
	flare_outer_angle: 110.0

	pitch_offset: -65
	fade_distance: 200
	fade_span: 100
	blink_delay_on: 0.5
	blink_delay_off: 0.5
	blink_cycle_shift: 0.5
	scale_factor: 2
}
To which, i'm greeted with

Code: Select all

00:00:15.672 : <ERROR> [unit] File '/unit/hookup/vehicle_patrol.sii', line 51:
00:00:15.672 : <ERROR> [unit] The unit 'flare.patrol.red2' of type 'flare_blink' has no attribute named 'blink_cycle_shift'.
and then the whole file is ignored. However, if this wasn't the case, I could implement my light idea quickly and easily. Maybe the devs could filter this into an update?
Last edited by LeafeonGold on 12 Jul 2017 02:27, edited 3 times in total.
"Don't try extra hard to make your presence known, but make sure your absence is noticed."

Intel I7-4790K |//| XFX Radeon RX 590 8GB |//| 16GB RAM |//| 1TB HDD​
Workshop |//| ATS Screens |//| ETS2 Screens
Todor Alin
Posts: 253
Joined: 20 Dec 2015 09:02

Re: Strobe Lights

#2 Post by Todor Alin » 26 Oct 2016 03:24

If you want some "strobe lights", you can try something like "bar flashing sign" in ATS.

Code: Select all

SiiNunit
{
model_particle : model.particle.n_bar_b {
 active_distance: &4b189680
 gen_array: 1
 gen_array[0]: _nameless.2336.5320
 auto_disable_delay: 0
}

particle_gen : _nameless.2336.5320 {
 list_order_up: true
 blend_alpha: true
 gen_pos: (0, 0, 0)
 scale_acc: &3ba3d70a
 rotation_speed: 0
 alpha_blend_coef: &3e4ccccd
 base_alpha: 1
 alpha_attack_time: 1
 flow_speed: (0, 0, 0)
 flow_speed_acc: (0, 0, 0)
 particle_size: (&3df5c28f, &3e333333)
 particle_size_var: (0, 0)
 particle_displacement: (0, 0, 0)
 color_multiplier: nil
 key_pos: 5
 key_pos[0]: 0
 key_pos[1]: 50
 key_pos[2]: 91
 key_pos[3]: 195
 key_pos[4]: 255
 key_color: 5
 key_color[0]: 4278190335
 key_color[1]: 4278190335
 key_color[2]: 4283906281
 key_color[3]: 4278190335
 key_color[4]: 4283255018
 time_to_live: &3f8ccccd
 time_to_live_rand: &3e4ccccc
 particles_max_count: 3
 relative_space: false
 use_sprites: false
 model_path: "/model/particle/b.pmd"
 model_look: circ
}

} 
With "shift" you cannot have the wanted effect.
Official forum and the place where you can find all my future mods, here
User avatar
LeafeonGold
Posts: 1834
Joined: 09 Jun 2013 03:11
Location: Philadelphia, PA
Contact:

Re: Strobe Lights

#3 Post by LeafeonGold » 26 Oct 2016 05:23

I've never figured out how those particle systems work, honestly. Would you be able to show how to use it in the way I want it to? Also, the shift feature would do exactly what I want it to do, the only thing being is that i would have to stack two flares on top of each other to get the intended effect.
"Don't try extra hard to make your presence known, but make sure your absence is noticed."

Intel I7-4790K |//| XFX Radeon RX 590 8GB |//| 16GB RAM |//| 1TB HDD​
Workshop |//| ATS Screens |//| ETS2 Screens
User avatar
piva
Posts: 2435
Joined: 29 Oct 2014 16:41

Re: Strobe Lights

#4 Post by piva » 26 Oct 2016 05:55

Maybe instead "shift" you can use "blink_desync: 0.5"?
User avatar
LeafeonGold
Posts: 1834
Joined: 09 Jun 2013 03:11
Location: Philadelphia, PA
Contact:

Re: Strobe Lights

#5 Post by LeafeonGold » 26 Oct 2016 07:36

i tried that, and it just makes the lights completely out of sync, seems more like galaxy lights other than strobe lights.
"Don't try extra hard to make your presence known, but make sure your absence is noticed."

Intel I7-4790K |//| XFX Radeon RX 590 8GB |//| 16GB RAM |//| 1TB HDD​
Workshop |//| ATS Screens |//| ETS2 Screens
User avatar
piva
Posts: 2435
Joined: 29 Oct 2014 16:41

Re: Strobe Lights

#6 Post by piva » 26 Oct 2016 07:41

Strobe lights have Volvo FH16 by Ohaha, let's see how it to do.
User avatar
LeafeonGold
Posts: 1834
Joined: 09 Jun 2013 03:11
Location: Philadelphia, PA
Contact:

Re: Strobe Lights

#7 Post by LeafeonGold » 26 Oct 2016 14:58

Those aren't actually strobes in a sense, they are pretty much really tiny beacons that rotate quickly.
"Don't try extra hard to make your presence known, but make sure your absence is noticed."

Intel I7-4790K |//| XFX Radeon RX 590 8GB |//| 16GB RAM |//| 1TB HDD​
Workshop |//| ATS Screens |//| ETS2 Screens
User avatar
LeafeonGold
Posts: 1834
Joined: 09 Jun 2013 03:11
Location: Philadelphia, PA
Contact:

Re: Add Attributes to flare_vehicle and flare_blink

#8 Post by LeafeonGold » 03 Mar 2017 05:02

Reworded my suggestion in the first post. It should be a bit more clear now. :mrgreen:
"Don't try extra hard to make your presence known, but make sure your absence is noticed."

Intel I7-4790K |//| XFX Radeon RX 590 8GB |//| 16GB RAM |//| 1TB HDD​
Workshop |//| ATS Screens |//| ETS2 Screens
User avatar
LeafeonGold
Posts: 1834
Joined: 09 Jun 2013 03:11
Location: Philadelphia, PA
Contact:

Re: Add Attributes to flare_vehicle and flare_blink

#9 Post by LeafeonGold » 13 Apr 2017 20:04

I just had a thought to how this could be implemented in a way where there won't be huge file sizes, multiple flares in the same spot won't be needed, and the flares could still project light while active.

The syntax could work similarly to how torque curves are defined. So, instead of. . .

Code: Select all

anim_texture whiteflare.dds off.dds whiteflare.dds off.dds off.dds off.dds off.dds off.dds 0.8   
You could have

Code: Select all

flash_pattern[]: (on, 0.1)
flash_pattern[]: (off, 0.1)
flash_pattern[]: (on, 0.1)
flash_pattern[]: (off, 0.5)
With the first option defining the state of the flare, and the second option being how long to stay in this state, in seconds. I don't know the full difficulty of implementing an option like this, but it seems like something that could be easily customizable, easy to set up, and would be fitting for the Oversize DLC's coming soon.
"Don't try extra hard to make your presence known, but make sure your absence is noticed."

Intel I7-4790K |//| XFX Radeon RX 590 8GB |//| 16GB RAM |//| 1TB HDD​
Workshop |//| ATS Screens |//| ETS2 Screens
User avatar
LeafeonGold
Posts: 1834
Joined: 09 Jun 2013 03:11
Location: Philadelphia, PA
Contact:

Re: Add Attributes to flare_vehicle and flare_blink

#10 Post by LeafeonGold » 12 Jul 2017 02:28

One last bump, poll added.
"Don't try extra hard to make your presence known, but make sure your absence is noticed."

Intel I7-4790K |//| XFX Radeon RX 590 8GB |//| 16GB RAM |//| 1TB HDD​
Workshop |//| ATS Screens |//| ETS2 Screens
Post Reply

Return to “Feature Wishlists and Suggestions”

Who is online

Users browsing this forum: No registered users and 6 guests