Page 1 of 22

Mesh Replacement Test

Posted: Fri Apr 29, 2016 11:04 pm
by Uncanny_Valley
A small add-on that I been working on, with the goal to find an easy way to replace existing meshes (together with material and textures) with new ones.

This is a test version, a proof of concept. Right now I'm trying to find a better way to integrate it with the existing DFTFU code, as well as looking at alternative and more effective methods to load the replacements, even on a built version of DFTFU.

What it does/how it works:
  • Meshes, materials and textures are placed in the Unity resource folder.
  • The replacement meshes are named according to the "id tag" of the original mesh that it replaces.
  • Support for multiple materials for each mesh through simple naming convention.
  • Textures are link to the materials.
  • Whenever a DFTFU tries to load a mesh from the original Daggerfall installation, it makes a check to se if a replacement exist, if true, it uses that one instead of the original.
  • I created a quick mesh and texture replacement for the wooden boxes in the game as an example
Enjoy!
Box_Example2.png
Box_Example2.png (173.75 KiB) Viewed 5260 times
Box_Example.png
Box_Example.png (178.25 KiB) Viewed 5260 times
The download link:
http://www.filedropper.com/meshreplacement

Re: Mesh Replacement Test

Posted: Fri Apr 29, 2016 11:13 pm
by Interkarma
Great work! Lots of promise for this.

Coincidentally, Lypyl has cooked up something that may be able to help: a runtime compiler that can inject external scripts. It's still in very early stages, but could be a perfect framework for this kind of mod. As an example, Lypyl was able to create a test of your birds mod that ran from an external script in StreamingAssets, rather than the one inside the build.

Seriously you guys. Daggerfall Unity is several times more awesome thanks to your efforts, and I appreciate all of it.

Re: Mesh Replacement Test

Posted: Fri Apr 29, 2016 11:53 pm
by LypyL
Nice! You could expand it if you wanted to replace flats with meshes as well! Proper 3d trees, lights etc. I messed around with that a long time ago (when you could only load cities and dungeons) and it worked pretty well.

Regardless, it's great to see that someone is working on this!

Re: Mesh Replacement Test

Posted: Sat Apr 30, 2016 2:17 am
by Jay_H
Interkarma wrote:Seriously you guys. Daggerfall Unity is several times more awesome thanks to your efforts, and I appreciate all of it.
I just wanted to repeat this.

Re: Mesh Replacement Test

Posted: Sat Apr 30, 2016 9:40 am
by Biboran
Totaly Amazing! Someone plz replace ugly 3d knights statues!

Re: Mesh Replacement Test

Posted: Sat Apr 30, 2016 8:01 pm
by Narf the Mouse
Hmm...Instead of replacing resources by naming them exactly, why not use a text file? That way, replacements could be toggled more easily. Would probably make mods easier, too. Plus, no need to drop mod files everywhere. Maybe a text format something like:

Original Texture Name: Data\Mod Directory\Textures\Replacement Texture Name.jpg

Hopefully this post makes sense. Not sure I'm articulating it well.

Re: Mesh Replacement Test

Posted: Sun May 22, 2016 8:54 pm
by Uncanny_Valley
Hi, everyone!

I updated my mesh replacement script. The biggest chance is that it now supports replacing flats (2D sprites) with 3D models.

For the flats I'm also trying a different approach, replacing them with unity Game Objects rather than pure meshes, this allows me to basically do anything with the object including adding scripted behavior. In my lamp example, I added a light source and a particle effect.

I been practicing my 3D and texture skills, and I made replacements for the beds (3 different variations) as well as replacement for one of many ceiling lamps (this used to be a flat).

BedAndLight1.jpg
BedAndLight1.jpg (154.28 KiB) Viewed 5036 times
BedAndLight2.jpg
BedAndLight2.jpg (164.43 KiB) Viewed 5036 times

The other replaced beds.
Bed2.jpg
Bed2.jpg (158.8 KiB) Viewed 5036 times
Download Link to the new version:
http://www.filedropper.com/meshreplacement101

Re: Mesh Replacement Test

Posted: Mon May 23, 2016 12:52 am
by Biboran
Amazing job! I prefer low poly version without smoothing. You can add some details and new texture, but not to high. For me best graphics replace for daggerfall is like in games like Thief 1-2 or hexen 2 etc. Image Image
More advanced graphics will stand out from overall picture if you know what I mean.
Anyway, big thanks for your work. Can't wait new updates!

Re: Mesh Replacement Test

Posted: Mon May 23, 2016 7:15 am
by Jay_H
:shock:

We've been getting the question on here quite frequently about whether 2D sprites can be replaced by 3D models. If this won't do it already, I imagine it's quite close. Two buckets of applause for your work.

Re: Mesh Replacement Test

Posted: Mon May 23, 2016 8:08 am
by Nystul
wow this is absolutely amazing! I love the screenshot with the replaced light source casting shadows to the ceiling!
I would love to see this in DFTFU soon! :) <3