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?
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.
@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.
@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.
That said, I do plan to release these modifications if cim finds them interesting. I am just waiting for his answer, as well as trying to figure out the ring transparency and draw distance issues.
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.
I don't think you can do much about the drawing distance. To my understanding it's a built-in limitation.
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.
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.
Yes, that's a great idea. If I manage to find a solution for this transparency issue then this could be a possible solution
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 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.
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 .