Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
63 user(s) are online (35 user(s) are browsing Forum)

Members: 0
Guests: 63

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +10€

Current balance: -70€
(last updated 08/2019)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 60 users playing Freelancer on 31 servers.
August. 22, 2019

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Anonymous
Adding glowmaps to models
Anonymous-Anonymous
After repeated requests, i''ve decided to do a tutorial on adding
glowmaps to models. This means lights that glow on the model in the dark, ideal for
ships, bases and in some cases, planets. You can still add running lights if you want
but that i''ll leave up to you. This tutorial is not for the faint hearted and requires
patience but trust me, the results are worth it. I''m assuming that those that attempt
this know a bit about the general subject as this is not for noobs.

Tools you will need:

-A decent graphics editing program, Paintshop, Photoshop or some program that can deal
with TGA and DDS texture formats

-A copy of UTF editor

*****************************************************************

First thing you need to do is locate the texture for your model which normally sits in
the MAT file for your ship. You need to extract this with the UTF editor. Look for the
file in the texture library section by clicking on the name, another node will open up,
either MIP0 or MIPS, click on that and EXPORT it using the editor. The texture file
will have a TGA file extention which is fine if its a TGA texture. It might also be a
DDS one in which case change the extention to DDS so you can edit the texture in your
graphics program, don''t worry about importing the mipmaps into your graphics program
if its a DDS texture. Also some ships have multiple textures, you need to find the one
that you want to edit, not all of them will need glowmaps.

**NOTE**

Freelancer uses the TGA format to display textures in game, these can be quite large
which is why lots of people including myself, prefer using the DDS format as this cuts
down on space and significantly reduces the texture file size.

A lot of new ships only use one texture file, 256x256, 512x512 and so on so here''s one
i extracted earlier,

Colonial Raptor
http://i5.photobucket.com/albums/y155 ... 20stuff/colrap1coxtex.jpg

Next thing you need to do is to create the glowmap itself which is exactly the same
image as above but very dark, usually achieved by lowering the brightness and contrast
but you may have to experiment with this. This is where you add any engine glow or
lights to the model by simply going over the original section in the texture and adding
nice bright colours for the areas you want to make glow in the dark. Resave it and most
importantly, RENAME it so it looks like this,

Colonial Raptor glowmap
http://i5.photobucket.com/albums/y155 ... 0stuff/colrap1coxtexi.jpg

Once this is all done you need to decide what format to save it as. In this case
because the texture is one simple square one, we can convert it to DDS format so make
sure you save it as such and save it with no alpha channel.

******************************************************************

Now comes the fun part, for this you need the UTF editor so open up the MAT file of
your model so it looks like this,

UTF 1
http://i5.photobucket.com/albums/y155 ... /General%20stuff/utf1.jpg

Now in the version you guys will have you will only see three sections, the Dt_flags,
Dt_name and Type sections. The glowmaps are added to the Et_flags and Et_type sections
which you have to create. You do this by adding two new nodes to the first tree where
the original texture name is, in this case, colrap1coxtex.

Once you''ve added the two new nodes you will have two nodes that have New node next to
them. Highlight the first one, rename it to Et_flags and edit it as an int array. You
need to add two numbers, first 64, press enter than add 0

Highlight the second node and rename it Et_name and edit it as a string. You must enter
the name of your glowmap texture here so i''ve put colrap1coxtexi.tga in mine. It has a
TGA extention even though its a DDS texture as explained before.

Lastly, two nodes up is the node called Type. Edit this as a string and add Et on the
end so it reads DcDtEt.

***********************************************************************

Now we''re on the home stretch. You need to add the new glowmap texture to the texture
library in UTF editor so it looks like this,

UTF 2
http://i5.photobucket.com/albums/y155 ... /General%20stuff/utf2.jpg

A new node needs to be added to the texture library section so go ahead and do this.
Once done you will have a node with New node next to it. Highlight it and rename it
using the glowmap texture name. Once this is done, add a new node to the new glowmap
texture name and rename this either MIP0 for a TGA texture or MIPS for a DDS texture.

Once this is all done, you need to import the new glowmap to the MIP0 or MIPS node, so
highlight it and IMPORT the new texture.

Save everything to your MAT file of choice and that should do it. Make sure your trees
look EXACTLY like they do in the UTF images above or it won''t work.

Enjoy!

Posted on: 2008/6/2 13:10
Top
Re: Adding glowmaps to models
Just can't stay away
Joined:
2008/6/25 18:56
From Temecula, California
Group:
Registered Users
Senior Members
Posts: 284
Offline
Good stuff there Gibbon

Just perhaps one addition of note:
Et cannot be used on an animated texture. Ec can, but that's only one color, not a map like above.

Edit:
Humph, well perhaps it only bugs when used on a mesh-within-a-mesh then. (shell with transparency, ani under)
I had left the animation values exactly the same as found in the nomad mothership, used on the walls there.
Texture anim works with DcDtEc perfectly, but change it to DcDtEt or DcDtEcEt and nada.
Had the same problem on another ship; texture in question here has alpha. DcDtEcTwo. Add Et into the mix and no animation. Same unchanged deltas.

Both use it on a mesh beneath another transparent textured mesh, which may have something to do with it.

Posted on: 2008/7/1 20:25
Be always firm in belief, yet never rigid
Top
Re: Adding glowmaps to models
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 1281
Offline
Look at the cityscape cmps, there are alot of animated glow maps there. I have also successfully used it for an animated engine glow on the Sovereign.

