Page 1 of 1

no indoor transition and skybox in web deployment

Posted: Sun Mar 22, 2015 6:51 pm
by ryanroundhouse
I followed the tutorial on the site (great tutorials. So many open source projects lack something like this) in order to have an explorable aldingwall (city in daggerfall province). I got the sky box and transition from indoor to outdoor working when the game is built targeting windows, but when I targeted a web compile, it didn't have either of these features. Am I missing something obvious here? Do I have to embed some of these resources somehow for the web version?

Re: no indoor transition and skybox in web deployment

Posted: Sun Mar 22, 2015 8:14 pm
by LypyL
You need to take some extra steps to build for the webplayer as it can't access your filesystem.

Add a new directory in the Assets directory of your project, and name it Resources.

From the Arena2 directory of your Daggerfall install, you're going to need to get:

arch3d.bsa, blocks.bsa, maps.bsa, woods.wld, politic.pak, climate.pak, all texture files, all sky files, art_pal.pal, dagger.snd, monster.bsa, any weapons .cif used, all SKY.DAT files. all .PAL .COL files. All NITE.IMG files.

I think that's all of them anyways! You'll probably want to copy them to a temporary directory and not directly into Unity, as they need to be renamed.

Basically, all the files need to be renamed to have .bytes appended to the end - WEAPO101.CIF becomes WEAPO101.CIF.bytes, and TEXTURE.169 becomes TEXTURE.169.bytes for example

If you're on Windows, you can open up a command prompt, navigate to the directory, and do ren *.* *.*.bytes (make sure you're in the correct directory...you don't want to mass rename the files on your system drive or something)

Then copy all of the renamed files into the Resources directory you made in your unity project.

Re: no indoor transition and skybox in web deployment

Posted: Mon Mar 23, 2015 6:21 am
by Interkarma
Thank you for fielding that one LypyL. I say this every time, but I really do need a tutorial (and possibly a utility) to help people with creating standalone builds.

ryanroundhouse, just let us know if you still have problems. One of us is bound to be around to help.

Re: no indoor transition and skybox in web deployment

Posted: Mon Mar 23, 2015 2:20 pm
by ryanroundhouse
Thanks boys, I'll let you know when I have the time to try it out.

Re: no indoor transition and skybox in web deployment

Posted: Sat Mar 28, 2015 2:04 am
by ryanroundhouse
Is there any easy way you guys would suggest to figure out which of these files I need? I'd rather not have to bundle all files as that'd make the size requirement gigantic.

Re: no indoor transition and skybox in web deployment

Posted: Sat Mar 28, 2015 8:33 am
by Interkarma
I've uploaded an archive of my Resources folder for you. You only need to drop this in when creating a final standalone build. For general development you can just use your local Arena2 folder.

http://www.dfworkshop.net/static_files/ ... 20Files.7z

I agree the size can be a little large (around 490MB + your stuff uncompressed). Fortunately the Unity Web Build uses maximum LZMA compression so the whole build will only be around 41MB + your stuff. It compresses really well.

You may also need to tell Unity to include shaders in your build. This is done from "Always Included Shaders" in Edit > Project Settings > Graphics. Here are the shaders I always included in my build. If you have any custom shaders, add them to the list.

Daggerfall/BillboardBatch/TransparentCutout
Daggerfall/BillboardBatch/TransparentCutoutForceForward
Daggerfall/TerrainTilemap
Daggerfall/Tilemap
Nature/Terrain/Diffuse (this is a Unity shader, but needed for terrains).
Self-Illumin/Diffuse
Transparent/Diffuse
Unlit/Transparent
Unlit/Texture

Let me know if you experience any further troubles creating a standalone web build. I'm definitely going to write up a tutorial for this in line with the 1.3 release.

Re: no indoor transition and skybox in web deployment

Posted: Mon Mar 30, 2015 12:06 am
by ryanroundhouse
Thanks Interkarma!