Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Probable Fix for ENVMAPGLASS and ENVMAPBASIC warnings

The general place to discuss MOD''ing Freelancer!

Post Wed Apr 12, 2006 3:01 am

Probable Fix for ENVMAPGLASS and ENVMAPBASIC warnings

A note on fixing the envmapbasic.mat and envmapglass.txm warnings reported in FLSpew and FLSpit...

It's because FL doesn't like the Cube Map DDS format that the textures are stored in in these 2 files. Which is amazing as they came with the game.

Anyway, after a few hours of work at it (mainly finding and downloading editors and utilities that didn't work!!) I now have a fix.

I don't know enough to know if it's the right fix though, but here's the quick version of how to do it:

BEGIN_PROC - just my little joke, start of procedure!!

1. DATA\FX\envmapglass.txm - save a copy first, it'll be your problem if you don't.

Open the file envmapglass.txm with the Freelancer UTF Editor - Can be downloaded Here - and export the CUBE node as envmapglass.old.dds.

Open envmapglass.old.dds in a VERY good image editor - it's a single 384x64 pixel image which is the six 64x64-pixel sides of the DDS Cube Map that FL doesn't support.

Select and crop out the 3rd 64x64-pixel side (start from x=128) and save it as envmapglass.new.tga. It is the bit that looks like a white hot-spot.

(I had to use both DXTBMP and IrfanView together to do this, IrfanView's DDS plug-in didn't display the DDS image properly and DXTBMP couldn't help me crop the image. Any suggestions or link to a single editor that is absolutely magic for all of this?)

Open envmapglass.new.tga again in your VERY good image editor and make sure the Alpha Channel is all white (or whatever your editor sets the back colour to). If it's not then edit it and make it so (clear out all colours and shapes from it)! Save it (envmapglass.new.tga) again.

Go back to UTF Editor (re-open envmpaglass.txm if you closed it) and rename the node CUBE to MIP0. (Just click on it, wait 1-2 seconds and click again and rename it, then click somewhere else and it will be done).

Import the envmapglass.new.tga image into the MIP0 node and save the file as DATA\FX\envmapglass.txm.

2. DATA\FX\envmapbasic.mat - save a copy first, it'll be your problem if you don't.

Open envmapbasic.mat with UTF Editor, select the CUBE node and export it to envmapbasic.old.dds.

Open envmapbasic.old.dds in your VERY good image editor - it's a single 384x64 pixel image which should be the six 64x64 pixel sides of a DDS Cube Map.

Select and crop out the 1st 64x64-pixel slide (start from x=1) and save it as envmapbasic.new.tga. This one is just a matt grey square, this is what we need for this fix.

Open envmapbasic.new.tga again in your VERY good image editor and make sure the Alpha Channel is all white (or whatever your editor sets the back colour to). If it's not then edit it and make it so (clear out all colours and shapes from it)! Save it (envmapbasic.new.tga) again.

(Edit 31-7-2007 - This time I used DDS Converter 2.1, it's ideal for this step...)
Open envmapbasic.new.tga in your VERY good DDS-capable editor and select convert to DXT3 DDS format, enable MIP-map generation, number of mipmaps = automatic. (If your editor doesn't have this option use DDS Converter 2.1 'cos I have no idea what else to set it to ).

Save it as envmapbasic.new.dds ensuring it is in DDS DXT3 format.

Go back to UTF Editor and rename the node CUBE to MIPS. DON'T name it MIP0 please. We need this one to be a DDS image so it must be MIPS

Import the envmapbasic.new.dds image into the MIPS node and save the file as DATA\FX\envmapbasic.mat.

PROC_END - just another end-joke, end of this procedure!

No more warnings for me, and hopefully none for you either.

I haven't seen any side-effects at all from doing this, neither good nor bad. If it's not the right way then do please let me know here asap, I know very little about textures or material files.

StarAvenger
RRJDS Guild
Roleplay: - the art of self-deceipt!

Edit : link to UTF Editor inserted ..

Edited by - harrier on 4/12/2006 4:42:48 PM

Thanks for the edits and links guys, great.

Edited by - StarTrader on 7/31/2007 5:23:04 AM

Post Wed Apr 12, 2006 4:11 am

Well...
If it works...
Release it as a mod, 'cause I don't have the skills, or intelligence, to understand, or do, half of what you just explained.

The way I've always used, to remove those errors, was to delete, or comment out, these lines in ShipArch.ini, and SolarArch.ini:
material_library = fx\envmapbasic.mat
envmap_material = envmapbasic

to comment them out, change them to:
;material_library = fx\envmapbasic.mat
;envmap_material = envmapbasic

To remove the envmapglass errors that come with new ships, opem effect_shapes.ini and change:
[Texture
file = fx\envmapglass.txm
tex_shape = envmapglass

to

;[Texture
;file = fx\envmapglass.txm
;tex_shape = envmapglass

(Use this one ONLY if you have ships without transparent cockpits.)

Watch your 6!

Edited by - warzog on 4/12/2006 5:14:25 AM

Post Wed Apr 12, 2006 4:24 pm

Star Trader,

A very very good image editor is Photoshop.. you only need to go to Nvdia and get the .dds plugins.. those are the latest ones.. there are also older versions that work equally well in Kasdias Texture Guide.. which can be downloaded Here

Good work btw.. I do know a little about utf and textures and supported freelancer formats.. so if I can help email me.. this sort of knowledge could be very useful (.txms mainly) for a project that I have been playing with for some time now.. new alien/nomad style textures..that link to .txms..

Harrier


Harrier

Post Thu Apr 13, 2006 2:54 pm

Thanks Warzog, Harrier

I couldn't be sure if my method actually is a good fix, because I don't know where these textures/materials are used and couldn't find any pointers in my searchings through the .cmp files.

If anyone knows where to look to find where these are used so we can test them, it will be great to confirm that this is a real fix?

Thanks guys.

Post Wed Apr 19, 2006 10:49 am

Hello again guys 'n' gals.

OK first feedback from our testers is that many ships have developed a shiny lustre to them! Which could be good or not so good!

But the good side is that all the envmapbasic and envmapglass warnings have disappeared without trace and ships appear otherwise normal still.

I will try to post the files link here for anyone who would like to try them out...

Fixed envmapbasic.mat & envmapglass.txm files: http://downloads.rrjds.com/envmapfiles.zip

Let me have your feedback please.

StarAvenger

Roleplay: - the art of self-deceipt!

Edited by - StarTrader on 4/19/2006 11:50:58 AM

Post Wed Apr 19, 2006 12:28 pm

You sir, are a legend! Many thanks

Post Wed Apr 19, 2006 12:57 pm

Well, that's a very great compliment coming from you, Chips, many thanks for all the pointers and help you gave to all of us, I felt it's a way to return something for what I gained.

All the best, and please check out these files and let me know what difference you see? My laptop doesn't show any difference at all at any resolution, whereas one of my testers reports the shiny lustre and "very thin skins" on some ships, which may be a measure of transparency?

Post Thu Apr 20, 2006 8:20 am

Hmm, any reason why it's the white hotspot that is going - and not the black or two tone parts? have you tried leaving in the white part and removing the others instead?

Just curious.

And as for the "sheen" on the ships, i am not sure this is a good thing - as you can see on the following screenshots.

image 1
Image 2

Post Fri Apr 21, 2006 9:06 am

Hi Chips.

It's the white spot that I left in, not the rest.

On my Intel Extreme Graphics 2 all is well, I don't see the 'rust' spots but my pals do on their machines. :?

It's coming from the envmapbasic.mat file, the envmapglass.txm is not apparently causing any changes.

Would you check if you see the same at all resolutions and let me know?

Let me also know how to send you my email address if you don't mind helping me make the right fix? Thanks.

Edited by - StarTrader on 4/21/2006 10:08:08 AM

Edited by - StarTrader on 4/21/2006 10:12:28 AM

Post Mon May 01, 2006 7:21 am

OK, I think this is a problem worth fixing, and this is a good looking development and I need some help please guys 'n' gals...

Having looked into Cube Maps, DDS formats, DxTex, CubeGen,SkyPaint, Terragen, TheCompressonator, HDRShop, and many other programs and utilities and WIKIs and b....

OK, OK, the short version cometh:

I now have managed to make a second, proper DDS CubeMap with MIP Levels, and incorporated it into the envmapbasic.mat file, getting rid of all the errors from FLSpew, and my game works as before.

But - I can't see the problem that Chips and other testers saw,with brown/yellow/blue lines and "rusty hulls" on original ships and equipment.

So this is where I need help please, to put the new files in your Freelancer\DATA\FX folder (backing up and replacing the ones you have), and test out the ship and station views for me, looking for any wierd colours/"rust holes" - I like the notion of rusty Navy ships, you should see some to know what I mean!.

Any and all help is welcome, it will be really cool to get a good fix for this as the lighting and reflections on the ships and stations would probably be cooler with this working properly.

The two new files envmapglass.txm and envmapbasic.mat are here in a zip:-

http://downloads.rrjds.com/New_envmapfi ... 5-2006.zip

Thanks everyone.

Post Tue May 09, 2006 1:55 pm

Guess nobody is interested, huh?

Or maybe you-all just aren't clever enuff?

Huh?

Roleplay: - the art of self-deceipt!

Post Tue May 09, 2006 2:19 pm

<-- exams start in one week, last for one week, and I have 5 of em.

To be honest, I glance at the forums once a day for a couple of minutes here and there... i'd imagine some others are in the same boat too, sorry.

For instance, not actually read the last 3 posts in this, just saw "Guess no-one is instrested" and thought i'd stick a quick post in.

Post Tue May 09, 2006 2:54 pm

Hi!

I downloaded the files and will add it to my mod and test, if I have the same problems as Chips reported. However, this can also take some time, as I have my final school examination to get my A-Level in two days and afterwards I'll be away for 10 days or so.
However, when I come back, I'll test the files and see, if I get problems or not.

I can just say, great work. It might not attract the attention of many people, but for modders it is a great help and an improvement for the mod. So, keep going! :-)

Black Eagle

Post Tue May 09, 2006 3:15 pm

Thanks guys.

If anyone can throw some light on proper FL-type cubemaps for me it would be a great help too.

Post Tue May 09, 2006 9:34 pm

I also downloaded the files.. but havent tested them as yet as we have been trying to get some ships done and the current mod finished..

I will look at it as soon as I can..

Harrier

Return to Freelancer General Editing Forum