Jump to content

[WIP] KerbTown v0.13 Beta - Place static buildings, cities, launch sites & more!


Razchek

Recommended Posts

@Cooly568: You misspelled my name. :( BUT! Awesome cave stalagmites haha.

Couple things I thought about related to kerbtown, not sure if someone mentioned this in the thread: So you can place objects with the mod, custom models of buildings or whatever you want... what about craft files? What if you could construct a building out of parts in the now very roomy SPH and place the craft where you want.

What about a "portal" you could place somewhere in the world, choose a part, and spam a key to spawn the chosen part. Then, if you have gone and modified the part beforehand to be "grab-able" or magnetic using KAS, you could just build your stuff right there by hand or crane?

You can convert parts to static models, and crafts are in the works. But that may not be for some time. At the moment I have a part module in testing that will convert a single part into a static object.

Someone could script a portal, for both part spawning and teleportation. I don't know if I'd add that to the core of KerbTown though.

@Snjo: Persistance for a lot of things will need to be added by the developers.

I will add generic persistance as a part of the resources module, animation positions and object local positions; possibly more in the future. But for some things the persistance will just have to be made by the sub-mod developer.

Of course I will expose the necessary members to do so. :)

@nothke: I really hope you share those when you're done. Epic. <3

This is incredible. I'll try this out.

Of coures it's incredible! The project inhabits some of my spare time. :D

The model doesnt have any textures.

The folder is located in KSP/Gamedata/Buildings_and_stuff/Static/LaunchPad/Stuff goes here

http://www./folder/6wfh24dlwd2rb/Buildings_and_stuff

Rename "Model.mu" to something else. E.g. "MyModel.mu" and don't forget to update the config (case sensitive).

http://i.imgur.com/Zz1t5LN.jpg

Also, although not necessary - come up with a more unique name then "LaunchPad" lol.

Never know what issues it might cause down the track if someone puts something in the same folder with the same name.

I've always wanted to see a world editor for KSP like this! Great!

If I get around to maglev / mass accelerator or space elevator I'll have to try this with it. :)

I look forward to seeing some of your work! :D

Link to comment
Share on other sites

does anyone know what is the source of this problem? Black lines are appearing on the texture in the distance! To me it looks like texture filtering problem, but I tried changing material properties in unity and nothing yet. The texture is converted .tga to .mbm. It could be shadow cascading problem, but there should be no shadows there... It's completely flat, and the ground is not that close below.

Also, there is a significant performance drop when looking into the object. I guess it's the black lines thingy that causes it cause it's all pretty low poly.

6VVfOOq.jpg

note that the black lines disappear in the distance.

Edited by nothke
Link to comment
Share on other sites

does anyone know what is the source of this problem? Black lines are appearing on the texture in the distance! To me it looks like texture filtering problem, but I tried changing material properties in unity and nothing yet. The texture is converted .tga to .mbm. It could be shadow cascading problem, but there should be no shadows there... It's completely flat, and the ground is not that close below.

Also, there is a significant performance drop when looking into the object. I guess it's the black lines thingy that causes it cause it's all pretty low poly.

6VVfOOq.jpg

note that the black lines disappear in the distance.

Looks to me like a shadow precision problem, where depth values in the shadow map are imprecise enough at long range to sometimes round down to be in front of the object casting the shadow. I've seen very similar artefacts when, in my own projects, I have not set up either the correct texture bias for the shadows, or I forgot to make the shadow renderer use linear depth. I'm not sure whether there is much you can do about it, except possibly use completely custom shaders on the object to change the shadow bias for distant objects. You can't do this directly through Unity or KSP, but you could do that using my shader manager plugin I have written for the electronic instrumentation for the Kerbin Mini Shuttle project. However I have not released it yet, and it's not ready for public use yet. Once I do release it, though, you should be able to do this, and also add much improved lighting and texturing to objects, like runway tarmac that actually looks like tarmac.

And I think the reason the lines fade away in the far distance is because that's the point where the game stops casting shadows. The reason the terrain does not have the same problem is probably because the terrain does not actually cast shadows.

Edit: There you go - disable shadow casting on the runway and that should fix the problem!

