Page 2 of 2
Posted: Mon May 17, 2010 6:00 pm
by Thargoid
Killer Wolf wrote:my Nuit was designed as dock for huge vessels. i was thinking it could be used by NPCs is someone wrote a clever script to get something big to "dock" at the docking struts. lately i was trying to work out how to do it for a player, and thought i could model a dock box and place it at the end of the strut, but make it transparent, so you'd move into position and then go through the docking sequence. but, transparency's not gonna happen in Oolite, so that's the end of that idea!
Proximity docking (using a docking radius that's wider than the model) is your friend there.
Take a look at Lave Academy, see any dock boxes there? In that case the radius is within the model, but it's within the central tube (it's roughly where the flasher glow is). It's also how Planetfall works.
Or the other way is to get a little clever with the scripting and use the dockPlayer function.
Posted: Tue May 18, 2010 12:41 am
by ADCK
Complete (100%) transparency is possible in oolite, Your Ad Here uses complete transparency on the animated signs above the stations.
Partial transparency however, is not possible at this time (and perhaps never will be possible), atlhough it can be faked several ways, such as dithering, deinterlacing, animation, or as suggested in another thread- by using frozen flasher subentities (not yet available)
But getting something that is anywhere between 1% and 99% transparent using standard methods such as the alpha channel does not work.
It is odd that it isn't available for us to use, as partial transpaency already exists in game (flashers and exhaust trails use it) so obviously the code exists in game already, it's just that we're locked out from using it.
Posted: Tue May 18, 2010 9:15 am
by Killer Wolf
Cheers Thargoing, i'll have a skeg at that, assuming you can determine where the origin of the dock area is that might work pretty well.
what would really add to it is if it could be scripted to have big NPC ships pull up to that position occasionally, but i'm not sure you can direct NPCs to specific co-ordinates?
Posted: Tue May 18, 2010 9:21 am
by Svengali
Killer Wolf wrote:what would really add to it is if it could be scripted to have big NPC ships pull up to that position occasionally, but i'm not sure you can direct NPCs to specific co-ordinates?
Sure, you can. savedCoordinates is your friend .-)
Posted: Tue May 18, 2010 11:12 am
by Thargoid
Killer Wolf wrote:Cheers Thargoing, i'll have a skeg at that, assuming you can determine where the origin of the dock area is that might work pretty well.
what would really add to it is if it could be scripted to have big NPC ships pull up to that position occasionally, but i'm not sure you can direct NPCs to specific co-ordinates?
I wasn't planning on going anywhere
As Svengali says, getting NPCs to go to a position isn't tough. The problem is making sure the collision detection is right so they get close enough to look correct without getting so close that they trigger it and crash.
Posted: Tue May 18, 2010 1:22 pm
by JensAyton
Um, what?
ADCK wrote:It is odd that it isn't available for us to use, as partial transpaency already exists in game (flashers and exhaust trails use it) so obviously the code exists in game already, it's just that we're locked out from using it.
I’m sorry, but you don’t know what you’re talking about.
The fact that some special-case objects in the game can use transparency without breaking anything does not in any way imply that it could simply be turned on for general meshes. And as it happens, the
only¹ objects in the game that use “normal” alpha blending are planet atmospheres, which have a known convex shape and are assumed not to intersect. All other transparent objects in the game use additive blending, which is order-indepenent but can’t obscure underlying objects.
¹ Not counting HUD elements or text, which are always on top.
Posted: Tue May 18, 2010 5:20 pm
by Killer Wolf
Thargoid wrote:Killer Wolf wrote:Cheers Thargoing, i'll have a skeg at that, assuming you can determine where the origin of the dock area is that might work pretty well.
what would really add to it is if it could be scripted to have big NPC ships pull up to that position occasionally, but i'm not sure you can direct NPCs to specific co-ordinates?
I wasn't planning on going anywhere
As Svengali says, getting NPCs to go to a position isn't tough. The problem is making sure the collision detection is right so they get close enough to look correct without getting so close that they trigger it and crash.
lol, oops! what an odd typo that was :-/
it sames that oolite collision is a real bugbear. i'm not sure how it works or how it could be improved, but for an NPC could you get it to fly to a close position then NULL AI the ship and respawn it in the precise docking position? you'd need to be able to specify positions relative to the model i guess.
failing that, would it be an idea to have a "collision detection" True/False option in shipdata so that an NPC wouldn't trigger a death action?
Posted: Tue May 18, 2010 5:24 pm
by Thargoid
Not easily - you'd have to remove both the ship and the station and then respawn a new entity (probably the station) that has the ship as a subEnt.
You can remove sub-ents from ships and replace them with free-flying versions of themselves (as done in the HammerHead plus various other things like Eric's buoy towing ship from Buoy Repair) but doing it the other way around (adding a sub-ent) is currently impossible.
Posted: Wed May 19, 2010 2:14 am
by ADCK
Oh, guess I should of explain it as it's an idea i recently had, it's basically the same as my earlier dithering transparency trick, but instead of having a checkerboard pattern of fully transparent pixels, you have a pattern of every-other-line being transparent. (one line 100% alpha'd, next not alphad)
Eg:
At high resolutions you wont see the lines, but will be able to see 50% of the texture behind it, and it wont distort as much as my earlier dithering technique.
I guess "deinterlacing" (perhaps interlacing, as of instead of adding another line to every line, it's removing it? or maybe i could break the english language and call it de-deinterlacing
) isn't the exact word to use here, but similar concept... I suppose I could name it "every-other-line-transparency" but thats too wordy.
Posted: Wed May 19, 2010 6:54 am
by Diziet Sma
Hmm.. dunno how it would go in game, but when I scroll that image up or down, I get a very flickery effect on my LCD monitor..