Page 65 of 138
Re: Progress
Posted: Wed Aug 22, 2012 7:50 pm
by Switeck
cim wrote:Svengali wrote:A few scriptable and bindable 'user' properties would be a dream. I'm often using energy, fuel or lightsActive to control shaders or pass infos. This reduces the need to switch them.
Makes sense. How many do you think would be sensible? I'm thinking two floats, two ints, and two vec4s should be enough in general, plus make hullHeatLevel configurable to simplify use of the default shader.
NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety.
Re: Progress
Posted: Wed Aug 22, 2012 8:01 pm
by cim
Switeck wrote:NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety.
Should be fairly straightforward with visual effects - just create one at the ship's current position (or thereabouts), with appropriate shader parameters. Reminds me that I was going to add a
scale(f)
method to resize visual effects, though.
Adding that sort of dynamic rewriting of the shader program itself, though... that would be extremely difficult.
Re: Progress
Posted: Wed Aug 22, 2012 8:14 pm
by Commander McLane
cim wrote:Switeck wrote:NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety.
Should be fairly straightforward with visual effects - just create one at the ship's current position (or thereabouts), with appropriate shader parameters. Reminds me that I was going to add a
scale(f)
method to resize visual effects, though.
That would be lovely. I was originally experimenting with flashers in order to create a shield orb around the ship. But this never went anywhere. Using the hull temperature for as visual effect is really only a limited workaround, for instance it doesn't allow for another colour. So I would gladly replace it with a visual effect. Scalability would be great too, of course, because the effect should be proportional to the ship's size.
Re: Progress
Posted: Wed Aug 22, 2012 9:02 pm
by Svengali
cim wrote:Makes sense. How many do you think would be sensible? I'm thinking two floats, two ints, and two vec4s should be enough in general, plus make hullHeatLevel configurable to simplify use of the default shader.
Yes, that sounds like a plan .-)
Re: Progress
Posted: Wed Aug 22, 2012 11:51 pm
by Tricky
cim wrote:Switeck wrote:NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety.
Should be fairly straightforward with visual effects - just create one at the ship's current position (or thereabouts), with appropriate shader parameters. Reminds me that I was going to add a
scale(f)
method to resize visual effects, though.
Adding that sort of dynamic rewriting of the shader program itself, though... that would be extremely difficult.
Would that allow something like this...
an improved Langston Field which expands as it absorbs energy, increasing its surface area and dissipating heat faster.
-- The Mote in God's Eye.
Re: Progress
Posted: Thu Aug 23, 2012 9:49 am
by Svengali
Tricky wrote:cim wrote:Reminds me that I was going to add a scale(f)
method to resize visual effects, though.
Adding that sort of dynamic rewriting of the shader program itself, though... that would be extremely difficult.
Would that allow something like this...
an improved Langston Field which expands as it absorbs energy, increasing its surface area and dissipating heat faster.
-- The Mote in God's Eye.
The difficult part is not the scaling in shaders - it's the blending.
Re: Progress
Posted: Mon Aug 27, 2012 3:53 pm
by CommonSenseOTB
Code: Select all
Revision 5223 - Directory Listing
Modified Thu Aug 23 19:46:23 2012 UTC (3 days, 19 hours ago) by cim
Some new ship JS properties
ship.currentWeapon
ship.weaponPosition*
Thank you kindly cim!
Commander McLane wrote:cim wrote:Switeck wrote:NPC Shields OXP jacks the npc's ship heat levels to 0.99 to simulate the flash of the shield absorbing a laser (or missile) hit. It might be better if it could instead create a flash directly via scriptable shaders changes. Then, npc ships could even have different color shields for variety.
Should be fairly straightforward with visual effects - just create one at the ship's current position (or thereabouts), with appropriate shader parameters. Reminds me that I was going to add a
scale(f)
method to resize visual effects, though.
That would be lovely. I was originally experimenting with flashers in order to create a shield orb around the ship. But this never went anywhere. Using the hull temperature for as visual effect is really only a limited workaround, for instance it doesn't allow for another colour. So I would gladly replace it with a visual effect. Scalability would be great too, of course, because the effect should be proportional to the ship's size.
I've been testing and tweaking a shield flashers prototype for the last couple of weeks. For
1.76+. Wait till you see it...
Re: Progress
Posted: Mon Aug 27, 2012 5:21 pm
by CommonSenseOTB
I would also like player.ship or this.ship.maxPitch/this.ship.maxRoll/this.ship.maxYaw to be implemented as a read only property. I have an oxp that I'm writing that could use this instead of the clumsy player calibration that I'm using now.
If possible, thanks in advance and great work all of you.
Re: Progress
Posted: Mon Aug 27, 2012 5:28 pm
by cim
Well, I suppose you can have those.
Code: Select all
r5190: [...] Add ship.max(Pitch|Roll|Yaw) properties [...]
Re: Progress
Posted: Tue Aug 28, 2012 3:41 pm
by Wildeblood
cim wrote:A new type of entity for trunk: Visual Effects
...Additionally, properties have been added to the Station and System JS classes to allow the usual break patterns to be suppressed...
How's it done?
Example code, please.
Re: Progress
Posted: Tue Aug 28, 2012 4:03 pm
by cim
Break pattern suppression
Code: Select all
station.breakPattern = false;
system.breakPattern = false; // must be called in shipWillExitWitchspace to be useful
I'll release a sample OXP for visual effects soon.
Re: Progress
Posted: Tue Aug 28, 2012 4:52 pm
by Smivs
cim wrote:Break pattern suppression
Code: Select all
station.breakPattern = false;
system.breakPattern = false; // must be called in shipWillExitWitchspace to be useful
I'll release a sample OXP for visual effects soon.
<Smivs waits eagerly>
Re: Progress
Posted: Tue Aug 28, 2012 7:52 pm
by cim
Okay, quick demo OXP.
VisualEffect Demo: Sunspots
The shader is not finished, but it's not the shader you're interested in. There are a few hints in the readme.txt for other possibilities. (And the Wiki is up-to-date with documentation, of course)
Re: Progress
Posted: Wed Aug 29, 2012 10:33 pm
by Rese249er
cim wrote:Experimentally, I've changed the system populator so that all systems have at least one rock hermit. If there wasn't one generated on the normal spacelanes, there will be one added to a semi-random point in space quite some distance from the spacelanes.
Not sure if this has happened to anyone else, but whilst tooling about G1, Ususor, a Poor Agro Feudal system with TL2, I came upon TWO Rock Hermits within scan range of each other. I just had to stop and scratch my head... I've got the game paused looking at these Hermits while posting this.
Re: Progress
Posted: Wed Aug 29, 2012 10:35 pm
by Smivs
Yeah, I've seen that once or twice. I quite like that it happens.