Edit: You will then want to make the buildings separate objects so that they can cast shadows.

Edited by ZRM
Link to comment
Share on other sites

Edit: There you go - disable shadow casting on the runway and that should fix the problem!

Thank you! That solved the problem. There is still performance drop when looking into the runway though, I don't know why, it's neither high poly nor big textures.

Link to comment
Share on other sites

Thank you! That solved the problem. There is still performance drop when looking into the runway though, I don't know why, it's neither high poly nor big textures.

Which material does it use? If it's a material that allows transparency it could be depth sorting that is causing the performance drop.

Link to comment
Share on other sites

Basically you can't.

All statics are stationary relative to the surface under them so the only altitude you can have an orbiting static at is geosync. Statics also don't respect inclination so it must be placed exactly above the equator or they'll be unreachable. Then you have to get to them without anything other than visual guidance because you can't target them.

If you have a static that is in perfect equitorial geosync you may be able to spawn from it, but in my tries it just resulted in a spawnlocked craft or various glitch spawns resulting from KSP not being able to place the craft and settle it.

Link to comment
Share on other sites

Does anyone here know how to do orbiting objects?

Add a non kinematic rigidbody to the object and apply force as necessary. I haven't tried this, but in theory it should work.

HoY suggested that you could try using KAS to grab one of these objects with a non-kinematic rigidbody and drag it with your ship into orbit. See if that works for you?

Read the manual for information on the rigidbodies component, set the mass for the object inside that node as well.

And yeah, as Greys said: launching from it is not advisable - KSP will not be able to ground it properly, although I may have a work around for that (kinematics only).. we'll see. :)


@nothke: Does your object have any moving parts; animated or scripted?


@Greys: I'm thinking of implementing the stock targetting system to the statics with a parameter to enable it.

Also I use that runway of yours everywhere now, including my quick tests for launch site naming (which is ready for the next update).

Edited by Razchek
Link to comment
Share on other sites

Razchek can you please explain add the spawn point to the pads a little more?

Rasheed, in Unity make an empty GameObject, name it anything so long as it ends in "_spawn", place it where you want the vehicle's to appear and oriented so that Z+ (blue) is the forward direction of the craft, and Y+ (green) is the upwards direction of your craft. For a runway this is Z+ pointing down the runway, Y+ pointing towards the sky, for a launchpad this is Z+ pointing towards the sky and Y+ pointing wherever you like. The craft will be spawned into existence at this point and in this orientation, and then KSP will putShipToGround to settle it onto whatever terrain is below it.

Link to comment
Share on other sites

I don't know what im doing wrong here. I added the gameobject and named it Pad_spawn. I placed it where it should be and orientated it. I export the part, add the part.cfg stuff. It shows up in game but everytime i click, mark as launch site it shows this.

0pSv1VV.png

help!

And yes i did make the gameobject the child of my model

Edited by rasheed
Link to comment
Share on other sites

Hi, I have a problem with the launch site selection thing.

It's fine, but it's blocking the button for subassembly manager.

Its there an edit I can make to move it, or just turn it off ?

Link to comment
Share on other sites

I'm guessing your resolution has a screen width less than 1600.

Unfortunately unless you can increase your screen resolution there is nothing you can do just yet.

In the next update the Launch Site selector button will be smaller and moved out of the way of MechJeb and SubAssembly Loader. :)

Link to comment
Share on other sites

Alittle help here, my kerbal cant walk on my launch pad, it has convex colliders btw.

I have a collision problem with Kerbals too. Although I am not using "convex". I think it's due to the size of polys they're giant, I'll try reducing the size.

Link to comment
Share on other sites

I have a collision problem with Kerbals too. Although I am not using "convex". I think it's due to the size of polys they're giant, I'll try reducing the size.

The further away a Kerbal get from a meshes origin the more collider issues there will be. The easy way to fix that is use smaller meshes.

@rasheed: you dont have to use convex colliders for static objects.

Link to comment
Share on other sites

I just updated my runway to deal with the bouncy issue too. It seems more than 200m in one collider is a problem. Split the mesh or the collider into smaller chunks of 100-200m and it's fine.

Link to comment
Share on other sites

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