For those who haven't read the previous parts, here's a demo video.
In this series of tutorials, we will make an interactive interior presentation that can be viewed in real time through a web browser.
Access to materials, such as: models in the "FBX" format, baked textures and more, you can get by subscribing to Patreon.
Patreon - 3DGROUND
This is what the script looks like when run in 3Ds Max.
Of course, you can export manually, but to save time, it is convenient to use the Export2Playcanvas script.
- Automatically configure "FBX" exports to include "EmbedMedia"
- Remove current object materials and create a new "Standard" material with special settings
- Automatically adding textures to the "FBX" package
- Removing unnecessary "IDs" objects
- Moving the second Unwrap scan channel to the first and then removing the second channel
- Collapsing all stacks
- Quick export to "FBX"
- Proper naming of export files
Important!Select the model, click "Export Selected". Models are exported one at a time. After export, a "FBX" file will be created in the "Textures Path" folder.
For each model, a texture with the name of the model and the postfix "Corona_Beauty" must be baked!
If the texture for the model is not found during export, you will not be able to export it. You will be notified about this by a notification with an error.
Under "the hood" the following actions take place in the script:
I recommend exporting the models one at a time and then adding them to the Playcanvas scene right away. Thus, you can immediately see if a mistake was made at any of the stages.
- For "FBX" the "EmbedMedia" option is enabled, which allows you to avoid manually adding textures to Playcanvas
- The "Standard" material is created, since Playcanvas understands some of its settings
- An automatically baked texture is added to the "Standard" material, which the script finds itself
- The baked texture is added to the "Self-Illumination" slot and the material will not need to be changed in the Playcanvas if it has no glare, there will be no lighting in the Playcanvas scene.
- Extra Unwrap channels are removed, to save weight "FBX" files
- Extra "Material Id" are removed >
- All modifier stacks are collapsed
- The correct "FBX" names are assigned and the prefix "SM_" is added
- Files are exported in "silent" mode, without pop-up windows
A new scene is needed in order not to spoil the current one.
For almost all models, export will occur through a script with default settings.
I have objects in the scene, these are "TV", "Oven" and "GlassDoors", which require "Multimaterial" and when exporting them, you need to enable the "Two Material Ids" checkbox in the script . This will create a "Multimaterial", in the first slot there will be a material with our baked texture, and in the second slot, just a regular material, which will be replaced with glass in the Playcanvas.
Since, in my case, more than two "IDs" were not needed for materials, I implemented exactly this functionality in the script.
I started exporting from walls, ceilings and windows. As described above, select the model, press "Export Selected". Drag the exported "FBX" to the "Assets" panel in the "models" folder.
I created a separate "Entity" named "Apartment" and started adding models.
To do this, select "Walls", "Podium", "Cabinet" and "ConcreteFloor", add the components "RigidBody" and "Collision" to them.
There's only one problem left, we can't climb stairs since our "Player" can only move on flat ground.
I created a "Plane" in 3Ds Max like in the picture below, this is the sloping surface on which the "Player" will "slip".
Exported the problematic objects to Playcanvas again, after deleting the old ones.
In the next part, we will come to grips with the materials.
Go To Lesson Interactive presentation of SVOYA interior (WebGL/PlayCanvas). Part 7.
Go To Lesson Interactive presentation of SVOYA interior (WebGL/PlayCanvas). Part 5.