Posted on: 2008/7/1 21:08
Galaxy Empire
Youtube Videos
Facebook
Top
Re: Adding glowmaps to models
Just can't stay away
Joined:
2008/2/22 13:33
From that dark place in the back of your mind..
Group:
Registered Users
Senior Members
Posts: 330
Offline
That's because your trying to animate two textures as one, the Dt tex & the Et tex, and from my own fiddling around with material animations, I found that FL just doesn't like that. The reason the nomads work is that they don't use "glow maps" as such, they use BtOcOtTwo rather than EcEt and call a "special animation" by using "nomad = true" in the shiparch.


"Ec" has two funtions, when used with a texture it acts like the Oc node and allows you to control the strength of the "glow"(if it's missing FL uses the default (0.800000)). On it's own it acts like the Dc node and is used to apply a "diffuse" color to the area, but because you have Ec or EcEt in the "type" FL gives it the default "glow" setting.

Posted on: 2008/7/1 23:17
**shuffles of with a new headache**
Top
Re: Adding glowmaps to models
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 1281
Offline
By taking an example from ocean_green.cmp, you should be able to get 2 different textures to animate. I was able to get it to work with 1 texture or 2, looks better with 2 IMO.

Open in new window

Notice the red texture at the front of the nacelles, it is animated with 1 glow texture.

Create a MaterialAnim node in your CMP (not the MAT file), make this node attached to the root node ( \ ),
Create a new child node under this and give it a name you will recognize as the texture name. I use the texture name without the _lod1.3db

Create 3 more nodes under this new node, naming them
MACount
MAFlags
MADeltas

In MACount, set it to 1 for a single animation
In MAFlags, set it to 2 (texture shift)
In MADeltas add this
1.000000
1.000000
1.000000
1.000000
0.000000
1.000000
1.000000
1.000000
1.000000
0.000000
These usually come in groups of 5 floats, don't ask me what they do, I've forgotten. I did this almost 2 years ago.

This should give you a sliding animation. Just remember, the entire texture slides so make sure your model is separated out properly.

Forgot to add this, under Cmpnd, you have to add a second MaterialAnim node.
Build it the same way as the one above with one single difference. The MAFlags should be 64 in this one.

Posted on: 2008/7/1 23:32
Galaxy Empire
Youtube Videos
Facebook
Top
Re: Adding glowmaps to models
Just can't stay away
Joined:
2008/5/28 21:00
From Melbourne, Florida, United States
Group:
Registered Users
Senior Members
Posts: 260
Offline
Quote:

...

Open in new window

...



...

...

...

Mother...

I was hoping that was what you meant when you said Sovereign but... damn. That is a beaut!

MK

Posted on: 2008/7/2 0:21
Top
Re: Adding glowmaps to models
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 1281
Offline

Posted on: 2008/7/2 3:56
Galaxy Empire
Youtube Videos
Facebook
Top
Re: Adding glowmaps to models
Just can't stay away
Joined:
2008/6/25 18:56
From Temecula, California
Group:
Registered Users
Senior Members
Posts: 284
Offline
Thank ya gentlemen, more fun stuff to play with. Sorry for steering the thread a bit askew in the process.

Posted on: 2008/7/2 4:20
Be always firm in belief, yet never rigid
Top
Re: Adding glowmaps to models
Not too shy to talk
Joined:
2008/2/22 9:48
Group:
Registered Users
Posts: 71
Offline
Just read this one.. what a nice guide thanks for sharing.

I take it you can use the same technique with starsphere models?

Also can you rename the .3db files exported by ms3d to .cmp for this purpose? Still to try it out but see no reason why not.
When I get time.....

Posted on: 2008/8/27 15:00
Top
Re: Adding glowmaps to models
Home away from home
Joined:
2008/6/5 16:18
From Germany
Group:
Banned!
Posts: 546
Offline
starspheres dont have "dark parts/shadows"... so why would you want glow maps there?

(to answer your question: yes you can create glowmaps there but they would look like the normal textures)

Posted on: 2008/8/27 19:30
Top
Re: Adding glowmaps to models
Not too shy to talk
Joined:
2011/11/7 5:57
Group:
Registered Users
Posts: 52
Offline
After the mission where you snatch the proteos tomb (sp..) and blow up Tekagi... I've always wanted to make Trent's eyes glow similar to the shade of color on the ships I've cloned, retextured and added (not replacing originals) to game.. I'm not very good with .thn's or .ale's which is how Tekagi's eye, head and hands generate the effects during the Cutscene.

Since I'm no good at editting the arrays of long numbers, I was hoping I might be able to accomplish something similar with the pi_pirate5_head.dfm that trent's character uses. I noticed there is already a glow map for the eyes, but no bright colors in it.. just looks like a black 32x32 image (mip0). After changing it to a color similar to my ships, I recompiled the dfm with Freelancer XML Project.. same way I extracted the necessary images by bulk.

After that failed to glow, I confirmed in UTF that the images did update in the texture library. Also confirmed the int array for Material Library\eyetealblue\Et_flags looks like:
64
0

Also string value for Material Library\eyetealblue\Et_name was already pointing to the tga reference in Texture Libraries that holds all the mip maps. Also confirmed, since there isn't an Ec_??? in the file, that Material Library\eyetealblue\Type is: DcDtEt.

Still failed in both cutscenes and just normal character walking between bar/equipment room/ship dealer, etc.. So I tried to apply a 60% opacity to Trent's eyes, hoping the glow might shine through, but still nothing..

Can this method be done to the .dfm? or do I need to do it through the .thn's using .ale references? Is it possible to place a hardpoint or "mount" a light in the head's skull that would illuminate the desired color I'm looking for and shine through the, now, semi-transparent eyeballs? Also willing to try any other ideas to accomplish this feat other than manually editting .ale's and .thn's in notepad..

Posted on: 2011/11/7 23:56
Top