Procedural texturing: New work method into XPlore

Check here the latest news about the project and its forums
Post Reply
User avatar
keltwookie
Site Admin
Posts: 134
Joined: Mon Apr 17, 2017 6:42 am
Location: Kashyyyk
Contact:

Procedural texturing: New work method into XPlore

Post by keltwookie » Sun Nov 19, 2017 10:17 pm

Hello all !


I know, no news since weeks but they were good reasons. Indeed, by looking for a way to save time, I discoverd a new way ,for me, to manage textures. Into the former method , I had to realize an UV Map first with seams on the model, then colorizing or applyiing pictures, a long process as the applied pictures does not fit all the time, fortunately, it is relatively easy to do and manage them with Blender.

But apparently, the most modern game engines uses procedural, but what is it ?

Let’s start at the beginnning :

I had difficulties to load pictures to build a cubemap and a skybox with one of the latest Alpha builds (I know, it is an Alpha, but I couldn(t resist). I so asked on Godot Developers forums and here’s the answers I had from Calinou, one of the main developers of the engine :
Cubemap skies (skyboxes) are not supported in Godot 3, you should use panorama skies instead (or procedural skies). Therefore, you cannot use cubemap resource files in Godot 3. This was done because panorama skies are simpler to implement in the engine, and are more popular among artists and developers today (compared to cubemaps).
Note that panorama skies should use HDR formats preferably, rather than low dynamic range images like JPEGs. You can find free (gratis and libre) HDRI skies on HDRI Haven.


« … (or procedural skies) ...»

The method consist to use shaders instead of pictures, by combing them, we can create lights, particular reflexions, color ramps, even little shapes without a single picture loaded.

To illustrate what I’m talking about, here are two suns recently implemented into XPlore :
*Note: The pictures could be a bit long to load given their resolution in Blender*

Alpha Centauri A : Yellow star – G2 type (just like our sun)
► Show Spoiler
Alpha Centauri B ; Orange dwarf – K1- V type (BTW, orange dwarves possesses interresting properties)
► Show Spoiler
Okay so, is there a real gain for a cumfortable use, not only for me, but also for future players ?

I so asked again if procedural texturing consume more resources than loading image, still Calinou answered :
No, as they are generated at load-time (Godot will generate the panorama texture when the sky changes, and if it never changes, it'll only be generated once, which does not impact the framerate). You can adjust their resolution in the ProceduralSky resource properties, the default value is a sensible default, there's little reason to change it

Quite clear !

So (anyone) stop me if I’m wrong, but we could reasonabily think that this method use less resources ( « ...as they are generated at load-time...»).

I experimented procedural few months ago by creating nozzle exhausts for a spacecraft, but at this time, I never realized that I can create a whole world environment without a single picture, or maybe just a few.
Let’s push this a little bit farther and it would be easy imaginating texturing the whole thing by using this method. So, characters/aliens/animals skins, plants, terrain, rocks, skies, clothes, ship hulls, skies, nebulae, suns, even HUDs and any user interfaces…Well : a-n-y-t-h-i-n-g !
Yeah, a lot of time saved : No more hours spent on the Internet to find free HD textures (or a lot less), no more tedious work with the Gimp (or a lot less) resizing, adapting resolutions, contrasts, colors, etc., all could be done directly into Blender, the jewel of this method is that you can see each modification in real time in a viewport. Nice , I do love flashy pictures ! :D

But hey, the final goal is not Blender but The Godot Engine, how this will it work ?

The informations I have don’t allow shader export from Blender to Godot via *.dae files (Collada), only textures and rigging. Fine and already not so bad. But there is also a shaders graphic interface on Godot (will be back for v3,1). By a way or another, I’m almost sure there is a way to "translate" Blender shaders for the game Engine. Of course, to add some specific shaders and/ or additional parameters, it will be maybe necessary in a first time to code a little bit, wether it be via scripting (GDScript) or hardcoding (C++?)...Not for me right now but who knows ? In any way, Godot Engine is evolving fast thanks to its community and for myself, no doubts that this engine will translate what I have in mind by a way or another.


….Will gave you more news once the first export tries done.



Comments and views ? … Feel free.
"Earth is the cradle of Humanity, but we don't leave in a cradle forever." Konstantin Tsiolkovsky (1857-1935)

Gunner
Posts: 13
Joined: Tue Apr 25, 2017 4:11 pm

Re: Procedural texturing: New work method into XPlore

Post by Gunner » Tue Nov 21, 2017 8:59 pm

Very interesting and the screen shots of AC are excellent

User avatar
keltwookie
Site Admin
Posts: 134
Joined: Mon Apr 17, 2017 6:42 am
Location: Kashyyyk
Contact:

Re: Procedural texturing: New work method into XPlore

Post by keltwookie » Sat Dec 16, 2017 12:41 am

Many thanks Gunner

And really sorry for late reply but I was very busy with the tutorials here

Well, well, well,

After searching hours how importing the nebulae shaders I recently made from Blender into Godot game engine, I suddenly realized that I had the wrong approach (yeah, you could tell me I’m an idiot). Indeed, I learned that Blender can naturally export EXR files which seems be actual HDRIs (High Dynamic Range images) . The big advantage is that I don’t need to do tons of tweaks whether it be into Blender or into Godot. So, and of course if I’m not wrong, the only thing I apparently have to do is renderings from the nebulae and save them as EXR files.

If my assertions are correct, it’s truly Christmas time !
"Earth is the cradle of Humanity, but we don't leave in a cradle forever." Konstantin Tsiolkovsky (1857-1935)

Post Reply