Jump to content

Kerbin Mini Shuttle


helldiver

Recommended Posts

Theoretically, yes, however a lot of what I am doing relies on the behaviour of texture border clamping/wrapping. If everything was in the same texture I would have to emulate this programmatically in the shaders, which would complicate things and could potentially hurt performance. It will definitely boost the instruction count by quite a bit, though it would require testing to see if the effect is noticeable. Other flight simulators I have seen store their instrument component textures in separate files - for example the Garmin G1000 in FSX has 231 separate textures. Is a single texture really required? Does it have that much of an impact?

Edit: The performance benefit you get from using a texture atlas is reduced draw calls due to using the same texture and the same shader for every object. In a GUI situation, the number of draw calls is not really affected by whether textures are in the same atlas. In fact many textures would be used in one pass.

Gotcha!

You understood exactly what I meant! :D

Ok, should have the MFD ready in about an hour or two

Link to comment
Share on other sites

Gotcha!

You understood exactly what I meant! :D

Ok, should have the MFD ready in about an hour or two

In an hour or two I will be asleep, given that it is currently 10:37pm where I am.

So, multiple textures are OK then? It would certainly make editing the components easier.

Link to comment
Share on other sites

Also, not to alarm you or anything, but I read this post on how to make IVA cockpits and it says this:

Important note on Scales

--------------------------

you must MUST work to reScaleFactor 1. If you don't, then it won't line up and you'll just have a big headache. Even if you think you'll be clever and resize the internal model 1.25 in Unity. It knows you're being a smartass and it'll make you pay dearly, trust me I tried.

Disclaimer: I haven't made an IVA before, so I did not know about this when I gave you the earlier advice. Sorry. Though I am a bit skeptical that it is as bad as TT makes out.

Link to comment
Share on other sites

Hrm I think I already accounted for that, we shouldn't have issues.

dMA5CDz.jpg

Going to convert to FBX soon as I get done here, I'll then upload to my webspace so you can download it.

You'll have to manually assign all the textures in Unity or what have you. Will explain the buttons in a moment.

Link to comment
Share on other sites

MxlP8mW.jpg

ALT is the ADI you are making right now, that would come up. HDG would be the HSI with compass rose and all that jazz. The rest I think you can figure out, let me know if you need layout or more information on the other MFD modes. We won't use ILS, A/P, DTV, or Docking modes for now. Unless you can figure out how to implement those?

Converting to FBX and I will PM you the download link

Sorry for all the posting, had to step out several times.

Link to comment
Share on other sites

Hrm I think I already accounted for that, we shouldn't have issues.

dMA5CDz.jpg

Going to convert to FBX soon as I get done here, I'll then upload to my webspace so you can download it.

You'll have to manually assign all the textures in Unity or what have you. Will explain the buttons in a moment.

Heh, nice touch. I wonder what the Kerbals can plug into those ports on the back.

KST-01, this is control. Telemetry is picking up an abnormally high power drain from the PFD. Can you confirm, over?

Control, uh, Jeb was charging his kPhone. We've locked it in the cargo bay now until KSS RV. Over.

Thanks for the PM. I will see what I can do.

Link to comment
Share on other sites

Here it is again, but this time it is in game. I am going to have to split the screen from the rest of the mesh in order to apply transparency to it so that the underlying panel is visible. It is ridiculous that you cannot have transparency, emissivity and normal mapping on a model, purely because of the lack of shaders available. No matter - I will write a plugin to allow custom shaders. So in the config file you would specify which objects have which custom material, with the custom material's parameters set and a shader file in the same directory. Judging from the code required this particular plugin should be pretty much impervious to changes introduced by new KSP versions, as almost all of what it deals with is Unity-specific, not KSP.

CitAFPX.jpg

Link to comment
Share on other sites

Man, you're freaking awesome!

Working on the cockpit to try and marathon it today. Hopefully, as long as I don't get distractions... it should be done by tomorrow.

Also, don't worry so much about the test MFD, that is giving us the feedback I needed.

I actually put all those textures on it as a test. I knew that Unity didn't handle textures too easily and that you pretty much had to program it in. Just wasn't sure if the KSP team had solved that or come up with their own routine.

Edited by helldiver
Link to comment
Share on other sites

Hrm, how did Bac9 and those guys do transparency on their windshields? Did they also do a custom thing?

The emissives are to allow you to turn on the cockpit panel lights at night so you get better visibility.

Link to comment
Share on other sites

