Page 5 of 6

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Thu May 09, 2013 5:31 pm
by cim
System Features: Rings is now updated to 1.1 with a much more effective ring texture provided by ZygoUgo. Download links in the first post have been updated.

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Thu May 09, 2013 6:11 pm
by Cody
Cool!

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Fri May 10, 2013 1:07 am
by Diziet Sma
Cody wrote:
Cool!
Seconded!

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Sat May 11, 2013 9:34 am
by Commander McLane
Got this in the log:

Code: Select all

  11:31:33.095 [shader.compile.failure]: ***** ERROR: GLSL fragment shader compilation failed for systemfeatures-sunspot.fragment:
>>>>> GLSL log:
ERROR: 0:33: 'assign' :  cannot convert from 'const int' to 'float'
ERROR: 0:53: 'switch' : Reserved word. 
ERROR: 0:53: 'switch' : syntax error syntax error


11:31:33.095 [shader.load.fullModeFailed]: ----- WARNING: Could not build shader systemfeatures-sunspot.vertex/systemfeatures-sunspot.fragment in full complexity mode, trying simple mode.
  11:31:33.096 [shader.compile.failure]: ***** ERROR: GLSL fragment shader compilation failed for systemfeatures-sunspot.fragment:
>>>>> GLSL log:
ERROR: 0:33: 'assign' :  cannot convert from 'const int' to 'float'
ERROR: 0:53: 'switch' : Reserved word. 
ERROR: 0:53: 'switch' : syntax error syntax error


11:31:33.097 [shader.load.failed]: ***** ERROR: Could not build shader systemfeatures-sunspot.vertex/systemfeatures-sunspot.fragment.
  11:31:33.191 [shader.compile.failure]: ***** ERROR: GLSL fragment shader compilation failed for systemfeatures-sunspot.fragment:
>>>>> GLSL log:
ERROR: 0:33: 'assign' :  cannot convert from 'const int' to 'float'
ERROR: 0:53: 'switch' : Reserved word. 
ERROR: 0:53: 'switch' : syntax error syntax error


11:31:33.191 [shader.load.fullModeFailed]: ----- WARNING: Could not build shader systemfeatures-sunspot.vertex/systemfeatures-sunspot.fragment in full complexity mode, trying simple mode.
  11:31:33.192 [shader.compile.failure]: ***** ERROR: GLSL fragment shader compilation failed for systemfeatures-sunspot.fragment:
>>>>> GLSL log:
ERROR: 0:33: 'assign' :  cannot convert from 'const int' to 'float'
ERROR: 0:53: 'switch' : Reserved word. 
ERROR: 0:53: 'switch' : syntax error syntax error


11:31:33.192 [shader.load.failed]: ***** ERROR: Could not build shader systemfeatures-sunspot.vertex/systemfeatures-sunspot.fragment.

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Sat May 11, 2013 10:22 am
by Eric Walch
No problems on my MacBook

Code: Select all

12:07:56.195 [rendering.opengl.version]: OpenGL renderer version: 2.1.0 ("2.1 NVIDIA-8.10.44 304.10.65f03"). Vendor: "NVIDIA Corporation". Renderer: "NVIDIA GeForce 320M OpenGL Engine".
Correction. McLain's log is about the old sun spots oxp and not about the new ring release. (I never installed the sunspots)

The ring looks great, less dense than the previous one.

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Sat May 11, 2013 10:35 am
by Commander McLane
Eric Walch wrote:
Correction. McLain's log is about the old sun spots oxp and not about the new ring release. (I never installed the sunspots)
Yep. I only now downloaded the sunspots, together with the new rings.

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Sat May 11, 2013 5:04 pm
by cim
Commander McLane wrote:
Got this in the log:
Thanks for the report. Sunspots 1.4 is now released to fix this.

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Thu Jun 20, 2013 3:26 pm
by Switeck
I was wanting to create a large Saturn-like gas giant planet in every other system (I'll reduce probability later), but I can't seem to work out the logic to do so.

Code snippet time again:

Code: Select all

if( (system.ID & 1) == 0) {
	GasGiantJ = system.addPlanet("GasGiantJ");
	GasGiantJ.isGasGiant = true;
	GasGiantJ.solarGasGiant = true;
	GasGiantJ.orientation = system.mainPlanet.orientation;
	var ring = system.addVisualEffect("systemfeatures-rings", GasGiantJ.position);
	ring.position = GasGiantJ.position;
	ring.orientation = GasGiantJ.orientation;
	ring.orientation = ring.orientation.rotate(ring.orientation.vectorRight(),Math.PI/2);
}
The gas giant planet is created, placed in the spot I want it to be (via planetinfo.plist ), and rings are added...but the rings are around the main planet instead of the gas giant.

I'm utterly clueless yet again. :?

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Thu Jun 20, 2013 3:41 pm
by cim
Switeck wrote:
I was wanting to create a large Saturn-like gas giant planet in every other system (I'll reduce probability later), but I can't seem to work out the logic to do so.

Code snippet time again:

Code: Select all

if( (system.ID & 1) == 0) {
	GasGiantJ = system.addPlanet("GasGiantJ");
	GasGiantJ.isGasGiant = true;
	GasGiantJ.solarGasGiant = true;
	GasGiantJ.orientation = system.mainPlanet.orientation;
	var ring = system.addVisualEffect("systemfeatures-rings", GasGiantJ.position);
	ring.position = GasGiantJ.position;
	ring.orientation = GasGiantJ.orientation;
	ring.orientation = ring.orientation.rotate(ring.orientation.vectorRight(),Math.PI/2);
}
The gas giant planet is created, placed in the spot I want it to be (via planetinfo.plist ), and rings are added...but the rings are around the main planet instead of the gas giant.

I'm utterly clueless yet again. :?
Probably you want to edit the effectSpawned event handler in the rings script so that it doesn't put it back around the main planet.

(You'll then probably also need to edit the script a bit more so that it uses the gas giant, not the main planet, as the reference for visibility and shadowing tests. I can't remember offhand if you'll need to edit just the script or the fragment shader as well)

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Thu Jun 20, 2013 4:43 pm
by Switeck
While I can't say yet if the fragment shader needs editing as well, I can definitely say I need to edit the effectSpawned event handler in the rings script so that it doesn't put it back around the main planet.
I tried creating my own .js code sections that do the effectSpawned event handler in my OXP instead of modifying the original one/s, but of course that didn't work...it was fighting with the original script over where the rings should be. Main planet won.

Extending this Ring OXP to support additional planets in System Redux-type OXPs is proving somewhat hard. I'm not even sure there can be more than 1 ringed planet in a system. Lots of video cards won't like it in any case. :lol:

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Thu Jun 20, 2013 4:55 pm
by cim
Switeck wrote:
Extending this Ring OXP to support additional planets in System Redux-type OXPs is proving somewhat hard. I'm not even sure there can be more than 1 ringed planet in a system. Lots of video cards won't like it in any case. :lol:
Yeah, they're expensive graphics-wise, at least by Oolite standards. If you wanted more than one you'd need to put some variables in the effect script, so that effectSpawned could know which planet to target, and then set those variables as you add the rings objects.

Note that as currently written the rings have to be in the equatorial plane of the planet, and the centre of the sun also has to be on that plane. That's always the case for the main planet, but will need work to be true for additional planets.

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Thu Jun 20, 2013 5:43 pm
by Switeck
Ok, I got it working...rings are now around the gas giant!
I replaced "system.mainPlanet." with "GasGiantJ." in the systemfeatures-ring.js script.
GasGiantJ should already be oriented the same as the main planet and my planetinfo.plist should be placing it in the equatorial plane of the system at:
position = "spm 800000 0 3000000";
...so the rings should line up nicely. If the tilt's a little off, it'd probably just be more realistic.

The method I used places rings either around this particular gas giant (if it's even added) or around the main planet...but not both.
With effort, it looks like I could redo my code changes so it can do both...but as pointed out the graphical load would be considerable.

There may still be some shader issues with the rings -- the planet's shadow is in the right place but the other parts of the rings seem "dimmer" if more distant from my ship even if that side is closer to the sun, but that's possibly due to my video card.

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Fri Jun 21, 2013 11:33 am
by Duggan
Ok, I got it working...rings are now around the gas giant!
I replaced "system.mainPlanet." with "GasGiantJ." in the systemfeatures-ring.js script.
Hello Switeck,

Is the above all I need do in order to relocate rings to the Gas Giants in System redux ? I have replaced all occurences of the text "system.mainPlanet." with "GasGiantJ." in both j script files within the oxp ,as far as I understood your guidance.

Is there anything else I need to do (e.g, adjust populater values....is if I would have the first idea how to do that :) ) as I have not encountered any ringed Gas Giants in System Redux as yet.

Any help and advice would be greatfully recieved. Thank you.


edit, ah, I see this is perhaps a little more complex than first I thought :)

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Fri Jun 21, 2013 3:10 pm
by Switeck
GasGiantJ was just the created variable name for the planet my code added:
GasGiantJ = system.addPlanet("GasGiantJ");
This also includes GasGiantJ reference in planetinfo.plist, which is what addPlanet("GasGiantJ") pulls its info from.

I used the arbitrarily-created name GasGiantJ because I deemed it unlikely to conflict with existing variable names and assignments (such as .isGasGiant).

Oolite has to retain the gas giant's info in memory as a variable to make it "easy" to give it rings.
You also have to tell Oolite that the large planet is in fact a gas giant, though I'm not sure if both these 2 lines are needed to do so:
GasGiantJ.isGasGiant = true;
GasGiantJ.solarGasGiant = true;

Re: [RELEASE] System Features: Sunspots and Rings OXPs

Posted: Fri Jun 21, 2013 7:26 pm
by Duggan
Thank you for your kindness Switeck,

Am I to follow these instructions within the System Redux oxp or do I have to go into the innards of the game itself?

Please Forgive my density, I am naturally quiet loath to start altering,adding to code without being certain of what I am doing, having said that , I would quiet like to see planetary rings around one of the larger extra planets in system redux. say every 4th or 5th system I visited.

If this is doable, I think it would further add to the immersion of the game, personally speaking.

Thanks again Duggan.