Page 1 of 1

Help with multiple textures in wings

Posted: Mon Jan 08, 2007 11:57 am
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?

Posted: Mon Jan 08, 2007 12:01 pm
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

Posted: Mon Jan 08, 2007 12:46 pm
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. :(

Posted: Mon Jan 15, 2007 1:32 pm
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.

Posted: Mon Jan 15, 2007 2:13 pm
by Rxke
Looks promising :D

Posted: Mon Jan 15, 2007 4:42 pm
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)?

Posted: Mon Jan 15, 2007 5:14 pm
by Wolfwood
Ah, that looks very promising indeed! :)

Posted: Thu Jan 18, 2007 4:45 pm
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.

Posted: Thu Jan 18, 2007 5:13 pm
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 :?

Dictators

Posted: Tue Jan 23, 2007 10:54 am
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.

Posted: Tue Jan 23, 2007 10:01 pm
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.

Posted: Tue Jan 23, 2007 11:02 pm
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.

Posted: Tue Jan 23, 2007 11:49 pm
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")