The model must be in the child hierarchy of dungeon gameoject (wich holds the component DaggerfalDungeon). Can you check if this is true for the models you have tested?
[Solved] How are dungeon texture variations implemented?
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: How are dungeon texture variations implemented?
- Attachments
-
- dungeon_example.jpeg (126.75 KiB) Viewed 1738 times
- XJDHDR
- Posts: 258
- Joined: Thu Jan 10, 2019 5:15 pm
- Location: New Zealand
- Contact:
Re: How are dungeon texture variations implemented?
I can confirm that this is the case. My test procedure was to start the game in the editor then load a save where my character was standing near the model in question.
Maybe it will help if I include a copy of the model I am working on.
- Attachments
-
- Daggerfall Unity editor screenshot.png (482.81 KiB) Viewed 1723 times
My DF Unity mods:
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
- XJDHDR
- Posts: 258
- Joined: Thu Jan 10, 2019 5:15 pm
- Location: New Zealand
- Contact:
Re: How are dungeon texture variations implemented?
I'm not sure if this helps but I just noticed that the model in your image with the Dungeon Texture Table feature working is a new object whereas all of the models that I'm working on in my screenshots are not new objects. They are model replacements for objects that are already in the game.
Maybe that could be the reason it isn't working in my case?
Maybe that could be the reason it isn't working in my case?
My DF Unity mods:
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: How are dungeon texture variations implemented?
Yes, the issue is probably the way imported objects are parented to dungeon. Dungeon component must be available in hierarchy when object parent changes, but apparently this is not the case here. I'll see what i can do.XJDHDR wrote: ↑Mon Aug 10, 2020 11:00 pm I'm not sure if this helps but I just noticed that the model in your image with the Dungeon Texture Table feature working is a new object whereas all of the models that I'm working on in my screenshots are not new objects. They are model replacements for objects that are already in the game.
Maybe that could be the reason it isn't working in my case?
- XJDHDR
- Posts: 258
- Joined: Thu Jan 10, 2019 5:15 pm
- Location: New Zealand
- Contact:
Re: How are dungeon texture variations implemented?
I just took a look at the latest version of TheLacus' pull request and it's better than before.
The door that is shown in my OP now displays the correct texture: However, the tower models in my OP are still purple: If it helps, I'll include a copy of the models I tested that are still missing textures and a save game you can use to test:
The door that is shown in my OP now displays the correct texture: However, the tower models in my OP are still purple: If it helps, I'll include a copy of the models I tested that are still missing textures and a save game you can use to test:
My DF Unity mods:
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
- TheLacus
- Posts: 1305
- Joined: Wed Sep 14, 2016 6:22 pm
Re: How are dungeon texture variations implemented?
Thank you for save and models for testing.
It didn't work in your second example because RuntimeMaterials component isn't on root of prefab but on a child. I think this is a valid use case, so i reworked assignment of texture table to be event based. This will ensure it also works if is not on root of prefab, without performance implications for classic layout or custom prefabs without this component (unlike alternatives like GetComponentInChildren).
It didn't work in your second example because RuntimeMaterials component isn't on root of prefab but on a child. I think this is a valid use case, so i reworked assignment of texture table to be event based. This will ensure it also works if is not on root of prefab, without performance implications for classic layout or custom prefabs without this component (unlike alternatives like GetComponentInChildren).
- XJDHDR
- Posts: 258
- Joined: Thu Jan 10, 2019 5:15 pm
- Location: New Zealand
- Contact:
Re: How are dungeon texture variations implemented?
And thank you very much for working on this. I'll give your new code a try when I get home tonight.
The reason my second set of prefabs were set up that way was because my models were originally OBJs. When you generate prefabs from one, the prefab gets that child attached. This was not the case with my door prefab because the model was an FBX, which does not create children.
The reason my second set of prefabs were set up that way was because my models were originally OBJs. When you generate prefabs from one, the prefab gets that child attached. This was not the case with my door prefab because the model was an FBX, which does not create children.
My DF Unity mods:
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
- XJDHDR
- Posts: 258
- Joined: Thu Jan 10, 2019 5:15 pm
- Location: New Zealand
- Contact:
Re: How are dungeon texture variations implemented?
Took longer than I thought but I've managed to test the tower models and they are now working. I've got a bunch of other models I need to test that also need this dungeon texture table feature but I think this commit is probably ready to be merged into DFU. If this can happen before the .26 release, even better.
My DF Unity mods:
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/
Unofficial Block, Location and Model Fixes
Skip Intro Video
My other creations and essays:
https://xjdhdr.gitlab.io/