Modding Tutorials: Asset-Injection

Discuss modding questions and implementation details.
Post Reply
User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by Interkarma »

This is a limitation of Daggerfall Modelling, but you can do this with Daggerfall Tools for Unity. You just need to disable one of the optimisations first.

Before importing your block into a scene with DFTFU, disable Batch Billboards like below:
Spoiler!
no-batch-billboard.PNG
no-batch-billboard.PNG (31.46 KiB) Viewed 8192 times
Then import your block using the Importer as usual. This will create standalone billboards with visible properties for each in the Inspector.

Hope that helps! Let me know if any more information needed.

User avatar
jman0war
Posts: 315
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by jman0war »

Replacing trees is still a mystery.
I worked on that 510_25-0 tree some more and replaced it with a new one (same dimensions, same file name) but now it won't display.

Yesterday it worked when i had both 510_25-0 and 504_25-0 in the Textures dir.
It actually started working when i had 510_25-0, fired up Unity, confirmed it didn't work.
Then i copied in same tree called it 504_25-0 and then it worked (both 510 and 504 in Textures dir)

But today replacing both, or either of them is not working.
Vanilla textures being displayed.

Running Unity as administrator.
Find my Vibrant Terrain Flats mod at Nexusmods: https://www.nexusmods.com/daggerfalluni ... ?tab=files

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by TheLacus »

Do not think too much about it, there is clearly an issue with custom billboards related to the switching of climates. I am going to work on it later on this week when I can find the time.

User avatar
jman0war
Posts: 315
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by jman0war »

Hope you guys don't start hating me for spamming the forum.

New 25 tree didn't work.

Copied-in old 25 tree files (both 510 and 504) and it worked, trees show in game.
Removed the 504 tree, didn't work.
Copied-in the 504 tree and removed the 510 tree, didn't work.
Copied in both and it works again.

So it seems it needs both trees.

The new 25 tree has the same dim, but are a tiny bit larger:
356kb vs 364kb
Orig vanilla png is 3.86kb
But i couldn't get them to show up, using just the 504, just the 510, or both.

So i made new tree smaller : 344kb
Tried just 510, didn't work.
Tried just 504, didn't work.
Both trees in, it works.
Image
Find my Vibrant Terrain Flats mod at Nexusmods: https://www.nexusmods.com/daggerfalluni ... ?tab=files

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by Nystul »

i also tested (for the 510_12-0 resp. 504_12-0) - yes it needs both to show up in that location - very strange. feels like a bug to me. If we can find out what is going on that would be awesome.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by TheLacus »

My understanding is that Temperate woodland (504) is used as the default archive and only later the material is updated to reflect the correct climate and season. This means, to replace a tree from a different climate you need both this one and the corresponding from archive 504. I'm seing what i can do.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by TheLacus »

jman0war wrote: In Dragontail mnts i found 1 of my trees in town.
However the image is squished so evidently i have to maintain the height and width proportions?
But this would make it difficult to keep to the usual 128/256/512/1024 dimensions.
Billboards have the same size as in the vanilla game, so yes, they need to have the same proportions.
Alternatively, you can change the size of the mesh like i wrote in the first post.
It is currently possible to replace billboards (sprites) textures only in interiors, dungeons and fixed locations (towns). Texture replacement for billboards support animations (you can have as many frames as you want, even more or less than vanilla) and emission maps.

For a simple texture swap, only texture files are needed. They will have the same size as vanilla, regardless of resolution.
If you want to customize the size, for example because your sprite has different proportions, you can do so with an xml file. All frames share the same file.

Archive_Record-0.xml

Code: Select all

<?xml version="1.0"?>
<info>
<scaleX>1</scaleX>
<scaleY>1</scaleY>
</info>
(1:1) means the same size as vanilla, (1:2) has a double height, (0.5:1) is half as wide.
I was thinking about this. What if we let texture artists define the uv of the plane? They should indicate only one vertex and the others woud be calculated symmetrically. Does anyone have other ideas on how to address this?
UV.jpg
UV.jpg (10.58 KiB) Viewed 8083 times

User avatar
NikitaTheTanner
Posts: 366
Joined: Sun Oct 18, 2015 7:57 pm

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by NikitaTheTanner »

Go to daggerfall-unity-master\Assets\Resources\Models and create a subfolder. Rename it with the ID of the model, then create another folder inside this one and place the .xfb file inside.
I might be a bit daft, since I am new to Unity development and such, but really want to learn and I am a bit stumbled by this instruction.

What is "daggerfall-unity-master"? I have cloned the project from GitHub and I only have "daggerfall-unity" folder, is it the same or am I missing something? It has Assets and Resources, but no Models folder. Should I create one? And about that model ID, I suspect I need to find the model in Daggerfall modelling, right?

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by TheLacus »

Everything you said is correct. :)

The folder is called daggerfall-unity-master if you download it as a zip but it the same as daggerfall-unity, sorry for the confusion. I confirm the modelID is the number you see in daggerfall modelling.

User avatar
jman0war
Posts: 315
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by jman0war »

TheLacus wrote:
I was thinking about this. What if we let texture artists define the uv of the plane? They should indicate only one vertex and the others woud be calculated symmetrically. Does anyone have other ideas on how to address this?
Would that mean replacing the vanilla sprites with a mesh that i create with PNG uv mapped?

Also, i wasn't using an xml file along with my PNG files, maybe i should be?
Find my Vibrant Terrain Flats mod at Nexusmods: https://www.nexusmods.com/daggerfalluni ... ?tab=files

Post Reply