Jump to content

Emissive on windows.


Recommended Posts

Hey everyone! I have been trying, unsuccessfully, to put an emissive on my pods windows. I followed the directions in the link at the bottom. I spent most of the time doing it wrong, I suppose, as I didn't realize things had changed since the swap over to unity 5. I think it may be because I'm not setting up the color gradient right? A little bit of background information. The part is already animated in blender and exported into unity. I tried copying the animation so it wasn't read only, but I'm trying to create a new animation in addition to that one, just trying things. The animation it would create wouldn't do anything to the shading. The only time I could even get the shading to change in unity was when I did it the way I percieve to be the old way. The part wouldn't load in KSP that way. When I say the old way, I mean just creating an animation and moving the emmisive alpha etc, numbers. What I mean by the new way(follow the link)

 

 

Link to comment
Share on other sites

Hi if you are using the color animation editor all that side of the animation is done in unity there's no need for any prior animation .

Things to note, for the color animation editor to work, you must select the parent object when selecting the editor,   you must have the relative path correct, that linked post describes the process really well though.

You cannot create the OLD type emissive animations in U5 onwards , which is sad but life goes on.   You either have to use the color animation editor OR  the ModuleColorChanger, which requires no animation on your part, and if your lighting is just emissive with no light source attached then this latter way is much easier, all that's required is that the part to glow is a separate mesh from the main model and has an emissive texture applied and set to black, then simply reference the mesh name for you r window parts in the module and you're done , The module looks like

MODULE
	{
		name = ModuleColorChanger
		shaderProperty = _EmissiveColor
		animRate = 0.8  // how fast they brighten and dim 
		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 // This ties emissive lighting to main lighting AG
		includedRenderer = PortHoleSingle  // This is the model mesh that has an emissive texture 
		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
		}
	}

 

Link to comment
Share on other sites

Thanks again for the help @SpannerMonkey(smce).When you say separate mesh from the main model could you please elaborate a little further? The windows are a separate mesh from the pod. The hierarchy is as follows- windows <----Dragonv2 <------ model <------- GameObject. When you say separate mesh do I just need to duplicate the windows  and change the hierarchy? or duplicate and keep the same/doesn't matter? Or is it a duplicate of the entire pod blacked out with just the windows showing the emissive texture? Also, I'm using these textures on the windows, which are set to the KSP emissive specular shader. 

37055387631_25b14ee317_b.jpg

37198202835_7bac113773_b.jpg

 

Edited by harrisjosh2711
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.

×
×
  • Create New...