Forum

Materials are change after deploy

15 February 2019 14:57
After creating the new project i have checked the HTML file in Project manager its show materials what i expect. But after deploy the project. the materials are totally changed,
I have attached sample files for your reference.
please advise us to how to maintain the materials quality.
15 February 2019 19:56
Looks like a cubemap is missing on the faulty example. It would be great if you could attach your project.zip (you create a project.zip of your project by exporting it, i.e. go to the B4W Project Manager -> Export Project(s)), or at least paste your browser console's output when you run the deployed project.
21 February 2019 07:44
Sorry for the late replay. i have attached project folder for your reference. pls advice as to solve the issue.
21 February 2019 10:02
As a general tip, when you run your projects, always have the browser console opened and look for errors. It reports this:
B4W ERROR: could not load image: ../../deploy/assets/material_library/additional_objects/carmodel_ao.jpg?v=15022019133418 b4w.simple.min.js:2:501
B4W ERROR: could not load image: ../../deploy/assets/material_library/metal/carpaint_mask.jpg?v=15022019133418 b4w.simple.min.js:2:501
B4W ERROR: could not load image: ../../deploy/assets/material_library/textures/cubemap_sharp.png?v=15022019133418 b4w.simple.min.js:2:501
B4W ERROR: could not load image: ../../deploy/assets/material_library/textures/ao_dirt_worn_masks.png?v=15022019133418 b4w.simple.min.js:2:501
B4W ERROR: could not load image: ../../../../blend4web_ce_17_04_1/blend4web_ce/deploy/assets/material_library/textures/ao_dirt_worn_masks.png?v=15022019133418
You have missing images in the deployed project. These images are linked in your .blend file to folders outside of your project folder ("../../"). They will work as long as you work on your project within the B4W environment, but after deployment, they cannot be found anymore because the deployed project is NOT within the B4W folders and thus "../../" does not point to them anymore.

Solution 1:

Copy the above images from where they are to the assets folder of your own project. Then you need to go through your .blend file and update the source of every single of those images so that it points to the copies you just made in your own project's asset folder. Once all images come from your own project's asset folder, nothing should be missing after deployment.

Solution 2:

Create the project anew under a new name and this time instruct B4W to copy the material library to your project folder automatically. This can be done by checking a box "Use Material Library". Read the project creation part of the manual. It says:
6. Use Material Library. Blend files of the material library will be copied to the project directory “projects/project_name/blender”, while the asset files will be copied to “projects/project_name/assets” folder.
So now you can append materials from the same folder as your .blend file and the assets will already be in your assets folder.



As a general rule, when you work on your projects, make sure from the start that all the media sources are in your project's assets folder.
21 February 2019 10:23
Also, you must re-EXPORT the scene in Blender after every change you make (such as changing the image files), otherwise changes will not show in your project. (This is something people sometimes forget because when they use "Fast Preview", changes will show readily without clicking on "export".)
22 February 2019 11:06
I tried to solution one & two, But i did not get result.
I just Pack the images (File>External data> Automatically Pack into.blend), Now its working.
Thanks
22 February 2019 11:08
Another one doubt. My Deploy file open only in Firefox, how to open in other browsers(IE, chrome).
22 February 2019 19:04
Reply to post of user GAS2_Digitization
My Deploy file open only in Firefox, how to open in other browsers(IE, chrome).
Do you mean it only works in Firefox or do you literally mean you don't know how to open it in other browsers (you right-click it and then select the program to open with). If it doesn't work properly, you need to attach it again.
25 February 2019 08:35
we got error in internet explorer and chrome which is attached for your reference.
25 February 2019 09:43
I've never seen this error before, but it is connected to loading assets. It can be pinpointed to the assets.js module. You would have to attach the project.zip or link to the web page where this project is deployed for further help.
 
Please register or log in to leave a reply.