Oolite Bulletins

For information and discussion about Oolite.
It is currently Fri Jul 28, 2017 6:47 pm

All times are UTC




Post new topic  Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Thu Feb 16, 2017 9:32 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1590
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
I don't know if I've messed up somewhere, but anyway...

On the left is a mission screen with the model set to be "[Casteroid1]" from the Asteroid Storm OXP.
On the right is that same asteroid, but seen in space.

Image

Do I need to do something special to the mission screen to get the texture to appear? Or is this something to do with the Asteroid Storm OXP?

This is in v1.84 and v1.85.

_________________
My OXP's


Top
   
PostPosted: Thu Feb 16, 2017 5:05 pm 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12665
Location: Corke's Drift
I don't know the answer (though I feel I probably should), but is that a parcel delivery to a rock hermit (or something similar)?

Have you tried with an alternative asteroid - one of Griff's, perhaps?

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Thu Feb 16, 2017 7:47 pm 
Offline
Retired Assassin
Retired Assassin
User avatar

Joined: Tue Feb 09, 2010 11:31 am
Posts: 8270
Location: Disunited Kingdom
It looks a bit 'purple' which suggests it's not finding a texture, but there does seem to be a bit of texture on the 'display' one. Either way, it looks as if the game is calling the wrong asteroid so double check the name etc.

_________________
Commander Smivs, the friendliest Gourd this side of Riedquat.


Top
   
PostPosted: Thu Feb 16, 2017 9:18 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1590
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
is that a parcel delivery to a rock hermit (or something similar)?
Not quite. It's a standard parcel contract, but I forced the asteroid model onto it to demonstrate the issue.
Quote:
it looks as if the game is calling the wrong asteroid
In this case I force the same model to be used by setting the model for the mission page to be [Casteroid1] (including the brackets), and I then manually created an asteroid of the same type by doing system.addShips("[Casteroid1]", 1, player.ship.position.add(player.ship.vectorForward.multiply(5000)), 1);

_________________
My OXP's


Top
   
PostPosted: Thu Feb 16, 2017 9:42 pm 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12665
Location: Corke's Drift
Quote:
Not quite. It's a standard parcel contract...
Ah... shame!

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Thu Feb 16, 2017 10:29 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1590
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
Ah... shame!
It's got me thinking, though!

_________________
My OXP's


Top
   
PostPosted: Thu Feb 16, 2017 10:35 pm 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12665
Location: Corke's Drift
If you need any ideas, let me know... I've been thinking about it for years!

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Sun Feb 19, 2017 11:47 am 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12665
Location: Corke's Drift
Have you solved the texture problem?

_________________
The only good fnord is a dead fnord!


Top
   
PostPosted: Mon Feb 20, 2017 1:29 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1590
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
No, it's a bit confusing actually. When using Griff's asteroids the issue doesn't seem to occur. I'm going to have a look under the hood at the Asteroid Storm asteroids to see what the differences might be, and see where that leads.

_________________
My OXP's


Top
   
PostPosted: Mon Feb 20, 2017 2:36 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1590
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
OK, I'm confused (yes, this happens a lot). Here's the shipdata.plist entry for a "Casteroid1"
Code:
Casteroid1 = {
		"ai_type" = "dumbAI.plist";
		bounty = 10;
		"cargo_type" = "CARGO_NOT_CARGO";
		"debris_role" = astormBoulderC;
		density = 5;
		"energy_recharge_rate" = 0;
		"likely_cargo" = 1;
		"max_cargo" = 0;
		"max_energy" = 100;
		"max_flight_pitch" = "0.1";
		"max_flight_roll" = "0.1";
		"max_flight_speed" = 5;
		missiles = 0;
		model = "astormtiled01.dat";
		name = Asteroid;
		roles = "asteroid asasteroid";
		"scan_class" = "CLASS_ROCK";
		script = "AsteroidStormAsteroid.js";
		smooth = YES;
		thrust = 0;
	};
Now, I'm very prepared to admit I'm not very good at modelling, but with the little knowledge I have, something seems to be missing here. The definition includes a model, "astormtiled01.dat". But I'm expecting there to be some reference to materials in order to specify the texture file and normal map. But there's nothing.

Looking at the astormtiled01.dat file, it references "asteroid.png", but I thought that was just a placeholder name that the materials section of the model uses to hook into. That is, I expected to see this:
Code:
		materials = {
			"asteroid.png" = {
				"diffuse_map" = {
					name = "astorm09.png";
					"repeat_s" = true;
					"repeat_t" = true;
				};
				"normal_map" = {
					name = "astorm12_normal.png";
					"repeat_s" = true;
					"repeat_t" = true;
				};
				"specular_map" = {
					name = "astorm_specular.png";
					"repeat_s" = true;
					"repeat_t" = true;
				};
				shininess = 30;
			};
		};
But that definition doesn't appear in "Casteroid1". It's in "Casteroid1-demo". When I create a "Casteroid1" and a "Casteroid1-demo" in space, they look almost identical. But to my way of thinking, "Casteroid1" shouldn't get any texture at all. Or if it does get one, it should get the texture "asteroid.png", which is included in the core game.

To test this, I replaced "asteroid.png" with "asteroid_x.png" in the "astormtiled01.dat" file. And now, if I create a "Casteroid1" I get an un-textured blob.

So, here's what I think is happening: In space, when a "Casteroid1" is created, it will keep the "asteroid.png" reference in the .dat file, an apply the texture accordingly. However, because there is no specific materials definition for "Casteroid1", no texture is applied on a mission screen.

I'm still thinking about how to distill this down to a repeatable test.

[Edit to say] Well, that's not it. I'm really not sure what's happening now. My test OXP didn't do what I expected it to do. I think...

_________________
My OXP's


Top
   
PostPosted: Mon Feb 20, 2017 9:07 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Wed Aug 15, 2012 4:19 am
Posts: 2438
Location: Finland
Check the script "AsteroidStormAsteroid.js". It's got a shipSpawned event that sets the materials.


Top
   
PostPosted: Mon Feb 20, 2017 7:24 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1590
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Face? Meet palm. :oops:

I did notice the script file and even had a brief look at it, but then thought "Why am I looking for material stuff in a script? That stuff is in shipdata.plist!"

Which proves I should probably stay away from modelling.

On a positive note, this explains why using the Casteroid1 key as the model on a mission screen fails, but it works in space. I'll be able to sleep better now, so thanks spara!

_________________
My OXP's


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited