Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Author Topic: set emissive multiplier on mesh, not entire object  (Read 2332 times)

bleach

  • Newbie
  • Posts: 9
set emissive multiplier on mesh, not entire object
« on: August 24, 2020, 07:37:03 pm »

Is it possible to set the emissive multiplier on a mesh instance not the object instance?

for example, you can do something like:

Code: [Select]
var geometry =  this.get_geomob(0);
geometry.set_emissive_multiplier( 0 );

This will control all the emissive textures for the entire object.

Is it possible to do something like achieving something similar but for a single mesh object?

An example use case is lights on a vehicle, for example, activate just the taillights.

thanks in advance.
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: set emissive multiplier on mesh, not entire object
« Reply #1 on: August 25, 2020, 11:06:32 am »

I don't know..but depending on what you want to achieve you could instead paint your 3D model with an emissive texture. I did so for my emissive streetlight which I modelled in blender

In the mtl file add the name of your emissive texture dds file under "tex_emissive"
{
   "version" : 512,
   "mats" : [
   {
...           

"emissive" : true,
....
      "tex_emissive" : "lantern color.dds"
   }]}


Logged

bleach

  • Newbie
  • Posts: 9
Re: set emissive multiplier on mesh, not entire object
« Reply #2 on: August 25, 2020, 07:26:40 pm »

Thank you Fly77,

I have no trouble adding emissive textures or controlling them on a per-object basis. I specifically need to get one component of an object and control the emissive textures on that alone.

Think about it in terms of getting the headlights of a vehicle and setting the emissive multiplier while leaving al other lights, or meshes with emissive textures unmodified. I am basically after a way to control brake lights, taillights etc, via emissive textures and not using dynamic light objects.

Thanks for your input.
Logged