General asset questions

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
psi29a
Posts: 4279
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

General asset questions

Post by psi29a » 13 Jul 2015, 09:27

I'm looking for information over several different topics that came from examining what it would take to replace or drop the Bethesda assets in Ashes of Apocalypse. Keep in mind that the future releases of AoA is for OpenMW only, it will not be backwards compatible with Morrowind.

Here is the list for anyone interested:
https://github.com/Mindwerks/aoa/blob/m ... ion.output

50% are DDS[1] (direct draw surface) textures, for example water and ripple.

1) With Scrawl's water shader, are these textures redundant? Would I need to replace these for OpenMW, or can these be safely dropped?

2) If I need to replace some of the dds files, what format would be best to do? PNG, Jpeg or some other format? In addition to this, how does OpenMW pick one file (with the same name, but different extension) over the other? Say you have a image in TGA, BMP and DDS formats, which one gets chosen over the other? Or is this not the case and it is explicitly asked for in a NIF/ESM/ESP?

Another 40% are NIF files. I assume these are all meshes, animations and effects.

3) Can there be chaining dependencies? As in one file is referenced by another and/or extended by another?

4) Is there a way to do a reverse lookup to see what particular file (be it dds, kf or nif) is used by another file?

5) Will the OpenMW-CS be to do these kinds of lookups in the future? Would it also be able to work with NIF/KF files?

6) How would one go about replacing/duplicating NIF/KF files? As I understand, there is QScope/NIFscope in python and old versions of Blender that can be used. Does anyone have any guides there or is willing to help out with replacing these? I've already found these pages. [2][3]

The other 10% are VSO and PSO files, I'm assuming are pre-compiled shaders?

7) Are these used in OpenMW? Is there any way to de-compile them back to asm? How could one go about replacing them?

[1] https://en.wikipedia.org/wiki/DirectDraw_Surface
[2] http://www.loverslab.com/topic/2585-ble ... -kf-files/
[3] http://wiki.tesnexus.com/index.php/Crea ... animations
[4] http://www.nexusmods.com/oblivion/mods/12248

Chris
Posts: 1501
Joined: 04 Sep 2011, 08:33

Re: General asset questions

Post by Chris » 13 Jul 2015, 18:17

psi29a wrote:1) With Scrawl's water shader, are these textures redundant? Would I need to replace these for OpenMW, or can these be safely dropped?
The water textures are still needed for when water shaders are off (and the OSG port doesn't currently have water shaders re-enabled yet).
2) If I need to replace some of the dds files, what format would be best to do? PNG, Jpeg or some other format?
I would say stick with DDS. They support DXT formats which reduce the VRAM footprint (at the loss of a little quality), as well as raw formats. PNG and JPG would require an extra decode step which would increase load times and would be uncompressed in VRAM, though would decrease disk size.
In addition to this, how does OpenMW pick one file (with the same name, but different extension) over the other? Say you have a image in TGA, BMP and DDS formats, which one gets chosen over the other?
It seems OpenMW will prefer the DDS version if it exists, otherwise it'll use whatever extension was specified in the nif.
3) Can there be chaining dependencies? As in one file is referenced by another and/or extended by another?
This is how models work, where nifs reference texture files. Other than that, I think it's just the esx/omwgame/addon files that reference other files.
6) How would one go about replacing/duplicating NIF/KF files? As I understand, there is QScope/NIFscope in python and old versions of Blender that can be used. Does anyone have any guides there or is willing to help out with replacing these?
With the switch to OSG, it may be easier to support other model formats. Scrawl could perhaps comment on that.
The other 10% are VSO and PSO files, I'm assuming are pre-compiled shaders?

7) Are these used in OpenMW? Is there any way to de-compile them back to asm? How could one go about replacing them?
Yes they're precompiled shaders, no OpenMW doesn't use them.

User avatar
psi29a
Posts: 4279
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: General asset questions

Post by psi29a » 13 Jul 2015, 21:24

Chris wrote:
2) If I need to replace some of the dds files, what format would be best to do? PNG, Jpeg or some other format?
I would say stick with DDS. They support DXT formats which reduce the VRAM footprint (at the loss of a little quality), as well as raw formats. PNG and JPG would require an extra decode step which would increase load times and would be uncompressed in VRAM, though would decrease disk size.
In addition to this, how does OpenMW pick one file (with the same name, but different extension) over the other? Say you have a image in TGA, BMP and DDS formats, which one gets chosen over the other?
It seems OpenMW will prefer the DDS version if it exists, otherwise it'll use whatever extension was specified in the nif.
Really? Does OSG load the DDS directly into the GPU like DirectX does? Are there other formats better than DDS or something that OSG can use in the place?

