Bunker the Game
Would you like to react to this message? Create an account in a few clicks or log in to continue.

ASE texture fix -maybe-

Go down

ASE texture fix -maybe- Empty ASE texture fix -maybe-

Post  foofly Fri Feb 22, 2008 2:04 pm

"from http://www.katsbits.com/htm/tutorials/doom_3_texture_blending.htm#applying_materials_ase"

As we're using ASE models for this texture blending example it usually means doing a little bit of extra tweaking to the file because of the way ASE files are saved from 3D programs; usually the physical path to the images used during production are saved out with the model.

Open the ASE file into NotePad or similar text editor.

Design note : You may need to 'assign' NotePad to the ASE format; to do this do the following;

Right click select file > Open with > Select program (or browse to NotePad .exe)

You can set NotePad to 'Always open this file type' by checking the checkbox under the available applications list, this will force ASE files to always open by default into NotePad.

Once the file has opened into your text editor you need to search for a line in the ASE called '*BITMAP'; there may be more than one instance of this word depending on how many sections your model is composed of, but generally speaking it will look similar to the following;

*BITMAP "c:\projects\assets\models\widget\widgetbody.tga"

Design note : the file path will most likely be the location of your working directory, the place where all your project assets are; textures, models, etc.

The file path is the bit were interested in as that needs to be replaced with the material file reference which holds the texture blending information. In the sample material file above that's simply;

"file/path/image"

Or in other words it'll most likely be something similar to;

models/terrain/cliffs/rock1

Once you've got your material reference it then needs applying to the ASE file so it replaces the initial path saved with the file (shown above). Generally speaking Doom 3 powered games use material paths in the same way except in one instance; the location of the 'main' game content folder; with Doom 3 that's 'base', but with Quake 4 it's 'q4base' (the other upcoming Doom 3 powered games like Prey and Quake Wars may use yet different folder names; 'qwbase' for Quake Wars for example).

Go back to the ASE file and find the *BITMAP path again; it needs changing to the following for Quake 4;

*BITMAP "//q4base/models/terrain/cliffs/rock1"

And to the following for Doom 3;

*BITMAP "//base/models/terrain/cliffs/rock1"

Note the difference between each 'base' description, as explained above, this is important.

Once this has been done the ASE model is ready for the next stage of development; getting the model in to the game.






I've not tried this yet, but it seems like an easy fix.


Ok ignore that... here is a better soloution.

Bringing *.ase into D3 engine based games is not that hard. These files are stored in base/models/ usually. By opening the ase file in a texteditor (eg. notepad) you find a line that says "BITMAP" "". Enter your texture shader here. These shaders are included in *.mtr files ( base/materials/ ).
A shader for example can look like that:

textures/mytextures/texture1
{
diffusemap textures/mytextures/texture1_d.tga
bumpmap textures/mytextures/texture1_local.tga
specularmap textures/mytextures/texture1_s.tga
}

In the *.ase it will look like this:
"BITMAP" "textures/mytextures/texture1"

Save the ase file and try it loading in a map


Last edited by foofly on Tue Feb 26, 2008 10:17 am; edited 1 time in total (Reason for editing : *it was wrong*)
foofly
foofly
Admin

Posts : 77
Join date : 2008-02-08
Age : 40
Location : Newport, Wales (orig. Leicester, UK)

http://www.myspace.com/foofly

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum