Jump to content

Kethane Pack 0.9.2 - New cinematic trailer! - 1.0 compatibility update


Majiir

Recommended Posts

Majiir, this new overlay looks vastly better than those older screenshots with gigantic hexagons and awkward white borders, great improvement. Getting a Tiberian Sun vibe from that visual. :)

You can also mask that overlay out by using a shader similar to rim colored ones, forcing surfaces with normals further from the camera to fade into transparency. That will make it blend nicely with the planet.

Also, how hexagons are done? Is that a texture? Because it would be cool if it was, as that will enable modders to make lots of pretty kickass reskins of that overlay, e.g. point clouds.

***

And btw, as small idea about resource density visualization: instead of representing it with a shade of a fill, you can make all nodes, for example, 20% opaque and grow them in stacks to represent higher density areas. Five overlayed icons would give 100% opacity, and that "tower" would look very nice, readable and easily noticeable on overview.

Or you can make lines growing along normals representing the density, that would be another very modern and readable way to display that info:

TRON_GFX_BR_03.JPG

Lines can also use textures, which would allow to make absolutely kickass visualizations like these:

TRON_GFX_RI_01.JPG

Edited by bac9
Link to comment
Share on other sites

Majiir, this new overlay looks vastly better than those older screenshots with gigantic hexagons and awkward white borders, great improvement. Getting a Tiberian Sun vibe from that visual. :)

You can also mask that overlay out by using a shader similar to rim colored ones, forcing surfaces with normals further from the camera to fade into transparency. That will make it blend nicely with the planet.

Also, how hexagons are done? Is that a texture? Because it would be cool if it was, as that will enable modders to make lots of pretty kickass reskins of that overlay, e.g. point clouds.

***

And btw, as small idea about resource density visualization: instead of representing it with a shade of a fill, you can make all nodes, for example, 20% opaque and grow them in stacks to represent higher density areas. Five overlayed icons would give 100% opacity, and that "tower" would look very nice, readable and easily noticeable on overview.

Or you can make lines growing along normals representing the density, that would be another very modern and readable way to display that info:

eMwSHZg.jpg

I love this ones more!

Link to comment
Share on other sites

You can also mask that overlay out by using a shader similar to rim colored ones, forcing surfaces with normals further from the camera to fade into transparency. That will make it blend nicely with the planet.

I think that's a really good idea.

Link to comment
Share on other sites

Quick question, the new part "KE-WAITNONOSTOP-01 Kerbal Unreconstitutionator" (great name by the way), doesn't seem to have any function, is it supposed to, or will it be updated later?

Also, a couple of requests, it would be great to have some smaller stack-able storage units (say 500L or so), a smaller drill, and a less powerful generator. Other than that, I'm really liking this new update.

Link to comment
Share on other sites

Majiir, this new overlay looks vastly better than those older screenshots with gigantic hexagons and awkward white borders, great improvement. Getting a Tiberian Sun vibe from that visual. :)

Thanks! I like it a lot better than the old method. I can't believe I didn't think to try it earlier.

You can also mask that overlay out by using a shader similar to rim colored ones, forcing surfaces with normals further from the camera to fade into transparency. That will make it blend nicely with the planet.

What shader would do this? I could try writing my own, but I have no experience with shader languages.

Also, how hexagons are done? Is that a texture? Because it would be cool if it was, as that will enable modders to make lots of pretty kickass reskins of that overlay, e.g. point clouds.

The hexagons are a procedurally generated mesh. Each hex is its own set of vertices and triangles, all in one MeshFilter. There's a texture for it but it's just a color palette, so each hex gets its color from UV coordinates. I was planning to have cooler textures at some point.

And btw, as small idea about resource density visualization: instead of representing it with a shade of a fill, you can make all nodes, for example, 20% opaque and grow them in stacks to represent higher density areas. Five overlayed icons would give 100% opacity, and that "tower" would look very nice, readable and easily noticeable on overview.

Or you can make lines growing along normals representing the density, that would be another very modern and readable way to display that info:

Lines can also use textures, which would allow to make absolutely kickass visualizations like these:

These are all cool ideas, but I'll have to play with the hex grid first! I'm still experimenting with some of the mechanics like mouseover detection.

Link to comment
Share on other sites