Hrm, how did Bac9 and those guys do transparency on their windshields? Did they also do a custom thing?

The emissives are to allow you to turn on the cockpit panel lights at night so you get better visibility.

From my tests I just made a png that was slightly transparent and that did the trick for me. No plugin required.

Link to comment
Share on other sites

From my tests I just made a png that was slightly transparent and that did the trick for me. No plugin required.

Ahh ok. Hrm.

@ZRM, did you flip the green channel on the normal, or are the lines on the corner of the MFD (on the first picture you posted) just a result of the .JPG resolution? The in-game shot looks perfect though.

Link to comment
Share on other sites

Here's a quick render in Max of the MFD with all of the texture maps applied correctly:

Oh I didn't notice you said Max. Yeah, if you render any of my work in Max, you have to set the Normal map to flip green. When you select Normal Bump in the roll out, you will see an option for Channel Direction. Make sure Flip Green is selected.

Link to comment
Share on other sites

From my tests I just made a png that was slightly transparent and that did the trick for me. No plugin required.

From studying the stock shaders available, you can only use transparency if you don't use emissivity. And with transparency you can only have specular OR normal mapping, not both.

Anyway, that does not matter any more, as I have got my plugin that allows you to use custom shaders working:

Bhi0gUN.jpg

The panel is now showing through the glass layer. The texture for the panel has not been set, but at least I have an opacity map, normal map, emissivity map, diffuse map and specular map in one shader in one pass.

Link to comment
Share on other sites

Heh, I clearly don't double-check my works of art in photoshop - spot the problem with the pitch scale:

uc7Iir1.png

BTW, that roll indicator is temporary. Ideally it should take up more room, have more notches and the lines should be thicker. And of course the indicator arrow needs to be added.

wow. amazing optical illusion. scroll down the page and look at the picture.

Link to comment
Share on other sites

Right, I now have the ADI working in the MFD in game:

2b7WCPw.jpg

Helldiver, I had to modify the opacity the opacity texture quite a bit to make the underlying panel visible enough. You will probably want to make your version more transparent as well. Possibly it could be completely transparent, but still shiny, and perhaps have a few scratches on it.

Edit: I also recommend that you make the glass panels on the IVA displays separate components as well as the back panels (you can still keep the UVs and texture). Otherwise you are getting an unnecessary performance hit (which may be negligible, but still) for making the entire IVA use a potentially transparent material, which means that the game would have to sort the triangles of the entire cockpit every frame, instead of just the glass panels.

Edit: On IRC I have been getting support for the idea of having a throttle/thrust indicator. Would you add that to the MFD? It would look something like the middle panel in this image:

MFD1-3.gif

Edited by ZRM
Link to comment
Share on other sites

Will you be able to see the internal IVA stuff externally? Maybe using the sfr plugin? Not sure what you have planned for windows. Would be nice if more people did that sort of thing.

Earlier in the thread Helldiver said he didn't want to do that. Not sure if he'll change his mind. Also consider that making the IVA visible from outside would have a performance impact, especially if the MFD displays are kept active.

Link to comment
Share on other sites

On IRC I have been getting support for the idea of having a throttle/thrust indicator. Would you add that to the MFD? It would look something like the middle panel in this image:

MFD1-3.gif

I really can't wait to fly this from the cockpit; it looks so good.

ZRM, will the ADI point straight ahead or in line with the OMS engines? Either way, it may be useful to have a seperate marker for the other one.

Link to comment
Share on other sites

I really can't wait to fly this from the cockpit; it looks so good.

ZRM, will the ADI point straight ahead or in line with the OMS engines? Either way, it may be useful to have a seperate marker for the other one.

The final ADI will definitely have at least two pointer indicators. The main one will point in the direction of the cockpit (since that is relatively stable), and another marker will point in the thrust direction. Then there will also be the target and prograde/retrograde markers. Each secondary marker is in fact two markers - one on the ADI, and one on the heading indicator. It may even be better to represent them with directed arrows when out of view on the ADI.

Link to comment
Share on other sites

From studying the stock shaders available, you can only use transparency if you don't use emissivity. And with transparency you can only have specular OR normal mapping, not both.

Anyway, that does not matter any more, as I have got my plugin that allows you to use custom shaders working:

Bhi0gUN.jpg

The panel is now showing through the glass layer. The texture for the panel has not been set, but at least I have an opacity map, normal map, emissivity map, diffuse map and specular map in one shader in one pass.

That's good to know. I just messed around and didn't go too in depth with it. I like the look of this!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...