Jump to content

[WIP] [1.12.x] MOARdV's Avionics Systems - MAS Interactive IVA! (v1.3.7, 7 April 2023)


MOARdV

Recommended Posts

1 hour ago, Manul said:

I've just encountered a mysterious issue with  interactions between MAS and .mu plugin for Blender. The model made in Unity can have multiple animations and they work just fine with multiple MAS ANIMATION nodes. But when I reimport a model made in Unity using mu plugin or create a new one from scratch, MAS begins to freak out. One animation always works as intended while others freeze randomly as if they fail to update. They can be frozen for a minute and then work just fine until they freeze again. Changing the order of ANIMATION nodes in the prop cfg changes the order of freezing: sometimes only 1 out of 3 animations is frozen, sometimes 2 are frozen and only one is working.

Sounds more like an issue with the blender plugin than MAs? Its support for animations always hasn’t been great.

Link to comment
Share on other sites

1 hour ago, JonnyOThan said:

Sounds more like an issue with the blender plugin than MAs?

The strange thing is that animations work. Until they don't. And then they work again.

1 hour ago, JonnyOThan said:

Its support for animations always hasn’t been great.

In this case the animation just doesn't work.

I need to replicate the issue with RPM and .mu plugin or with MAS and Unity to be sure.

Link to comment
Share on other sites

  • 4 weeks later...
On 3/21/2025 at 7:31 PM, Poppa Wheelie said:

Is there a transform for the border of the Digital Indicator?


NiimgJa.png

Assuming the model is DigitalIndicator.mu, the mesh name is 'DigitalIndicator.001' but note that this mesh doesn't use an emissive shader, you will only be able to change its base color by manipulating the _Color field.

Link to comment
Share on other sites

19 hours ago, vulkans said:

Assuming the model is DigitalIndicator.mu, the mesh name is 'DigitalIndicator.001' but note that this mesh doesn't use an emissive shader, you will only be able to change its base color by manipulating the _Color field.

Thanks, @vulkans.  I don't think I know how to do that.  I'm looking for a way to highlight one of several digitalindicator props at a time.  I'll think of another method to do this.

Link to comment
Share on other sites

5 hours ago, Poppa Wheelie said:

Thanks, @vulkans.  I don't think I know how to do that.  I'm looking for a way to highlight one of several digitalindicator props at a time.  I'll think of another method to do this.

It would be done with a COLOR_SHIFT node:

COLOR_SHIFT
{
    name = DigitalIndicator Recolor
    transform = DigitalIndicator.001
    passiveColor = 100, 100, 100, 255
    activeColor = 255, 100, 100, 255
    variable = fc.GetPersistentAsNumber("Backlight")
    blend = true
    colorName = _Color
}

That would go in the MAS_DigitalIndicator_XXX.cfg file of your choice, inside the MASComponent module. In this example, the base color for the DigitalIndicator.001 mesh will go from grey to red-ish based on the Backlight variable, which is the variable that practically every MAS IVA uses for controlling the emissive backlights on props that have them. The control variable can be anything that you want, meaning you could create a button that toggles a variable called "MAS_DigitalIndicator_Recolor" between 0 and 1, and change 'variable = fc.GetPersistentAsNumber("Backlight")' to 'variable = fc.GetPersistentAsNumber("MAS_DigitalIndicator_Recolor")', then the DigitalIndicator.001 mesh would change between colors whenever you press the button.

To enable emissive support for the prop, it would either need to be recompiled with the proper shader, or preferably just re-made from scratch as this is a very simple object to model.

Link to comment
Share on other sites

9 minutes ago, Poppa Wheelie said:

Thanks again.

I understand everything going on here, except the "colorName = _Color" bit.  What's this for?

The colorName field refers to the internal name of the color for the corresponding texture on any given mesh's assigned shader.

Using the DigitalIndicator model as an example, that part of the mesh is using the KSP specular shader which has two available colors that can be manipulated:

_Color: The RGBA values for the diffuse (or base) color of the texture. Note that this isn't a transparent shader, the alpha value in this case will control the amount of specularity.

_SpecColor: The RGBA values for the specular color that will be applied on top of the base texture, which shows up as a slight shiny tint when viewed head-on against a direct light source, this effect is not mapped so it will affect the entire mesh.

There is also _RimColor and _TemperatureColor, which I've always assumed are used for highlight and re-entry effects respectively, I've never tried manipulating these on props through MAS but something interesting to note with these is that both of the colors are bound to the emissive component of the shader, might be worth experimenting with that.

For meshes that use any of KSP's emissive shaders, the corresponding color is called _EmissiveColor.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...