Help with multiple textures in wings

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

Moderators: winston, another_commander

Post Reply
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Help with multiple textures in wings

Post by Ramirez »

Hello all, happy new year!

My work on Dictators.oxp continues but I'm running into problems with textures. I've got a few big models made up of different objects that I want to texture separately. I can set everything up in wings OK, with separate materials and textures for each, and when I export the obj and mtl files and have a look at them in a text editor all the relevant mapping information seems to be there. However, once I run it through obj2dat the detailed texture mapping data gets omitted.

I know this should be simple, so is there a foolproof way to ensure that the texture info gets carried right through from the wings file to the dat file?
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 983
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

Use find and replace to replace the material names with the desired texture image file in the .dat file

eg. mymat -> mymat.png
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.
User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 983
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

If no texture information carries over to the .dat file at all I'd guess it to be a problem with the model. I've started from scratch the times I've hit that one. :(
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Post by Ramirez »

I finally fixed the problem - in the end it was indeed just a case of retexturing everything from scratch. This means I've finally managed to get my AstroFactory to appear in-game (apologies if the pic is a little dark):

Image

The idea is that these will appear amongst asteroid fields in industrial dictatorships, offering high-tech equipment at a reduced cost. Traders carrying much-needed raw materials such as minerals, alloys and precious metals can make a quick profit by dropping in on one of these factories, while if you're in need of heavy manufactured goods such as machinery, you may be in for a bargain. Alternatively, if you're the violent type you could just wait for a freighter to pick up its load and then ambush it on its way home.

I still need to do some more scripting and testing but with luck I'll soon be able to release an inital OXP containing the factory and a collection of new ships, along with one of my explanatory pdfs.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Rxke
Retired Assassin
Retired Assassin
Posts: 1760
Joined: Thu Aug 12, 2004 4:54 pm
Location: Belgium

Post by Rxke »

Looks promising :D
User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 983
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

That looks really good.

How did having parts of a model inside another part with a transparent texture work out (if you tried it)?
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.
User avatar
Wolfwood
---- E L I T E ----
---- E L I T E ----
Posts: 735
Joined: Wed Mar 29, 2006 9:53 am
Location: Finland
Contact:

Post by Wolfwood »

Ah, that looks very promising indeed! :)
Author of Tales from the Frontier - official Elite 4 anthology.
Author of Marcan Rayger adventures - unofficial fan-fic novellas set in the Frontier universe.
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Post by Ramirez »

Dr. Nil wrote:

How did having parts of a model inside another part with a transparent texture work out (if you tried it)?
I did give this a try but nothing seemed to happen in-game. I can see where the opacity settings show up in the exported mtl file, but do they really get translated into the dat? I can have a check through the data but I wouldn't know what to look for.

I now have to come up with some figures for the commodities.plist. I had a vague idea of using the equations described in the wiki to build a spreadsheet that would help me understand which parameters would work best, rather than using simple trial and error. However, I don't understand what the '&' means in expressions like 'MARKET_RND & MARKET_MASK_PRICE'. Can anyone shed some light on this?

Meanwhile, here are a couple of other models from the dictator range:

Image
Imperial Censor - these are senior police units tasked with enforcing public morality and investigating misconduct in office.

Image
Imperial Lictor - these act as a bodyguard to senior officials as well as providing other escort duties.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 983
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

Great looking ships there. :D

On the transparent texture issue. I'm quite sure that I've observed semi-transparency in-game on the SLAP-U domes. Not by using transparencies in the modeling, but instead by making the parts of the texture that is used semi-transparent. I did use a very high opacity for the SLAP-U domes though because they penetrate into another part of the model. I'll most probably make the transparency higher once the model has been fixed. But their transparency should be noticeable - at least against the sun.

On the commodities: As far as I remember those two should be left alone (at 0) for the game to fill in. I'm still having some trouble with implementing a separate price list for the communist stations (I plan to have different goods available at CZGFs, SLAP-Us and Astromines) I haven't spotted the problem yet. It did work fine for me to get prices and commodity availability at the Pi-42's as I wanted them to be :?
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Dictators

Post by Ramirez »

Just a heads up to say that I've submitted Dictators v1.0 to Oosat so it should be available soon. Through trial and error I've doctored the commodity prices to make them tie in with the backstory - they should provide some interesting trade opportunities without completely unbalancing the gameplay.
Download Resistance Commander plus many other exciting OXPs HERE
dajt
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 364
Joined: Tue Aug 17, 2004 7:05 am
Location: Orange, NSW, Australia

Post by dajt »

Ramirez wrote:
Meanwhile, here are a couple of other models from the dictator range
They look good - a cool mix of traditional shape and good texturing.
Regards,
David Taylor.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

@dajt

A bit off topic I know, but if you are going to do a bit of fiddiling with the exe, could I mention a problem i've hit!

Although you can have a conditions mission_variable greaterthan 100 (say), Oolite will not accept a conditions missions_varabile greaterthan another_mission variable.

Similarly whilst you can have a awardCredits: 100, you can't have a awardCredits: {mission_variable}.

No biggy and I got round it in BlackMonks.oxp and actually gave a bit more depth (late - attacked by gunships and charged a penalty and intesert keeps increasing, very late = even if you dock at the Black Monk Station with enough cash to pay, you are bundled into an airlock sans EVA suit and ejected from the station!), but would be handy if Oolite could read a variable greater than another variable rather than just variable greater than an intiger.
Last edited by LittleBear on Wed Jan 24, 2007 12:47 am, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

@LB (and trying not to speak for dajt before he replies!) - if the Javascript thing works the way we all hope then this should be possible (if I understand what dajt has done so far) - unless this is a limitation in the code that interprets the scripts rather than the scripting language itself (for javascript this is a "no biggie")
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
Post Reply