- Edited
Disclaimer: This first part of a series of tutorials is firstly made for pure beginners. More experienced users could find it boring.
What follows is supposed to be the next step of another series of tutorials in progress for Blender (available here), the textures and materials will so be often realized with the procedural method using Cycles shaders. The final purpose would be of course to import all the assets into Godot.
A few explanations : Except for the background, we will need different maps to integrate colours for each object into Godot. The importation of the Cycles shaders to the engine is not supported for now (maybe planned for future versions, see Roadmap changes here)but it is possible to get around this. I explain: If Blender does not export Cycles materials to Godot, Godot will do the needed manipulations to translate. But for it to work, we must first bake the maps one by one into Blender, and this will be the obtained images (diffuse map, normal map, etc.) which will be imported into Godot as textures. We could think that in fact, all this could be useless as we still will load images and not shaders into Godot. If of course our purpose is still to favour the use of shaders into our project. Yes… But no. Indeed an option into Godot allow the transformation of Spatial Materials (the images) to Shader Materials in just one click (I’ll talk about this later) ! From the first tests made and having saved both versions of the materials, they are appearing identical on screen. The bonus is that the one or the other are still editable inside Godot, so, with a bit of practice and by knowing how manipulate the numerous options, it is reasonable to think that we could perfectly reproduce the renderings of the Cycles shaders, furthermore, and from what I have seen when I quickly browsed a first time the edition parameters, effects such as glare or blur appears also perfectly reproducible into the resources options.
Now that we are done about the general explanations, let’s see more precisely the method I used and for a first part:
Make a HDRI (High Dynamic Range Image) into Blender as background.
To create a HDRI into Blender, I followed the method described by gandalf3 on Blender Stack Exchange : Create HDR map from render?
Note that It is said :
If you select Cycles as the default renderer, and save as an EXR, your saved file will already be high dynamic range. Important Note: Make sure the 3D views are set as perspective into Blender while making the needed rendering if procedural materials used. If not , it won’t properly display the background, and so the result file would not work.
Into this part of another tutorial, I was describing a method to create a nebula wirh Cycles materials. This is one of the obtained environments I will use here as work base for the following chapter.
Set a Panorama Sky into Godot.
Open Godot and create a new project (or edit the one you are currently working on)
1) Add a WoldEnvironment node. 2) Into the Inspector, create a New Environment.
!
3) Select Edit 4) Go to Background → Mode, then select Sky 5) Into Sky, select : New PanoramaSky 6). Select Edit
!
7) Drag and drop the *.exr file previously created (we have of course moved this file into the work space of the project) to the field noted as "null"
!
Save the resource as well as the scene Done !
8) In my case, the rendering appeared too much bright, if you experienced the same thing, you can easily modify the contrast and brightness parameters : Go back into the resource edition panel → Adjustement→ Activate, and modify the needed parameters, the changes will be displayed in real-time into the viewport. Note: For a detailed list of the available options see Environment and Post-Processing into the Godot Documentation. Don’t forget to save both resource and scene after each modification.
!
Next: Importing objects and their textures