Screenshots
Moderators: winston, another_commander
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Screenshots
Messing around with the System Features Rings OXP, trying to get more variety in ring size, thickness, allowing large planets also to NOT have rings, etc.:
Questions:
- does anyone know why the rings disappear after a certain distance (around 2.7 OU). This is particularly noticeable for people using distant suns, extra planets and/or torus to sun oxp's.
- if the rings could be set to 0.7-0.8 opacity they probably would look much better, but I found no way of having semi-transparent objects in Oolite. Is that possible, and if so is this documented somewhere?
Questions:
- does anyone know why the rings disappear after a certain distance (around 2.7 OU). This is particularly noticeable for people using distant suns, extra planets and/or torus to sun oxp's.
- if the rings could be set to 0.7-0.8 opacity they probably would look much better, but I found no way of having semi-transparent objects in Oolite. Is that possible, and if so is this documented somewhere?
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Screenshots
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: Screenshots
Check also the atmosphere shaders in the current trunk builds. Atmospheres fade out if you are too close or too far from the planet and this is done by adjusting the alpha of the atmosphere drawable entity.
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Screenshots
Thanks guys, I will check it out and see if I manage to solve the issues.
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Screenshots
@another_commander if I understand correctly the atmosphere shader, you are basically using a variable named newOpacity to control opacity, ranging between 0.0 and 1.0. This variable is then used together with a vector of 3 elements to give the final 4 element vector gl_FragColor = vec4(totalColor, newOpacity); is that correct? If so, then I don't get why I am running into troubles because I tried something very similar: in the end of the fragment shader's code used by the Rings OXP, after all calculations for each of the three RGB components is done, we have gl_FragColor = vec4(r,g,b,1.0);. Changing r g and b does change the colour of the rings, but changing the last value to something lower than 1.0 does NOT change the opacity of the rings. Is there something else I need to check for this to work?
@Norby as for the Flying Dutchman OXP, that work does not use half-transparency, it uses either full transparency or full opacity.
@Norby as for the Flying Dutchman OXP, that work does not use half-transparency, it uses either full transparency or full opacity.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Screenshots
I have an extra line in the atmosphere shader - Does that provide a clue, or am I missing the point?
newOpacity *= 0.6;
and adjust the 0.6
to my taste, inserted thus:Code: Select all
float dp = abs(dot(nvEyeVector, vec3(0.0,0.0,1.0)));
if (dp > 0.16) {
newOpacity = min(1.0, pow(0.16/dp,2.0)) * quant;
}
else
{
newOpacity = pow(dp/0.16,5.0) * quant;
}
newOpacity *= 0.6;
}
gl_FragColor = vec4(totalColor, newOpacity);
}
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Screenshots
@Cody Thanks but unfortunately I don't think that helps either. You are simply multiplying the opacity value by a constant as to get more transparency, but the point is that the effect is working so that's why you can scale it with that multiplication. The issue with the ring's shader is that no matter what I use as the 4th input to of gl_FragColor, e.g. gl_FragColor = vec4(r,g,b,0.2);, I always get full opacity, as if the last component was a 1.0.
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Screenshots
Managed to apply ambient light to the rings:
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Screenshots
Awesome! Is this an easy-to-apply tweak?gsagostinho wrote:Managed to apply ambient light to the rings:
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Screenshots
It actually is. The last statement in systemfeatures-rings.fragment is
Code: Select all
gl_FragColor = vec4(r,g,b,1.0);
Code: Select all
vec3 diffuseColor = gl_LightSource[1].diffuse.rgb; // Diffuse light
vec3 totalColor = vec3(0);
totalColor += vec3(r,g,b) * diffuseColor;
gl_FragColor = vec4(totalColor, 1.0);
Re: Screenshots
I don't think you can do much about the drawing distance. To my understanding it's a built-in limitation.
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Screenshots
Just an idea against the sudden appearance when you enter into the distance limit: start at full transparency and reduce slowly to the final opacity when you come closer.
- gsagostinho
- ---- E L I T E ----
- Posts: 573
- Joined: Sun Jul 19, 2015 1:09 pm
Re: Screenshots
Yes, I am also afraid that will be the case. But that said, I have the impression that certain objects are visible much further away. I have to test this, but I have the impression that those solar stations from WildShips can be spotted much further away than that (even with the Distant Suns OXP, you can see their silhouette against the sun). But perhaps I am wrong and the stations aren't that far away. If that's the case, then nothing to be done.spara wrote:I don't think you can do much about the drawing distance. To my understanding it's a built-in limitation.
Yes, that's a great idea. If I manage to find a solution for this transparency issue then this could be a possible solutionNorby wrote:Just an idea against the sudden appearance when you enter into the distance limit: start at full transparency and reduce slowly to the final opacity when you come closer.
Re: Screenshots
Wow this is a great improvement over the older rings!
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: Screenshots
I guess one of the issues you're facing in not being able to use the alpha component of the colour is that the material for rings doesn't consider alpha.gsagostinho wrote:Yes, that's a great idea. If I manage to find a solution for this transparency issue then this could be a possible solution
I am not sure how/where is the rings material spawned from, although I've been trying to tweak the rings a while ago (with an attempt to get rid of these Moire patterns) -- I left that at an "in-work" status .