vossiewulf

Launchpad Lights

34 posts in this topic

1 hour ago, Drew Kerman said:

I still want that damn water tower pad light to go off during the day...

We could add a button that makes it short and go dark while sparking and smoking, much more satisfying than just making it go away. And add some Kerbal cursing at least, although even better would be a little Kerbal running out of the tower, down the ladder, and toward the shore with his pants also smoking and sparking.

Share this post


Link to post
Share on other sites

Making some progress here.  I've been tweaking the model to try to keep the poly count down as I am at 770 tris currently which should hopefully be okay.  I don't have much experience with animation but from what I've read I will just handle this from within Unity since its a basic animation, just pivoting.  Hopefully I'll have more progress to share soon.

pn9o30Z.jpg

3 people like this

Share this post


Link to post
Share on other sites
18 hours ago, Trolllception said:

 I've been tweaking the model to try to keep the poly count down as I am at 770

Hi, no need to really bother, you could treble that poly count with very little if any impact on the game. If you use the extended animation options, and take a look a cargo bays, you will be able to angle the light pitch using a slider,  otherwise you'll be stuck with at rest or full pitch, this method lets you point it exactly where you want.

	MODULE
	{
		name = ModuleAnimateGeneric
		animationName = LaunchPadLamp
		startEventGUIName =Tilt Up
		endEventGUIName = Tilt down
		actionGUIName  = Toggle tilt
		allowDeployLimit = true  ///  the lines below this allow positioning of the lamp
		revClampDirection = false
		revClampSpeed = true
		revClampPercent = true			
	}

 

1 person likes this

Share this post


Link to post
Share on other sites

I remade the arms of the light since I didn't like the last result.  I also think I am more or less complete with the model portion.  I want to get some opinions on if the light can looks too squared off and if I should add more polys.  Also if I should put more detail in the tilt mechanism at the bottom or just leave it extra simple since the lights will usually not be zoomed in on specifically.

Not sure if anyone knows the best way to do the light in unity.  I think it might be a good idea to have the light cone show so give it more of a spotlight effect.  I currently have a plane in front of where the light might go but not sure if KSP can handle a decent transparent shader to let light pass through and give it a slight reflection to simulate a lens on the spotlight.

ISmtJ53.png

1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, Trolllception said:

Not sure if anyone knows the best way to do the light in unity.  I think it might be a good idea to have the light cone show so give it more of a spotlight effect.  I currently have a plane in front of where the light might go but not sure if KSP can handle a decent transparent shader to let light pass through and give it a slight reflection to simulate a lens on the spotlight.

Hi two ways to skin this cat, but you'll have to decide at the modelling stage which way you want to go. 

You will want the reflector to have an emissive shader , so it can glow, so method 1 using the squad work around color animator it will be fine to leave the model more or less as it is. method two, use the ModuleColorChanger to create the emissive, method two requires that the reflector be a separate mesh .

Both methods though will require the lens/glass to be also a separate mesh, there are two methods of giving it some transparency, if you are unfamiliar with unity the easy way would be to apply the ksp  translucent specular shader and set the opacity to suit, you could also use the ksp alpha cutoff shader  though that's a little more fiddly to get just right .

  If you take a look down in the modelling and texturing sub forum of addon development you'll find posts with the how to's regarding color changer and color animator. To my mind especially with multiple children the color animator is a bit clunky and the module color changer is easier to set up than  the animator is to get good result from (though white is dead easy)

No need to worry about the lens blocking the light it wont, unless set to a specific culling layer the light will shine through any mesh. 

Quite a lot to take in, if you get stuck feel free to drop me a pm.

 

PS depending on how your ksp is setup cones will either be passable or horrible, they never seem to look right, unless that's just the default unity ones, which are way to heavy for my taste

Edited by SpannerMonkey(smce)
1 person likes this

Share this post


Link to post
Share on other sites

Well I am moving along but have gotten stuck at the texturing phase.  I always seem to struggle with trying to get appealing textures.  This is what I have so far.  Not sure if anyone has any ideas for texturing this model.  The struggle is real when it comes to texturing!

88x9Znb.png

vHf2LbJ.png

Edit:  I think this (below) will be the final model/textures?.  I am going to work on getting the animations and CFG file setup and put it in game and see where we can go from there.  I don't have any idea how to get the lights to actually track a target via just config files.  I think maybe some code is in order?

ohxOuTx.png

And fully illuminated

DrKTaib.png

Edited by Trolllception
More progress
2 people like this

Share this post


Link to post
Share on other sites

Coming along nicely, still reckon you should bump up the poly count especially on the lamp body itself. 

 

Share this post


Link to post
Share on other sites
1 hour ago, Trolllception said:

So now the question is how do we get this to track vessels and spawn when something is launched?

Adjustable Spotlight (Youtube)

 

you might look at the code here it had a target track 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now