Model texture on mission screen
Moderators: winston, another_commander, Getafix
- 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.
Model texture on mission screen
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.
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.
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.
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.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Model texture on mission screen
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?
Have you tried with an alternative asteroid - one of Griff's, perhaps?
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!
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Model texture on mission screen
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.
- 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: Model texture on mission screen
Not quite. It's a standard parcel contract, but I forced the asteroid model onto it to demonstrate the issue.Cody wrote:is that a parcel delivery to a rock hermit (or something similar)?
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 doingSmivs wrote:it looks as if the game is calling the wrong asteroid
system.addShips("[Casteroid1]", 1, player.ship.position.add(player.ship.vectorForward.multiply(5000)), 1);
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Model texture on mission screen
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!
- 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: Model texture on mission screen
It's got me thinking, though!Cody wrote:Ah... shame!
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Model texture on mission screen
If you need any ideas, let me know... I've been thinking about it for years!
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!
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Model texture on mission screen
Have you solved the texture problem?
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!
- 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: Model texture on mission screen
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.
- 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: Model texture on mission screen
OK, I'm confused (yes, this happens a lot). Here's the shipdata.plist entry for a "Casteroid1"
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:
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...
Code: Select all
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;
};
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: Select all
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;
};
};
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.
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...
Re: Model texture on mission screen
Check the script "AsteroidStormAsteroid.js". It's got a shipSpawned event that sets the materials.
- 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: Model texture on mission screen
Face? Meet palm.
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!
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!