Can I replace all the huge BMP/TGA files with DDS (or equivalent)? Is this the "right" thing to do? What should I do with all these files? Same with WAVs, can't I replace them with MP3s?

Chris
Posts: 1501
Joined: 04 Sep 2011, 08:33

Re: General asset questions

Post by Chris » 14 Jul 2015, 01:34

psi29a wrote:Really? Does OSG load the DDS directly into the GPU like DirectX does?
More or less, yes. It's important to note that DDS is a container format, not unlike wav, so the image data can be in a number of formats. RGBA8 and DXT1/3/5 are the most common, since they can be loaded as-is on most systems.

The one caveat seems to be that OSG vertically flips raw formats, so OpenMW needs to flip them back to work properly, which adds a bit of unnecessary work.
Can I replace all the huge BMP/TGA files with DDS (or equivalent)? Is this the "right" thing to do? What should I do with all these files? Same with WAVs, can't I replace them with MP3s?
Some of them. The reason they're large is because they're uncompressed, and while DDS allows you to use DXT to compress them by about a factor of 4 or so, some textures will look notably worse with DXT compression (particularly, normal maps don't turn out well with DXT; it's better to leave than as uncompressed and halve the width and height if you need that 4x size reduction).

Similarly with wave files, lossy compression can notably reduce the quality of some sounds. And like JPG, requires some extra decode work to load in uncompressed. The exception would be music, since they'd be very large uncompressed and get decompressed over time instead of all at once (though even there, it would be better to use Vorbis or Opus since they compress better than MP3, and don't have patent issues).

User avatar
psi29a
Posts: 4279
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: General asset questions

Post by psi29a » 14 Jul 2015, 07:15

But for WAVs, couldn't I use FLAC or similiar lossless compression? Same with Images, a lossless format? The reason I'm asking is that I want to make AoA as small as possible, trying to replace also all the large uncompressed files.

Do we have a list of all supported formats for OSG (OpenMW)?

User avatar
Zini
Posts: 5532
Joined: 06 Aug 2011, 15:16

Re: General asset questions

Post by Zini » 14 Jul 2015, 08:38

4) Is there a way to do a reverse lookup to see what particular file (be it dds, kf or nif) is used by another file?
Not that I am aware of.
5) Will the OpenMW-CS be to do these kinds of lookups in the future? Would it also be able to work with NIF/KF files?
A clear yes to that. But probably post-1.0.

User avatar
psi29a
Posts: 4279
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: General asset questions

Post by psi29a » 14 Jul 2015, 08:42

Zini wrote:
5) Will the OpenMW-CS be to do these kinds of lookups in the future? Would it also be able to work with NIF/KF files?
A clear yes to that. But probably post-1.0.
Yes to both questions? :) What kind of work with NIF/KF files? Would people still need Blender 2.49 (all associated tools) to do animation work?

Chris
Posts: 1501
Joined: 04 Sep 2011, 08:33

Re: General asset questions

Post by Chris » 14 Jul 2015, 23:32

psi29a wrote:But for WAVs, couldn't I use FLAC or similiar lossless compression? Same with Images, a lossless format? The reason I'm asking is that I want to make AoA as small as possible, trying to replace also all the large uncompressed files.
You can, if you don't mind those files taking a little longer to load.

User avatar
psi29a
Posts: 4279
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: General asset questions

Post by psi29a » 15 Jul 2015, 08:26

I'm noticing that OpenMW will try to load a DDS file that is missing, and totally ignore the file with the same name but with a different extension, like BMP and TGA. Was this 'feature' ever implemented?

Morrowind had no problem with this and many mods depended on it.

User avatar
psi29a
Posts: 4279
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: General asset questions

Post by psi29a » 15 Jul 2015, 09:09

Digging further:
[email protected]:~/workspace/OpenMW/openmw$ grep -ir 'attribute_st'
components/esm/attr.cpp: "icons\\k\\attribute_strength.dds",
files/mygui/openmw_chargen_review.layout: <UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_strength.dds"/>
files/mygui/openmw_stats_window.layout: <UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_strength.dds"/>
files/mygui/openmw_levelup_dialog.layout: <UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_strength.dds"/>
It seems that look for these things explicitly, but we ignore all other files like attribute_strength.tga or attribute_strength.bmp.

@zini and @scrawl: was it the intention that we only look for those exact files? In Morrowind, if the file wasn't found, it looks for others with the same name but with a different extension. Can we fix this?

Another thing, it seems that OpenMW or OSG doesn't support SVG files. I tried replacing the attribute_strength.dds with strength.svg (a real SVG file, perfect for scaling up/down with the GUI) and it gives me this:
Error loading icons\k\strength.svg:
I would think that SVG files are perfect as icons here.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests