Page 33 of 45

Re: Elder-scrolls IV Oblivion

Posted: 04 Sep 2019, 04:30
by cc9cii
Hey, great to see some progress!

For those wondering: I've got next to no time at the moment but I will try to help if I can. For the record what I've done so far has reached a point where some significant changes are needed, as opposed to incremental improvements that I was making with all the videos, but I've not been able to find the time to make such large changes.

I'm happy to share knowledge, however, so if you feel that I can help, please ask.

Re: Elder-scrolls IV Oblivion

Posted: 06 Sep 2019, 16:13
by mp3butcher
Hi cc9cii
I'm currently trying to take over your work on ESM>TES3 support..
I have ported your work to current master, and currently working on quest and dialogs.
However i would like to know if you encountered the same problem as i with NPC_ record parsing:
subrecords doesn't fit the size declared in record header (no SUB_XXX present so it's really confusing)
I let it aside as it's not critical for my current work but really would like to understand how to parse this damn NPC_ record

Re: Elder-scrolls IV Oblivion

Posted: 07 Sep 2019, 02:43
by cc9cii
I've only encountered SUB_XXXX in NAVM and WRLD records. You can see my implementation of those as an example. Basically SUB_XXXX records have zero datasize and subsequent 4 bytes represents the actual datasize to be used for the next record being read.

Re: Elder-scrolls IV Oblivion

Posted: 07 Sep 2019, 15:08
by mp3butcher
thanks for your fast reply, but the problem is on _NPC record and SUB_XXXX is not part of this record...

Re: Elder-scrolls IV Oblivion

Posted: 08 Sep 2019, 12:28
by cc9cii
Ok, I misunderstood your question. Your NPC_ record header and its actual size does not match? Is it possible for me to have a look at this file?

Re: Elder-scrolls IV Oblivion

Posted: 14 Sep 2019, 06:29
by cc9cii
Recently I got a bit of spare time to tackle facegen again. I'm currently stuck with the texture handling and I would like some help from people with texture knowledge.

The following texture data apply to Uriel Septim:

NPC specific texture:
textures/faces/oblivion.esm/00023f2e_0.dds (256x256, 9 mipmaps, DXGI_FORMAT_BC3_UNORM)
textures/faces/oblivion.esm/00023f2e_1.dds (32x32, 6 mipmaps, DXGI_FORMAT_BC3_UNORM)
FGTS subrecord of NPC_ with FormId 0x00023f2e (texture control modes values for Uriel Septim)

Race based (Imperial for Uriel Septim) texture:
textures/characters/imperial/headhuman.dds (128x128, 8 mipmaps, DXGI_FORMAT_BC3_UNORM)
textures/characters/imperial/headhuman_n.dds
meshes/characters/imperial/headhuman.egt (texture control modes, e.g. Beard Flushed / Pale, Eye Sockets Bruised / Bright, etc)

Agre related? (Uriel Septim is 65 years old male)
textures/characters/imperial/headhumanm60.dds (256x256, 9 mipmaps, DXGI_FORMAT_BC1_UNORM)
textures/characters/imperial/headhumanm60_n.dds

General (Misc.bsa)
facegen/si.ctl

There is some formula that applies FGTS statistical data to headhuman.egt (based on si.ctl I guess?). The age value is somehow embedded in the NPC_record (FGGS and FGTS subrecords change when the age slider is moved using the Construction Set).

Ignoring the facegen stuff for the moment, I would like some help with the basics first.

How would one go about applying the NPC_ texture and age related texture to the Imperial base headhuman.dds texture? Looking at the DDS files simple addition or multiplication (modulating) won't do. Actual experiments in game confirms this.

Any suggestions please?

Re: Elder-scrolls IV Oblivion

Posted: 16 Sep 2019, 23:39
by cc9cii
I was thinking about this on the way to work this morning and realized that TES4 came out in 2006 - so any texture application must have been done using shaders.

So I found this work by Alenett to decompile the shaders which explains quite a few things but at the same time throws more questions. Anyhow, it is a lead to further investigate.

Re: Elder-scrolls IV Oblivion

Posted: 18 Sep 2019, 00:56
by 1Mac
If you didn’t know, Alenet is the current developer of Oblivion Reloaded etc. He’s still very active and I’m sure would be willing to give you any help he could. Ask on his Discord or his website tesreloaded.com .

Re: Elder-scrolls IV Oblivion

Posted: 11 Oct 2019, 19:38
by ponyrider0
cc9cii wrote: 14 Sep 2019, 06:29 Recently I got a bit of spare time to tackle facegen again. I'm currently stuck with the texture handling and I would like some help from people with texture knowledge.
....
How would one go about applying the NPC_ texture and age related texture to the Imperial base headhuman.dds texture? Looking at the DDS files simple addition or multiplication (modulating) won't do. Actual experiments in game confirms this.

Any suggestions please?
I just found this information on the FaceGen SDK: https://facegen.com/dl/sdk/doc/manual/indepth.html The age and detail maps appear to be "Modulation Maps". Based on the information under the "Detail Texture Modulation" section, I think the missing step is division by 64. If my health improves, I'll try to do a manual test of this in GIMP at some point and report back.

Re: Elder-scrolls IV Oblivion

Posted: 11 Oct 2019, 20:32
by ponyrider0
Alright, I did some testing: It appears that the background pixel data in the detail / age map for Uriel Septim is about "424242h". This would match up with the division by 64 (40h) prior to multiplication with the base texture. The GIMP's standard "multiply" layer option seems to be capped at 1.0 == 255, but a rough brightening of the age map so that values of 42h become FFh seems to create proper wrinkles on the base texture. Hope this helps.