I... might have an idea how to do it... let me noodle through this and I might have something for you soon.

Majiir -

I think you could easily do KethaneScoops by adding a bool property to ResourceDefinition.cs named Airborne that is populated from the resource definition, and a bool property to KethaneExtractor.cs named Airscoop that is populated from the part definition.

Once that is done, just change OnFixedUpdate in KethaneExtractor.cs thusly:



public override void OnFixedUpdate()
{
if (animator.CurrentState != ExtractorState.Deployed) { return; }
var energyRequest = this.PowerConsumption * TimeWarp.fixedDeltaTime;
var energyRatio = this.part.RequestResource("ElectricCharge", energyRequest) / energyRequest;

foreach (var resource in resources)
{
if (!(this.AirScoop ^ resource.Airborne)) { continue; }
if (!this.Airscoop && !animator.CanExtract) { continue; }

var deposit = KethaneController.GetInstance(this.vessel).GetDepositUnder(resource.Name);
if (deposit == null) { continue; }

if (this.Airscoop) {
var amount = TimeWarp.fixedDeltaTime * resource.Rate * energyRatio * this.vessel.atmDensity;
} else {
var amount = TimeWarp.fixedDeltaTime * resource.Rate * energyRatio;
}
amount = Math.Min(amount, deposit.Quantity);
deposit.Quantity += this.part.RequestResource(resource.Name, -amount);
}
}

I probably made a couple of syntax errors there but the idea is airscoops can only extract airborne resources and the amount they get for a given unit of energy scales up/down based on current atmospheric density. So you would have "clouds" of KethaneGas (for example) that are detected the same way, an airscoop to collect it and a converter to extract the kethane from it all using the existing detect/converter code.

You wouldn't have to worry about the existing spark/cloud animation stuff since the hit detection would never "hit" so they would never trigger the animations. If you wanted to add specific animation stuff based on say atmDensity creating a glow for higher densities/etc you could do that but that would require more changes to the animator module to check for AirScoop and animate accordingly.

I don't have the tools to test right now and am work ;) but I /think/ the theory is sound and means not having to have a different AirExtractor set of module code.

Link to comment
Share on other sites

What shader would do this? I could try writing my own, but I have no experience with shader languages.

All KSP shaders have Rim Color and Rim Faloff properties, all that's needed is to modify one to add a transparency pass into that part. I'm not really too familiar with shaders, but they seem to be pretty straightforward in Unity and some pretty crude copy/paste from transparent shaders lying around in assets could probably work. Alternatively, google something like "unity rim alpha" and check shader section of Unity wiki, there should be some examples with relevant shader code.

The hexagons are a procedurally generated mesh. Each hex is its own set of vertices and triangles, all in one MeshFilter. There's a texture for it but it's just a color palette, so each hex gets its color from UV coordinates.

Welp. But wait, maybe hexagons aren't bad. They can always be used for stuff like click detection and new visuals could be done with fancy transparent textures that could be overlayed onto the mesh. Texture can contain the hexagon fill matching the real mesh, or a circle, or a point cloud, anything. Should be pretty simple as UV coords for every single mesh would be identical. Or not: you can make, for example, a texture atlas with four icons on a 4x4 grid and assign the appropriate part of the texture onto appropriate meshes (three dots for ore, triangle for kethane, etc.).

There is also no need to do coloration with textures, you can easily add diffuse color property to a shader that will allow you to tint the material to anything you want without modifying a (usually grayscale) base texture. Check stock Unity Diffuse and Transparent, they have a Main Color property that does precisely that. Or KSP/Transparent/Unlit Transparent, it's perfect.

Edited by bac9
Link to comment
Share on other sites

I think you could easily do KethaneScoops by adding a bool property to ResourceDefinition.cs named Airborne that is populated from the resource definition, and a bool property to KethaneExtractor.cs named Airscoop that is populated from the part definition.

