Jump to content

How do i create Lights for a cabin?


Recommended Posts

I want to have some lights in my cabin, how can i do this? i heard its about texturing, also i use blender and i hope its possible without unity

Link to comment
Share on other sites

18 hours ago, kerbmario said:

I want to have some lights in my cabin, how can i do this? i heard its about texturing, also i use blender and i hope its possible without unity

Do you have the .mu plugin?

If you do then it depends on whether you just want them to appear lit up or if you also want them to cast light as well.

For just appearing lit up then if your models material set up uses the KSP emissive set up, scroll down the materials section till you get to the MU Shaders section and then click on Shaders. It will open up a list with all the various types of KSP shaders. Pick KSP/Emissive/Diffuse. Once you have done that make sure you give it a name or it won't save. Then below that there is a texture section with 2 texture pic sections "_MainTex" and "_Emissive" When one is highlighted, below it is a section with the name and just below that is the name of the picture you set for your main texture(you have to make this outside of blender with a paint program.) You need to edit it to say the name of the texture pic you created(it does not need the suffix). With _Emissive highlighted do the same but edit it to be the emissive pic you created. An Emissive pic should be a duplicate of the main texture, darkened to pitch black but with the sections you want to light up, brightened to almost white. When you UV map your model you will have your windows over these light sections.

When you config your model add in this module and you will have the toggle in the UI to turn lights on and off.

Spoiler

    MODULE
    {
        name = ModuleColorChanger
        shaderProperty = _EmissiveColor
        animRate = 0.8
        animState = false
        useRate = true
        toggleInEditor = true
        toggleInFlight = true
        toggleInFlight = true
        unfocusedRange = 5
        toggleName = #autoLOC_502011 //#autoLOC_502011 = Toggle Lights
        eventOnName = #autoLOC_502012 //#autoLOC_502012 = Lights On
        eventOffName = #autoLOC_502013 //#autoLOC_502013 = Lights Off
        toggleAction = True
        defaultActionGroup = Light
        redCurve
        {
            key = 0 0 0 3
            key = 1 1 0 0
        }
        greenCurve
        {
            key = 0 0 0 1
            key = 1 1 1 0
        }
        blueCurve
        {
            key = 0 0 0 0
            key = 1 0.7 1.5 0
        }
        alphaCurve
        {
            key = 0 1
        }
    }

If you want to cast light as well on the same toggle you need to study the new KSP stock lights along with their config files to see how it is done. If you get stuck then let me know and I can try to clarify stuff you get stuck on.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

 Share

×
×
  • Create New...