Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

plannets.oxp - is it still working?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

ovvldc
---- E L I T E ----
---- E L I T E ----
Posts: 344
Joined: Sat Apr 02, 2005 9:32 am
Location: Netherlands

Post by ovvldc »

Are you sure you want to move the original planet? There might be OXPs depending on it being somewhere.

Also, I recall several OXP that add planets and other stuff (LittleBear made at least one, and there are the Lave, Pulsar and Orbital Graveyard OXPs). Can you avoid interfering with these?

Just some thoughts worrying me from around the corner. Otherwise having the extra planets is brilliant.

Best wishes,
Oscar
User avatar
Hoopy
---- E L I T E ----
---- E L I T E ----
Posts: 438
Joined: Wed Oct 03, 2007 8:54 pm
Location: Durham, England

Post by Hoopy »

http://www.flickr.com/photos/24657513@N04/2372277120/

version 5 of my texture generator
images are now sharper (so they don't look melted)
it's 3 times faster to generate (so 400ms when not in debug mode)
adds snow capped mountains
better equatorial palette
extra random variation in the vegetation to make it look more realistic

Just about running out of ideas before i do a version where you can all play with it :)
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

It's getting very realistic now. We also should use some of these textures! :D
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

ovvldc wrote:
Are you sure you want to move the original planet? There might be OXPs depending on it being somewhere.
Very good point, there's quite a few oxps that assume the station and main planet are close together. And the classic coordinate system for adding ships & planets depend on the actual position of the main planet. Shutlles need the planet to be close to the station too.

There seems to be two separate issues involved in the triangle artifacts:

1) the original planet (or its atmosphere) poking through the textured planet. Grey, chunky triangles show up sporadically. Didn't notice them at first. First saw them at some distance away, with the planet filling half the screen.

2) two copies of the textured planet creating interference patterns. After flying in, docking then leaving the station, small rapidly changing black triangles showing up all over the planet.

Moving the original planet away solves 1), but can break a lot of other oxps. Using this.systemDone to avoid adding the textured planet n-times solves 2).

However, there are some other issues.

After some extensive testing (I really like the look with the new planets and Griff's trade outpost) I also found out that:
1) the textured planet doesn't register on the altimeter, and
2) doesn't trigger a proximity alert either.
These last two are proper bugs that I'll try to fix in the next few days.

For the other problems, I'll see if I can sneak in a system.mainPlanet.setTexture() method in 1.71 without anyone noticing...

Probably the best thing to do with system_redux - for the moment anyway - is to slap a huge 'WARNING' sign on the readme, and have people take their chances with the eye candy...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
pagroove
---- E L I T E ----
---- E L I T E ----
Posts: 3035
Joined: Wed Feb 21, 2007 11:52 pm
Location: On a famous planet

Post by pagroove »

@ Kaks

Indeed the tirangles show up when first flying to a station, then docking and then undocking again. I'ts a bit strange that it happens after undocking or after exiting witchspace.

Good that you are already looking into the case 8)
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)
Image
https://bb.oolite.space/viewtopic.php?f=4&t=13709
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

Kaks wrote:
For the other problems, I'll see if I can sneak in a system.mainPlanet.setTexture() method in 1.71 without anyone noticing...
:shock: please, please, please!
Kaks wrote:
Probably the best thing to do with system_redux - for the moment anyway - is to slap a huge 'WARNING' sign on the readme, and have people take their chances with the eye candy...
I'll add a warning to the readme and include an alternative script.js that leaves the planet where it is.
Download Fighter HUD, Stingray and System Redux from the EliteWiki
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

@System Redux producers ...

Post by Lestradae »

please, please, please!
Me too! Please :shock:

Can you (please, please, please also) create an option of this, by the way, brilliant oxp that has either much farther distances (thirty times :? ) for other planets from the main planet and the same for its moon(s); or at least an option to have the main planet textured but no additional moons/planets per system?

For me the actual distances (in the beta you posted) look like a planet showroom - this is so much too close it ruins any suspense of belief into the result being a solar system for me :(

Having waited for something like your oxp for some time, I would be so grateful - and perhaps not only myself :wink:

Cheers 8)

L
User avatar
Hoopy
---- E L I T E ----
---- E L I T E ----
Posts: 438
Joined: Wed Oct 03, 2007 8:54 pm
Location: Durham, England

Post by Hoopy »

Could someone try wrapping one of the procedurally generated textures onto a planet just so we can see how it looks please?

They're 512x256 at the moment - would 1024x512 be needed?

Or can I just download this new OXP and change one of the texture files?
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

Hoopy wrote:
Could someone try wrapping one of the procedurally generated textures onto a planet just so we can see how it looks please?

They're 512x256 at the moment - would 1024x512 be needed?

Or can I just download this new OXP and change one of the texture files?
You could just download the OXP and replace one of the textures, but let me know where the texture is and I can do it for you.
Download Fighter HUD, Stingray and System Redux from the EliteWiki
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

Replace the code in script.js (except the array at the top) with the code below

Code: Select all

this.multiple=10;

// WARNING - WARNING - WARNING
// By changing this option to 'false' you will almost certainly break any OXP that relies on the main system planet NOT being moved.
// This option will fix the flickering diamond effect seen on some planets, plus when entering a system
// you will not see the original planet being drawn first.
this.Lucy_in_the_Sky_with_Diamonds = true;

// Set to 'false' to remove extra planets/moons
this.Draw_Moons=true;
this.Draw_Planets=true;

this.startUp = function()
{
	Log("Initialising OXP " + this.name);
	this.systemDone=false;
}

this.reset = function()
{
	this.systemDone=false;
}

this.movePlanet = function()
{
	let p = system.mainPlanet;
	if(p)	p.setPosition(p.position.add(p.position.subtract(system.sun.position)).multiply(this.multiple));
	this.systemDone=true;
}

this.shipWillLaunchFromStation = function()
{
	if (!this.Lucy_in_the_Sky_with_Diamonds) {
		if (this.Draw_Moons) addMoons();
		if (this.Draw_Planets) addPlanets();
		homePlanet();
		if(!this.systemDone) this.movePlanet();
	}
}

this.shipWillExitWitchspace = function()
{
	if (!this.Lucy_in_the_Sky_with_Diamonds) {
		if (this.Draw_Moons) addMoons();
		if (this.Draw_Planets) addPlanets();
		homePlanet();
		this.movePlanet();
	}
}

this.shipLaunchedFromStation = function()
{
	if (this.Lucy_in_the_Sky_with_Diamonds) {
		if (this.Draw_Moons) addMoons();
		if (this.Draw_Planets) addPlanets();
		homePlanet();
	}
}

this.didExitWitchSpace = function()
{
	if (this.Lucy_in_the_Sky_with_Diamonds) {
		if (this.Draw_Moons) addMoons();
		if (this.Draw_Planets) addPlanets();
		homePlanet();
	}
}

function addMoons() {

	var planet = galaxyNumber * 256 + system.ID;


	if (system_info[planet] & 0x01) {

		system.addMoon("moon1");
	}
	if (system_info[planet] & 0x02) {

		system.addMoon("moon2");
	}
	if (system_info[planet] & 0x04) {

		system.addMoon("moon3");
	}
	if (system_info[planet] & 0x08) {

		system.addMoon("moon4");
	}
}

function addPlanets() {

	var planet = galaxyNumber * 256 + system.ID;


	if (system_info[planet] & 0x10) {

		system.addMoon("planet1");
	}
	if (system_info[planet] & 0x20) {

		system.addMoon("planet2");
	}
	if (system_info[planet] & 0x40) {

		system.addMoon("planet3");
	}
	if (system_info[planet] & 0x80) {

		system.addMoon("planet4");
	}
}

function homePlanet() {

	var planet = galaxyNumber * 256 + system.ID;
	var radius = system.mainPlanet.radius / 2560;
	var no = radius.toFixed(0) - 11;
	var type = (system_info[planet] & 0xF000) >> 12;
	
	LogWithClass("testscript", "Planet texture " + type + "planet" + no + " added to system " + system.ID);

	system.addMoon(type + "planet" + no);
}
Last edited by CaptKev on Mon Mar 31, 2008 9:15 am, edited 4 times in total.
Download Fighter HUD, Stingray and System Redux from the EliteWiki
User avatar
Hoopy
---- E L I T E ----
---- E L I T E ----
Posts: 438
Joined: Wed Oct 03, 2007 8:54 pm
Location: Durham, England

Post by Hoopy »

Cheers Capt Kev, there's one of the latest iteration on flickr at http://www.flickr.com/photos/24657513@N04/2372277120/
User avatar
CaptKev
---- E L I T E ----
---- E L I T E ----
Posts: 519
Joined: Fri Jan 26, 2007 3:21 pm
Location: Shropshire, UK

Post by CaptKev »

Looking good 8)

Image
Download Fighter HUD, Stingray and System Redux from the EliteWiki
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

!

Post by Lestradae »

Wow, is that one already in-game procedure generated? :shock:

Anyways, brilliant :!:
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Magnificent work guys, really looking forward to this.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Hoopy
---- E L I T E ----
---- E L I T E ----
Posts: 438
Joined: Wed Oct 03, 2007 8:54 pm
Location: Durham, England

Post by Hoopy »

Cheers captKev - it looks much better wrapped round a planet! :)

I'll do a higher resolution one as it's a bit artificial looking around the equator.

Lestradae - it's generated by a little C# program I wrote. It should be easy enough to port to objective C (which oolite uses) as the languages aren't that different.

Before that the next step is to tidy up the palette generating code so its understandable and add some sort of user interface. Then we can all have a play and come up with some ranges of settings for producing decent textures.

Then it would be ready to go into the game if people want it.

I imagine we'd also need some changes in Oolite so OXP specific textures could still be added: a hand built one is always going to look better and would be able to show specific features needed for an OXP.

It'd be nice if we could get oolite make some attempt to make the textures match the descriptions. So worlds described as having a big ocean could have a very ocean dominated texture (ie a high sea level)
Post Reply