Skip to content

jknightdoeswork/godot-utils-and-other

 
 

Repository files navigation

update 2019 (actual in 2020)

gitlab mirror https://gitlab.com/danilw, untill I can update github repo I will (depends of github rules(region block) updates based on U.S. laws)

godot-utils-and-other

what is it random(mosly some very broken demos, and very unusable utils) code I write using Godot. I do not recoment use this code for learning.

new 2020:


graphic_demo_3d using simple custom shaders in Godot 3.2.1, like Area lights, all used external-code/logic linked in each shader, if used. Used Godot 3.2.1 stable, without modifications.

Used two models with animations from sketchfab, links in USED_ASSETS_LINKS.md

try it live(WebGL2) or download on itch click demo link

Video youtube link

Godot has bug with EXR/half_float, in WebGL2 build.

To avoid it - edit scene Area lights2, mesh floor its material, remove ltc_mat, and ltc_max linked textures. Then edit floor.gd script on same mesh, uncomment line 20 load_from_data_v2()

License - my code do not have any licence, use it as you wish. External used resource linked in each shader if used. Some of shaders and two character models has CC non commercial license.

gda1 gda2


Volumetric_Lights GLES2 Volumetric lights for Godot 3, very minimal example. Shader logic do sample depth from light source, in main-camera view. Shader not very hight cost. Shader can use 16 or 32 sample steps. Used unmodified Godot 3.2-stable.

Video youtube link

links Live web build (WebGL2/GLES3), Win64 GLES2, Win64 GLES3

WebGL GLES2 this project does not work in GLES2-Web build, because WebGL do not allow write to depth. I build it in GLES3(WebGL2) Godot web-build.

AMD GLES2 bug if you see this(image link) then you need use GLES3 only, bugreport to Godot, bugreport to AMD.

Licence: Volumetric_Lights code, include shaders do not have any Licence. No licence. Use it as you wish.

to remove Disk behind objects read line 57 in shaders/vulume_lights.shader and set depth_mult value to 10 if you need. This Volumetric light good if you put it inside of something, like box or sphere, light from flat objects does have limitations.


portals_panorama GLES2 scene with six very simple procedural panorama for godot. Shader source code in panorama/shaders folder.

Video youtube link

links Live web build, Win64, Linux64

Support: Godot 3.1, Godot 3.2, GLES2 or GLES3. Used official Godot build, nothing else.

How yo use in your project: create MeshInstance, mesh Sphere, in mesh check flip faces, create shader material, in shader code copy-paste any of *.shader code form this project. (for advanced use look this project source)

Portals they are bad, they exist only for this demo-scene. Portals rendered with huge-overhead because Light Cull Mask not implemented in Godot 3.x versions.

Used external resources: I have use external resources, list of used 3d models, and original shader-source linked in each *.shader file.

Licence - my code do not have license, use as you wish. Used some external shaders, that has CC-NonCommercial license. Check linked resource in each shader linked used resource.


old 2019:


flat-maze demo base on particle collision, that show more complex collisions. link to repo https://github.com/danilw/flat-maze playable web version https://danilw.itch.io/flat-maze-web

Video youtube link


particle_self_collision very simple GPU collision for thousands Indexed-particles, each particle with own index and other unique data, on GLES3/WebGL2, using Godot. live(web) demo link , or download for Win64(exe)

this is GLSL-only logic, example on shadertoy https://www.shadertoy.com/view/tstSz7

Video youtube link

Building: you need rebuild Godot with enabled GL_RGBA32F suport, read this page there building howto


Menu_2DGI rendering static textures and use them as menu textures, include render and examples. To edit max number of shapes (is 5) edit const max_elems in scene.gd, and int max_elems in 2dGI.shader. (used default Godot 3.1.1)

How to use watch video.

Web version, live Examples: Smooth color example. Minimal examples 1 2.

Download bin:Render for Windows or Linux. Examples example 1, 2, 3


e-ani link to repo with source code https://github.com/danilw/e-ani playable version download from https://danilw.itch.io/e-ani


a_rel_bw_game Warning: code very bad! || Using lots of particles in Godot, in small demo-game. To build this project you need build Godot with module futari-addon (google it(gitlab) ot use this link ) Binary versions: win64 linux64 live/web(work only in Firefox reason) (native builds have Mipmap On, web build off)


Dynamic sky and reflection two shaders for sky and reflection video, live link and windows version

mipmap forced bug(Godot 3.2) to fix it and have sky as panorama, add iChannel.flags=Texture.FLAG_FILTER in scripts/set_uniforms.gd (line 8) after var iChannel=sky_b.get_viewport().get_texture()

Environment bug(on first load): Godot has bug with removing Default Environment after re-import Assets(project is work if launch, it does not work only in Godot editor), set Project->Projet Setting->Rendering->Environment->Default Environment select file default_env.tres

GLES2 version of this Sky only web build GLES2 link for test download source project Dyn_Sky_only_GLES2.zip


new small:

2d_ex_physics simply(100 lines of code) circle collision with gravity on GDScript, from my old project, check video and live_web

2d explossion effects video src1 src2 live1 live2


old:

Godot_shadertoy very simple "Shadertoy logic to Godot" video, source repo

Cubemap to panorama convertor live link

Godot-particles-collision unfinished particle collision shader for Godot source repo

Graphic

graphic_demo_3d video(click)

graphic_demo_3d

Volumetric_Lights video pp

portals_panorama video pp

Particle-collision-demo (flat-maze game) video: flat_maze

Menu_2DGI video(click)

Menu_2DGI

e-ani video

e-ani

a_rel_bw_game video

a_rel_bw_game

Dynamic sky and reflection video

dyn

About

random code that I made/use for godot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • GDScript 77.9%
  • GLSL 22.0%
  • ShaderLab 0.1%