Heh, I should have been clearer. I know how to write the module code. (I'd make it a distinct module, anyway, since it has more advanced behavior than a simple extractor.) The issues are:

  • how to design the mechanic so it fosters enjoyable gameplay
  • how to balance it with other parts and mechanics
  • getting models of similar caliber as the existing ones
  • planning when in the roadmap to insert this

I'm a programmer, but programming parts is really easy. There's a lot of extra thought that goes into maintaining and improving the overall quality of the mod. Module code alone can't keep it afloat!

All KSP shaders have Rim Color and Rim Faloff properties, all that's needed is to modify one to add a transparency pass into that part. I'm not really too familiar with shaders, but they seem to be pretty straightforward in Unity and some pretty crude copy/paste from transparent shaders lying around in assets could probably work. Alternatively, google something like "unity rim alpha" and check shader section of Unity wiki, there should be some examples with relevant shader code.

Alright, I'll check it out. I kind of like seeing the hexes as they go "around the bend" but it could definitely be softened up. I'm currently using the KSP/Alpha/Unlit Transparent shader, so I'll see if that has what I need. A lot of things that are easy in Unity are much more difficult in plugin code, so it might take a bit of experimentation.

There is also no need to do coloration with textures, you can easily add diffuse color property to a shader that will allow you to tint the material to anything you want without modifying a (usually grayscale) base texture. Check stock Unity Diffuse and Transparent, they have a Main Color property that does precisely that. Or KSP/Transparent/Unlit Transparent, it's perfect.

Yes, but I need some way to assign colors to each hex individually, and changing the material color would affect all hexes simultaneously. Instead of changing UV coordinates, I could move meshes between objects with different materials. I'm not really sure which is best. My current method seems a tad heavier for each frame rendered, but the other way might be really problematic when updating a lot of cells at once. Or maybe it doesn't even matter. :-)

Link to comment
Share on other sites

Ignore this, question was asked already and I had to go to work before it was moderated. The hex map looks amazing so far btw!

Edited by Krisism
Someone asked the same question while I was awaiting moderation.
Link to comment
Share on other sites

Does that mean that you plan on changing that? I'd really like to have multiple inputs and outputs.

He could probably allow for multiple inputs, but doing more than one output would probably ruin gameplay a little. Kethane is not supposed to be an end all be all resource, it was just convenient to keep it that way till the code was in place to allow for more resources. NOW between the EL mod and Kethane we have kethane to convert to fuel and ore that can be made into metal for rockets. The structure is in there to flesh out an entire resource system it just needs some modders to pick it up.

edit: Unless by more than one output you are planning on waste resource, which would be pretty cool in idea but in all practicality it is space you can just dump the waste overboard and be done with it.

Link to comment
Share on other sites

He could probably allow for multiple inputs, but doing more than one output would probably ruin gameplay a little. Kethane is not supposed to be an end all be all resource, it was just convenient to keep it that way till the code was in place to allow for more resources. NOW between the EL mod and Kethane we have kethane to convert to fuel and ore that can be made into metal for rockets. The structure is in there to flesh out an entire resource system it just needs some modders to pick it up.

edit: Unless by more than one output you are planning on waste resource, which would be pretty cool in idea but in all practicality it is space you can just dump the waste overboard and be done with it.

I think you are totally missing my intent.

.6 now allows Kethane to do other resources rather than Kethane, so my intent is to use the plugin to replicate http://i.imgur.com/lGlWdyn.png I don't want to use the Kethane resource at all but I don't want to be able to Convert Water into Oxium and Propellium, etc etc

Link to comment
Share on other sites

edit: Unless by more than one output you are planning on waste resource, which would be pretty cool in idea but in all practicality it is space you can just dump the waste overboard and be done with it.

Problem with dumping it in space is that it becomes a nasty navigation hazard. If you are in orbit it's going to be bad if you are out of atmosphere and there is no drag.

Link to comment
Share on other sites

Heh, I should have been clearer. I know how to write the module code. (I'd make it a distinct module, anyway, since it has more advanced behavior than a simple extractor.) The issues are:

  • how to design the mechanic so it fosters enjoyable gameplay
  • how to balance it with other parts and mechanics
  • getting models of similar caliber as the existing ones
  • planning when in the roadmap to insert this

I'm a programmer, but programming parts is really easy. There's a lot of extra thought that goes into maintaining and improving the overall quality of the mod. Module code alone can't keep it afloat!

Heh sorry, I wasn't thinking too well ;)

I was just thinking, ooh 10m fix ;) I don't do 3d modeling or I would offer to help there.

Link to comment
Share on other sites

