Incandesant Material Flares

MS9!

New member
Joined
Feb 20, 2022
Messages
16
Is there any possible way to make incandesant material flares, I posted this same message in the discord and it went about 15 days with no answer so hopefully the official forums will have something
 
Think all light sources in ror are actually incandesant as they are created before LEDs was a think in cars and vehicles.
 
I want to change this to an incandesant flash and not a LED flash, I already have textures for it i just need to change the way the material flare works
 

Attachments

  • 10-28-2022-00-44-01.gif
    3.8 MB · Views: 128
So, you want it to fade in and out as it turns on and off, rather than the hard ON-OFF-ON-OFF? (that looks like absolute crap)

I haven't seen this myself. I guess your best bet would be to talk to the person who made that private mod and ask them how they did it, seeing as nobody here knows how.

I read through flares and flares2 section and I can't find anything useful there.

Might even be an undocumented feature, or some janky hack!

Maybe it's done with a custom flare with literal frames specified in the anim_texture, as opposed to "light-on.png" and "light-off.png" I have no idea.
 
I think he don't want all those LED bits he wants all len lighten up, but don't know
 
Hi, sorry for the response lag.

Presently this can't be done, but since it keeps coming up I'll see what I can do about it. To break it down, we have 3 things which deal with lights on vehicles:
  • Billboard flares - these are just textures always oriented towards camera. You can customize it by providing your own material in truck file, section "flares". Note that OGRE renderer supports animated textures, so some modders created incadescent turn signals by setting the blink delay to 0 and simulating the blinking via texture animation. This isn't usable for other flares tho.
  • OGRE light sources - these actually illuminate the environment (unless the shading is broken as it presently is).
  • Material bindings - these actually swap a material based on the flare's on/off state. Theoretically you could use the animated texture trick I described above for turn signals, I'm not aware if anyone did this.
Anyway, we already have inertia simulation in the truck definition fileformat: https://docs.rigsofrods.org/vehicle-creation/fileformat-truck/#set_inertia_defaults - so I'm thinking of making flares support it too. It doesn't feel like much work:
  • Billboard flares - we alraedy have code to scale them, it's used for all flares based on angle, it's especially visible on beacons.
  • OGRE light sources - trivial, you just set darker light color: https://ogrecave.github.io/ogre/api/1.11/class_ogre_1_1_light.html#ae7ade1a5befac759d77fa3fe9a399e5c
  • Material bindings - I have to do research here. Basically the code must change, instead of just swapping 2 materials we'll have to fade the "lit" texture in and out. Nonetheless I know OGRE's material system and things like this can be done on the go.
 
Well what do you know... I gave it a shot and it worked: https://github.com/RigsOfRods/rigs-of-rods/pull/2937#issuecomment-1305700070

Note that dev branch is very experimental, many lights don't work at all or indicators are broken. Nonetheless, it should be done before next release.

The reason why I used that branch instead of creating another is that it completely reworks (and in some cases, fixes) lights, including networking, and I wanted to build on top of that work.
 
You don't need to make every word of every message bold; you can get your point across without it
Is there any possible way to make incandesant material flares, I posted this same message in the discord and it went about 15 days with no answer so hopefully the official forums will have something
If you are talking about material flare bindings yes, -- did it on his IC CE model. I don't see any shame in asking him to get some advice, but it is possible. It's just like doing it for LED's but you have to make tons of .PNG files where each one has a color that gets a little brighter each time, so it is a little more complex.
 
Last edited by a moderator:
Back
Top