Aller au contenu

Photo

Terrain - BUG CHECK // specular palette file [.gpu.rim]


5 réponses à ce sujet

#1
IKe0s

IKe0s
  • Members
  • 80 messages
Hello, I have one question about the toolset mainly for the bioware guy's.
Are the engine capable to utilize the specular map for render the terrain mesh?
If so, did u already flag as red the entry export process, which strip away all the relevant information for such manipulation?
If not, u should be going check all of the retail ".mao" level [.rim] file and the relative missing *__.spc palette [.gpu.rim] ( or whatever it must be called ) for that map.


Best regards

Modifié par IKe0s, 29 novembre 2009 - 10:37 .


#2
Mika Uusnakki

Mika Uusnakki
  • BioWare Employees
  • 6 messages
So the way this works is that the Level Editor simply takes the dds you assign to the specular Texture and converts it to grayscale and writes it to the alpha channel of your LAYOUT__pal.dds texture. You should be able to see the specular in the Level Editor, Area Editor and the game. If you cannot see the effect in game, then most likely your shader quality is set too low.



Does this address your question?



-Mika

#3
Mika Uusnakki

Mika Uusnakki
  • BioWare Employees
  • 6 messages
It might be easier if you just send us your .lvl file and textures. Send them as an attachment in an email to toolsetsupport@bioware.com.

#4
Mika Uusnakki

Mika Uusnakki
  • BioWare Employees
  • 6 messages
There is no smpSpecularMapPalette in the terrain shaders or in the terrain material because the specular information is read out of the processed diffuse texture's alpha channel. If you want to set the specular exponent, there is a parameter you can set in the Level Editor.



It sounds like you want the terrain to render like the static props you modified in the videos you posted. To do this you will need to place the modified specular and normal maps you created (as uncompressed dds) into your override folder. Then follow these steps:

1. Create a new terrain level.

2. Expand the Terrain World node, expand the Terrain Mesh node, expand the Palette node and click on Grass.

3. In the Object Inspector window replace the Diffuse texture with snowpa01_d.dds

4. Replace the Normal and Specular textures with your modified ones.

Now the terrain should look the same as the prop in your video.

#5
Mika Uusnakki

Mika Uusnakki
  • BioWare Employees
  • 6 messages
At this point, you should really just send me your static/terrain test level and textures, and I'll see what's going on because this really should be possible to accomplish.

#6
Mika Uusnakki

Mika Uusnakki
  • BioWare Employees
  • 6 messages
Ok, so here's the whole story of what's going on. I'll be using our brc100d level as an example here. If you open that level's rims, you should be able to find the files I'm referring to.
The level editor outputs 3 palette texture files (ARGB 8.8.8.8 dds format) when the level is exported:
brc100d__pal.dds
brc100d__nrm.dds
brc100d__hgt.dds
Each is a 1024x2048 texture, which is split into 2 columns and 4 rows. Each cell is a 512x512 source for a particular terrain material, with a 128 pixel repeat gutter to avoid bleeds in the mipmaps. So the max resolution you'll ever have in game is 256x256.

Now the brc100d__pal.dds texture has 4 channels ARGB. The RGB channels contain a copy the diffuse texture's RGB channels. The Alpha channel contains a greyscale copy of the RGB channels of the texture you assigned in the level editor to the terrain material's specular slot. The texture you sent me has the star in the alpha channel of that texture, so it won't be represented in the terrain palette. The alpha channel of the specular texture controls the specular exponent, which determines how much the specular bleeds over. For the terrain this is controlled by a single value from the level editor's terrain material in the object inspector.

The final piece of information critical to comparing terrain to props is that terrain doesn't handle specular from placed static lights - it only calculates it based on the directional light from the sun.

There are a few things that were not quite right about the assets you sent me. Firstly, the normal map you sent cannot be used for a normal map source on the level editor's terrain material because it is in DXT5NM format. It needs to be in ARGB 8.8.8.8 format with the X in the Red channel and Y in the Green channel. However, even after I manually converted yours back, it still behaved strangely - it looks like the whole normal map is angled in one direction.

Also, in the second to last screenshot, it looks like your UV tiling
setting for the terrain material is too high. When I was matching the
two, the value 7 seemed to produce the closest results.

In summary: to get the closest match to a static object:
 * If you want a normal map - use a good quality uncompressed normal map for the terrain material source and then DXT5NM compress that same texture and use it for your static object's normal map.
 * Adjust the UVTiling parameter in the level editor to visually match your static model.
 * Don't try to use the specular texture's alpha channel on the static prop to do neat tricks with specular power, as the terrain doesn't support that. Use a single value for the alpha, and match that value in the level editor.
 * Make sure to turn on the sunlight so that you can see specular on your terrain - static lights won't work.

-Mika