Custom Portraits

Show off your mod creations or just a work in progress.
Post Reply
User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Custom Portraits

Post by King of Worms »

Thanks for the update!
Test clipping, as how the clothing stacks together? I just spawn all clothing and put it on in some combinations. You dont have to test all dyes ofc ;)

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Custom Portraits

Post by King of Worms »

Ive noticed that the body of a black woman (Body11I0.IMG) appears to be moved few pixels to the left, compared to the rest of the bodies. I dont know if its intentional or not. Just a thing Ive observed while viewing the files.

User avatar
Adrinus
Posts: 289
Joined: Mon Oct 01, 2018 2:28 am

Re: Custom Portraits

Post by Adrinus »

All this work is incredible. I feel like I should just warn that there are 4 different body types. And you'll need different offsets/clothing shapes for each.

Sitrus
Posts: 46
Joined: Sat Sep 21, 2019 5:46 pm

Re: Custom Portraits

Post by Sitrus »

King of Worms wrote: Wed Nov 13, 2019 11:32 am Ive noticed that the body of a black woman (Body11I0.IMG) appears to be moved few pixels to the left, compared to the rest of the bodies. I dont know if its intentional or not. Just a thing Ive observed while viewing the files.
Thank you, I didn't notice that at all. I will be fixing this and addressing some other issues too this weekend :)
Adrinus wrote: Fri Nov 15, 2019 12:23 pm All this work is incredible. I feel like I should just warn that there are 4 different body types. And you'll need different offsets/clothing shapes for each.
I am aware of this and have taken it into account, it is one of the main reason why I automated most of my workflow.This far I have written python scripts that take care of backups, coloring, merging all the item variations, creating and modifying xml/mask files etc. Currently I am writing code that the modifications between the bodies are automated and I don't need to manually tweak every item to fit a body type. It is simpler than it sounds, all it needs is some "compression" and "stretching in some areas by using threshold/offset values, while using the borders of the image to determine where the tweaks need to be made .

Since the bodies are just as different as the bodies below them, what I have done is that on the first version some of the bodies are exactly the same but recoloured. As for the different body shapes and tweaking if items for them?

The math (used very loosely here) behind this notion is actually quite simple, considering I'm working with 2d images. Considering we can assume whatever "modification" in body shape is done to the original body x, we can just take the same vector quantization (to shift the pixels) and apply it to any arbitrary item y that fits the original body x and that should do the trick. Any needed tweaks from that due to noise/artifacts can be fixed by applying the density function of the original image y's colors on areas that have a color distribution out of the norm on the modified item y. As for patching areas that are left warped? That I haven't figured out and I don't know will that even be an issue until I experiment a bit.

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Custom Portraits

Post by Hazelnut »

I am constantly amazed at the skills and expertise people bring to this community. It's incredible. And always very interesting to read about even if I don't completely follow the intricacies. Nice work Sitrus. Hope the add equip command is doing what you need. Let me know if not.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Adrinus
Posts: 289
Joined: Mon Oct 01, 2018 2:28 am

Re: Custom Portraits

Post by Adrinus »

Sitrus wrote: Sat Nov 16, 2019 11:09 am
King of Worms wrote: Wed Nov 13, 2019 11:32 am Ive noticed that the body of a black woman (Body11I0.IMG) appears to be moved few pixels to the left, compared to the rest of the bodies. I dont know if its intentional or not. Just a thing Ive observed while viewing the files.
Thank you, I didn't notice that at all. I will be fixing this and addressing some other issues too this weekend :)
Adrinus wrote: Fri Nov 15, 2019 12:23 pm All this work is incredible. I feel like I should just warn that there are 4 different body types. And you'll need different offsets/clothing shapes for each.
I am aware of this and have taken it into account, it is one of the main reason why I automated most of my workflow.This far I have written python scripts that take care of backups, coloring, merging all the item variations, creating and modifying xml/mask files etc. Currently I am writing code that the modifications between the bodies are automated and I don't need to manually tweak every item to fit a body type. It is simpler than it sounds, all it needs is some "compression" and "stretching in some areas by using threshold/offset values, while using the borders of the image to determine where the tweaks need to be made .

Since the bodies are just as different as the bodies below them, what I have done is that on the first version some of the bodies are exactly the same but recoloured. As for the different body shapes and tweaking if items for them?

The math (used very loosely here) behind this notion is actually quite simple, considering I'm working with 2d images. Considering we can assume whatever "modification" in body shape is done to the original body x, we can just take the same vector quantization (to shift the pixels) and apply it to any arbitrary item y that fits the original body x and that should do the trick. Any needed tweaks from that due to noise/artifacts can be fixed by applying the density function of the original image y's colors on areas that have a color distribution out of the norm on the modified item y. As for patching areas that are left warped? That I haven't figured out and I don't know will that even be an issue until I experiment a bit.
I desperately want to see your code to do this all commented and such: want to learn. I think the differences between bodies is so small, I'm not sure you'll ever have warped shapes from stretching.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Custom Portraits

Post by King of Worms »

Hazelnut wrote: Sat Nov 16, 2019 12:23 pm I am constantly amazed at the skills and expertise people bring to this community. It's incredible. And always very interesting to read about even if I don't completely follow the intricacies. Nice work Sitrus. Hope the add equip command is doing what you need. Let me know if not.
Those commands are very handy, I just miss Magic weapons spawn :)
I think that one is complicated maybe because of the magic effects stats on the weapon. You can make all the same, any simple magical effect will do the trick. I need that especially to test the 1st person hand held magical weapons...

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Custom Portraits

Post by Hazelnut »

That never crossed my mind, will add an option for magic weapons. Does it need to be all materials?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Custom Portraits

Post by King of Worms »

Hazelnut wrote: Sat Nov 16, 2019 1:35 pm That never crossed my mind, will add an option for magic weapons. Does it need to be all materials?
Thanks a lot :) Would be better for all mats if possible

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Custom Portraits

Post by Hazelnut »

Done & PR submitted.

Code: Select all

add_all_equip magicWeapons
Enjoy all your shining weapons. :D
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply