Page 6 of 32

Posted: Sun Oct 14, 2007 2:32 am
by Griff
Awesome stuff A_H! I spent ages trying to draw something like that and just gave up in the end, but that animation you uploaded is exactly what i was trying to do! thanks so much for uploading it, i've added it to the spacebar.oxp and uploaded it all here:-
Edit2: updated the .oxp to include Ahrumans fix for the .plist that stopped the neon sign animating, fixed the problem with solar panel flickering horribly, changed the docking bay shader to stop it inheriting romantic mood lighting from the system sun and remembered to flip the UV's on one side of the neon sign so it looked correct from the front & back!
http://www.box.net/shared/85jm82oz5r

i *think* the non-animated-ness of the A_H neon sign at the moment is something to do with a bug that Ahruman has already fixed in his current work in progess build of Oolite - something about sub-entities not inheriting shader bindings if i remember correctly although i can't find the post where he worked it out, i think it was the griff_boa one where i was moaning that the engines weren't glowing.
How are you getting on with rendermonkey A_H? you seem to be getting the jist of this glsl lark pretty damn fast!
edit: uh, just realised that the oxp i uploaded might change most of the coriolis stations into spacebars instead of what they should be, um.. best to treat it as an experimental oxp!

Posted: Sun Oct 14, 2007 6:48 am
by Dr. Nil
A lot of good work and interesting experiments being done here.

Perhaps one day we'll see random ads in the main stations' docking bays. :D

Btw: I have a couple of brand logos and decals from some OXPs in higher resolution than released. Perhaps there could be a sticky thread for logos and decals somewhere?

Posted: Sun Oct 14, 2007 9:09 am
by JensAyton
I’m not entirely sure why the sign isn’t animating, even in the current development version. It shouldn’t be a subentity issue. Hmm.

I’m not entirely certain what your intention is with the docking bay shader, but what you’re getting is completely flat illumination tinted towards the sun’s colour. Maybe the operators of the bar use different-coloured light bulbs in different systems to fit the local ambience? :-)

Posted: Sun Oct 14, 2007 9:50 am
by JensAyton
Aha! You’ve got the uniform declarations in the wrong place. This:

Code: Select all

	shaders = 
		{ 
            "A_H_wormhole_animation.png" = 
			{ 
                vertex_shader = "griff_spacebar_Arexack_Heretic_Neon_sign.vertex"; 
                fragment_shader = "griff_spacebar_Arexack_Heretic_Neon_sign.fragment"; 
             
                textures = ("A_H_wormhole_animation.png");           
			}; 
		}; 
	uniforms =
		{
			uTime = "timeElapsedSinceSpawn";
			uTimeOffset = "entityPersonality";
		};
	};	
should be:

Code: Select all

    shaders =
    {
        "A_H_wormhole_animation.png" =
        {
            vertex_shader = "griff_spacebar_Arexack_Heretic_Neon_sign.vertex";
            fragment_shader = "griff_spacebar_Arexack_Heretic_Neon_sign.fragment";
            
            textures = ("A_H_wormhole_animation.png");
            uniforms =
            {
                uTime = "timeElapsedSinceSpawn";
            };
        };
    };
(The uTimeOffset binding has no effect, since it’s not used in the shaders.)

Another problem you have is z-fighting. Look at the solar panel in this pic:
Image
(Hmm, looks like something out of Day of the Tentacle.)

You can see part of the underlying wall through the panel. In animation, it flickers annoyingly. This happens when you have two parallel surfaces close together. The only reasonable fix is to not have two parallel surfaces close together, i.e. to have a solar panel-shaped hole in the wall under it.

Posted: Sun Oct 14, 2007 10:27 am
by Captain Hesperus
Dr. Nil wrote:
A lot of good work and interesting experiments being done here.

Perhaps one day we'll see random ads in the main stations' docking bays. :D

Btw: I have a couple of brand logos and decals from some OXPs in higher resolution than released. Perhaps there could be a sticky thread for logos and decals somewhere?
Do I see the basis for a corporate.oxp? Main stations with company logos and 'armadas' of advertising ships assailing the unsuspecting commander with offers and requests to buy the newest, latest, most expensive new kit for their ship? I can almost see the WP-planet spacelane with Terascreens every 10km advertising all manner of services and products....

Captain Hesperus

Posted: Sun Oct 14, 2007 11:21 am
by Dr. Nil
Captain Hesperus wrote:

Do I see the basis for a corporate.oxp? Main stations with company logos and 'armadas' of advertising ships assailing the unsuspecting commander with offers and requests to buy the newest, latest, most expensive new kit for their ship? I can almost see the WP-planet spacelane with Terascreens every 10km advertising all manner of services and products....

Captain Hesperus
I think that's how Your Ad Here got started. Somebody mentioned the idea of a corporate.oxp with billboards in the commies or dictators thread or a general thread on flavour expansions and I decided to give up sleep for some weeks ;)

Posted: Sun Oct 14, 2007 11:45 am
by Captain Hesperus
Dr. Nil wrote:
I think that's how Your Ad Here got started. Somebody mentioned the idea of a corporate.oxp with billboards in the commies or dictators thread or a general thread on flavour expansions and I decided to give up sleep for some weeks ;)
Oh yeah! It was wasn't it.

Sorry.

Captain Hesperus
...The biggest cause of lost sleep since Reidquatian Ultra.

Posted: Sun Oct 14, 2007 12:15 pm
by Dr. Nil
Captain Hesperus wrote:
Captain Hesperus
...The biggest cause of lost sleep since Reidquatian Ultra.
Yeah Reidquatian Ultras can be scary

Image

Posted: Sun Oct 14, 2007 12:23 pm
by Captain Hesperus
<head explodes>

....And now for something completely different.

Captain Hesperus

Posted: Sun Oct 14, 2007 2:07 pm
by Arexack_Heretic
@Griff:

Glad you like it. I just uploaded a simplified gif though, at home I have the seperate layerfiles and different (more) animiation stages.
Where the wormhole pulsates more and there is a pause between the flash and the next cycle of ship approaching.
(The ship is rather exiting- entering the wormhole, in essence biting it's own tail, than orbitting like you proposed)

I'll optimise the sequence and paste them together to use Ahruman's simple shader (but with more stages).
I'm think I'll try to disable the seethrough aspect of it though.
I'd like to use just additive blending instead, so that I can use the unlighted background + shiny animations.
If I can't get it to work like that, I might have to resort to 2 seperate objects, but I'm not sure how the 'fuzzyness' of the glow will work with the <0.5 brightness cuttoff in ahruman's simple-animation shader.
I'll have to try it out some...
You are rather more experiencedd than me in shaders/java-scripting, so I may end up just sending you the image-files instead.

Do I need to add the dive's name to the anim?
'-W- -O- -R- -M- -H- -O- -L- -E -WORMHOLE- - - -WORMHOLE-


Edit:
I actually didn't do any shader-editing for this sign yet, just nmade the sign in PShop and made it animatedgif in that other programm.
Hadn't got rendermonkey to do anything but crash to desktop yet. :(


Next idea: the 'ESCAPE'
animation ship exploding, by thargoid?/viper, then escapepod apearing and getting larger.

Posted: Sun Oct 14, 2007 5:25 pm
by Griff
thanks Ahruman for fixing the bug in the shaders part of the .plist, that was me carelessly copying & pasting from another .oxp, i didn't even notice that uTimeOffset wasn't in any of the shaders.

hmm, about the docking bay shader - well i don't know what i'm doing there myself, i just started with one of your griff_krait shaders and began deleting stuff out of it until all the specularity effects and error messages stopped appearing! i didn't even realise it was inheriting colour from Light1 - i suppose this is going to be a problem with all the floodlights on the outside of the building too as they are using the same glow technique by adding the alpha channel texture to the diffuse.

anyway, i've changed the dockingbay shader to this now - something very similar to your animated neon shader but without the animated part!

Code: Select all

// Information from Oolite.
uniform sampler2D      tex0; // Difuse map

void main(void)
{
   
   // Load texture data
   vec2 texCoord = gl_TexCoord[0].st;
   vec4 colorMap = texture2D(tex0, texCoord);
   
   vec4 color = colorMap;
   gl_FragColor = vec4(color.rgb, 1.0);
}
Not sure what to do about the sloar panel, i mean because the station rotates at a terrifying speed the solar panel doesn't even point at the sun most of the time! how would it generate electricity? the lights on the station would be flickering on & off like the strobes at some illegal rave.

A_H
rendermonkey can be a massive pain to get working, i think it's fussy about you having the latest directX installed, which is maddening because we only want to use the OpenGl part! Nvidia have a shader development program too http://developer.nvidia.com/object/fx_c ... _home.html i've not used it myself though.
I would be cool to have a sign spelling out the WORMHOLE BAR name, there's that big pole sticking out of the side of the hut that should probably have some sort of sign on it.

Looking forward to seeing more of your animations! I'll try and merge Ahrumans specularity shader code from some of his other shaders into the animated neon shader so we can have neon signs like you've suggested

Dr.Nil, Random adds would be great! i suppose you could put a load of adds into a texture file a bit like the one Ahruman posted above in the decal shader example and have a shader pick a frame from it based on some random value or the game clock or something.

I could have sworn there was a thread by Aegidian somewhere here in the past where he gave the example of random subentities? somebody was making a spacedock? (might have been the tionisla orbital graveyard) but i can't find it anywhere now - does anybody remember this? random subentities would be great - you could change the neon signs or put different spaceships/crates etc on the spacebar launching strip thing.

Posted: Sun Oct 14, 2007 6:33 pm
by Arexack_Heretic
random subents:
It was me that started demanding randomized subentity placement/selection, for use in a too ambitious shipyard project.
It was about the same time as Tionisla.

The solution suggested by Aegidian did not do random subentities though, but rather used the multiple shipdata entries mechanism as in the second gen Behemoths.


-wormhole anim:
I think these neon signs I made would look best on a solid surface or maybe on top of a semi see-through latticework.

I forgot to say (up there) that the neon-glow should use a combination of the animation and the permanent glow-map shaders, on top of a background difuse layer (the unlit or combined with the proposed lattice)
(I could combine the unlit with the glow-animations, like in this example gif, but I'd prefer to use it as a seperate tex.)


I'll send you my best effort of the wormhole animation.
(need to: -change sequence to be better,
-add dim parts on white-bang where the other neontubes intersect it,
-add Text animation (I think galactica fonts),
-create lattice-girders tex for free, not wall-attached neon)

Expect it sometime next week.

Posted: Mon Oct 15, 2007 9:44 pm
by JensAyton
Another (non-shader) problem with the space bar:
Image
The origin in the 3D models matters. It’s treated as the centre for rotation and, as here, for target reticule display.

Posted: Tue Oct 16, 2007 11:30 am
by TGHC
Perhaps the reticule has locked on to the outside toilet.

laser fire should be banned when it is occupied :twisted:

Posted: Tue Oct 16, 2007 11:57 am
by ovvldc
TGHC wrote:
Perhaps the reticule has locked on to the outside toilet.
If it is normally aiming for the tailpipe, the lock would be quite good..