I think you are totally missing my intent.

.6 now allows Kethane to do other resources rather than Kethane, so my intent is to use the plugin to replicate http://i.imgur.com/lGlWdyn.png I don't want to use the Kethane resource at all but I don't want to be able to Convert Water into Oxium and Propellium, etc etc

Holy flowcharts batman... that is one complicated resource flow. It is cool as hell.

Link to comment
Share on other sites

Yes, but I need some way to assign colors to each hex individually, and changing the material color would affect all hexes simultaneously. Instead of changing UV coordinates, I could move meshes between objects with different materials. I'm not really sure which is best. My current method seems a tad heavier for each frame rendered, but the other way might be really problematic when updating a lot of cells at once. Or maybe it doesn't even matter. :-)

Actually, nope, you can change material properties individually for every single object in your scene even if they are sharing one material. That's how Unity animations work, you can make e.g. ten lamps colored into ten colors and flickering with alpha value keyframes independently from each other.

There should be a simple switch of some sort that defines whether material parameter modification is shared or local.

Edit: Yeah. There are materials and sharedMaterials, the former can be modified without affecting any other objects and the latter changes the material globally.

http://docs.unity3d.com/Documentation/ScriptReference/Renderer-sharedMaterials.html

I think that using material properties instead of UV colors would be a lot faster indeed, as you will be changing a relatively compact color value instead of setting up UV coordinates for six vertices per node.

Edited by bac9
Link to comment
Share on other sites

Holy flowcharts batman... that is one complicated resource flow. It is cool as hell.

That's the Squad flowchart for the proposed official resource system, but the things I've seen hinted from Squad now seems they are backing away from that complexity into somethign much more Kethane-like They've already said there will only be 3 converters small medium and large, that just convert everything, just like Kethane.

So I plan to replicate that flowchart if Squad won't cuz while I appreciate the work of Kethane modders, it really hurts my suspension of disbelief

Link to comment
Share on other sites

Problem with dumping it in space is that it becomes a nasty navigation hazard

You speak truth! In fact frozen doo-doo was the plot device for this

.

Also, with regards to kethane scoops, it should be easy to balance them with liquid kethane - all one has to do is figure out the density of kethane as a gas, what % of the atmosphere is actually kethane, then take it from there.

Of course, the way I see it, there's an issue in terms of consistency since the kethane jet engines have set a precident: as it sits kethane is also its own oxidizer - a sort of monopropellant if you will. Since a kethane scoop is not only compressing gaseous kethane but heating it up as well (through friction) then, theoretically, collecting kethane that way should be really dangerous. Then again, that's just my opinion, so meh.

I'm also starting to look at kethane as being magical fuel rather than a resource to be converted to something useful, since kethane scoops + kethane jet engine means unlimited fuel... which kind of makes me wonder if it's gone from expanding gameplay to being a sort of crutch. Don't get me wrong, I'm not saying other's shouldn't use it. I like the idea of a turborocket or a closed cycle turbofan for extra-planetary fun, and I love the work Majiir is doing on the maps. That's just wicked good stuff. I'm merely expressing a mild concern from a gameplay standpoint, that's all, and it's just an opinion, nothing more.

Also, as a side note:

I wonder if someone could convert a hitchhiker into a kethane converter... a kerbal goes in, kethane comes out...

Link to comment
Share on other sites

I'm also starting to look at kethane as being magical fuel rather than a resource to be converted to something useful, since kethane scoops + kethane jet engine means unlimited fuel... which kind of makes me wonder if it's gone from expanding gameplay to being a sort of crutch.

This has always been my problem with Kethane, not so much the crutch thing just that it's so magical, one resource to become anything.

I wonder if someone could convert a hitchhiker into a kethane converter... a kerbal goes in, kethane comes out...

As long as we're doing magic, lets do the opposite. Kethane goes in, Kerbal comes out!

Link to comment
Share on other sites

Can someone Help me?

I cant for the life of me, figure out how to get the debugger to work. I use alot of mods is it a compatibility issue? Is there a special way to install it?

Please help

Drop the part in the same folder as the other Kethane parts. Attach debug unit to craft ingame (its on control tab) and right-click to 'open debug console'.

If you are running the EL 1.1 modified .dll the debugger will not function.

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...