DitzyNinja's Godojo
DitzyNinja's Godojo
  • Видео 22
  • Просмотров 301 122
Calculating normals on the GPU for procedural terrain
Only 6 months later...
How to calculate normals on a displaced plane using a spatial shader in Godot 4. This video will show you to do this using the plane's vertices or using pixels from a height map texture.
This video builds on two previous videos, but they are not required to understand what is going in this here.
ruclips.net/video/Hgv9iAdazKg/видео.html
ruclips.net/video/jDM0m4WuBAg/видео.html
Normal Vector to Normalmap pixel function:
vec3 to_normalmap(vec3 n){
n*=vec3(1.0,1.0,-1.0);
n = n/2.0+0.5;
n = vec3(n.x,n.z,n.y);
return n;
}
Просмотров: 7 188

Видео

Massive Infinite Terrain that Generates Instantly Part 2: LOD & Mesh Stitching
Просмотров 8 тыс.2 года назад
0:00 Intro 0:34 Level of Detail 3:00 Stitching Mesh Seams PART 1 ruclips.net/video/Hgv9iAdazKg/видео.html STARTING PROJECT github.com/TheGodojo/Massive-Terrain-LOD-And-Stitching-STARTER.git COMPLETED PROJECT github.com/TheGodojo/Massive-Terrain-LOD-And-Stitching-COMPLETE.git
Massive Infinite TERRAIN that Generates INSTANTLY: Clipmap & Collisions
Просмотров 20 тыс.2 года назад
0:00 Intro 1:03 Clipmap 5:16 Collisons Part 2 ruclips.net/video/Hgv9iAdazKg/видео.html How to create terrain that easily gets over 15km of draw distance using spatial shaders (Collions too!) STARTER PROJECT github.com/TheGodojo/Instant-Massive-Infinite-Terrain-Clipmap-Collisions-STARTER.git github.com/TheGodojo/Instant-Massive-Infinite-Terrain-Clipmap-Collisions-STARTER/archive/refs/heads/main....
Global Shader Uniforms in Godot 4 Real Quick
Просмотров 5 тыс.2 года назад
A quick overview of how to use global uniforms in Godot 4.
Intro to Godot 4's RenderingDevice (Compute Shaders)
Просмотров 6 тыс.2 года назад
An introduction to using compute shaders to run your code on the GPU in Godot 4 with the Rendering Device
Hosting a Godot Server in the Cloud (AWS)
Просмотров 5 тыс.2 года назад
Dependencies Command: sudo yum install -y libXcursor libXinerama libXrandr-devel libXi mesa-libGL Server Project: github.com/TheGodojo/Cloud-Server.git Client Project: github.com/TheGodojo/Cloud-Client.git
Godot 4 Server with No Window/Rendering
Просмотров 10 тыс.2 года назад
How to run a headless server with Godot 4 STARTER PROJECT github.com/TheGodojo/Headless-Server-Starter.git COMPLETED PROJECT github.com/TheGodojo/Headless-Server-Starter.git
Godot 4 Dedicated Servers with Multiplayer Nodes and RPC
Просмотров 29 тыс.2 года назад
ORIGINAL PROJECTS (Clients) RPC Networking Demonstration github.com/TheGodojo/Godot-4-Networking-Demonstration-Complete.git Multiplayer Nodes github.com/TheGodojo/Multiplayer-Nodes-Complete.git STARTER SERVER PROJECTS RPC github.com/TheGodojo/Dedicated-Server-RPC-Server-Starter.git Multiplayer Nodes github.com/TheGodojo/Dedicated-Server-Multiplayer-Nodes-Starter.git
Evil Rounding in Shaders
Просмотров 4302 года назад
Evil Rounding in Shaders
Godot 4 First-Person Controller with 22 Lines of Code
Просмотров 18 тыс.2 года назад
A quick video on how to make a basic first-person character controller with horizontal movement, mouse look, and jumping. CODE: extends CharacterBody3D @export var speed = 10 @export var jump_velocity = 4.5 var look_sensitivity = ProjectSettings.get_setting("player/look_sensitivity") var gravity = ProjectSettings.get_setting("physics/3d/default_gravity") var velocity_y = 0 @onready var camera:C...
Godot 4's New Networking Nodes
Просмотров 21 тыс.2 года назад
A quick demonstration of the MultiplayerSpawner and MultiplayerSynchronizer Nodes. START PROJECT github.com/TheGodojo/Multiplayer-Nodes-Starter.git COMPLETED PROJECT github.com/TheGodojo/Multiplayer-Nodes-Complete.git
Godot Peer-to-Peer over the Internet (The easy way)
Просмотров 25 тыс.2 года назад
How to forward ports and retrieve a router's internet-facing IP address from GDScript
Quick Overview of Navigation in Godot 4 (Part 2)
Просмотров 2,9 тыс.2 года назад
I made a mistake in my last video! :( Bake from code Travel and enter costs Find the closest point on the map
Godot 4 Networking Demonstration
Просмотров 39 тыс.2 года назад
Set up a server and client. See how the @rpc annotation is used in Godot 4. Completed Project github.com/TheGodojo/Godot-4-Networking-Demonstration-Complete/archive/refs/heads/main.zip Starter Project
A Quick Overview of Networking in Godot 4
Просмотров 38 тыс.2 года назад
Learn the new syntax, the RPC implementation, and what parameters are used with @rpc
Quick Overview of Navigation in Godot 4 (Part 1)
Просмотров 13 тыс.2 года назад
Quick Overview of Navigation in Godot 4 (Part 1)
JUNIPER Devlog #1
Просмотров 3942 года назад
JUNIPER Devlog #1
Procedural Terrain - Blend Textures based on Slope and Height
Просмотров 10 тыс.2 года назад
Procedural Terrain - Blend Textures based on Slope and Height
Always Responsive Jumping and No More Sliding on Slopes in Godot 3D
Просмотров 3,7 тыс.2 года назад
Always Responsive Jumping and No More Sliding on Slopes in Godot 3D
Procedural Terrain Generation: Displacement & Collisions
Просмотров 15 тыс.2 года назад
Procedural Terrain Generation: Displacement & Collisions
Create Mesh with Code: ArrayMesh with Multiple Textures/Materials
Просмотров 8 тыс.2 года назад
Create Mesh with Code: ArrayMesh with Multiple Textures/Materials
Create Mesh with Code: ArrayMesh Basics
Просмотров 16 тыс.2 года назад
Create Mesh with Code: ArrayMesh Basics

Комментарии

  • @XX-jx4zw
    @XX-jx4zw День назад

    hate to necro this but the tut is still going strong in 4.3 just in case anyone cant get the project to stitch at all; you have to uncomment the two mix() functionblocks in the shadercode. its the part he refactored in minute 8:45

  • @YoIomaster
    @YoIomaster 24 дня назад

    Hey man! I am looking a suitable engine to create a 2D/2,5D Game with multiplayer functionality, I would love to have access to an engine that provides netcode presets since most of basic netcode is the same (create client/server/connect and sync. In Godot, do i have to do all those manually or does it provide a toolset that makes it somewhat easier? Regards.

  • @Lucas-gg9yb
    @Lucas-gg9yb Месяц назад

    Isn't gdscript too slow to this task? It won't take a huge hit in performance? Nice tutorial!

  • @Lucas-gg9yb
    @Lucas-gg9yb Месяц назад

    The grass in the start looks pretty different of what I am used to see, how are you achieving this result?

  • @pedronvitoriano
    @pedronvitoriano Месяц назад

    Bruh you saved me, I just subscribed after you saved me three times in a row. Never give up!

  • @jeremythibeault
    @jeremythibeault Месяц назад

    Hey, I really enjoyed this guide, it was quick and to the point. I read in another comment that you no longer make tutorials which is really sad but I hope it means you found something more fulfilling to do. Wishing you the best!

  • @bigmacbook
    @bigmacbook Месяц назад

    Best video! I was dreading trying making normals work in a shader without passing a normal map. Saving VRAM is huge! Thank you so much!

  • @themaydayman
    @themaydayman Месяц назад

    Amazing tutorials, absolute godsend, but I have a couple questions: What’s the advantage of having a separate project for the server, wouldn’t that make adding new networking features an extra hassle? Why not just add - server to the launch flags? Do the multiplayer nodes handle client prediction on their own?

  • @lord_toad
    @lord_toad Месяц назад

    This is what's called rounding bias. Rounding many numbers will not increase overall result. This is useful for statistics and economics. Few programming languages have this feature baked in. But yeah.. it's weird seeing this in shader language

  • @wainotiem
    @wainotiem Месяц назад

    would love if you could do this with GDscript

  • @helios7055
    @helios7055 Месяц назад

    Sorry if its an obvious question, but do you still need a server to make this work? Or it will be a direct connection between the 2 players?

  • @nick-glenn
    @nick-glenn Месяц назад

    Thanks for making a video and talking about this issue, sadly not enough people seem to be covering this... For future people coming across this video, you should be able to use `get_overlapping_bodies()` or `has_overlapping_bodies()` instead of appending needing to append items to a new array. However, one reason why you might want to use a new array is if you want to test the normal of the colliding surface as a filter to determine what is "ground". This is really useful in cases where you might have just walked off a ledge and you want to ignore the side of the ledge from being a considieration of being on the ground.

  • @artwork-studios
    @artwork-studios 2 месяца назад

    Ive been trying for so long and its that simple? Thanks so much!

  • @danbe9835
    @danbe9835 2 месяца назад

    i know this video is kinda old, but can you also make it run dedicated? like the host without a client ? e.g. for an simple and smal mmo?

  • @shaund.09
    @shaund.09 2 месяца назад

    ConfuzzledKatana says hi

  • @timmytheimpaler1750
    @timmytheimpaler1750 2 месяца назад

    can you update the code for 4.3? of maybe redo the tutorial for 4.3? im learning godot and this is super interesting thank you!

  • @HZ_Sai
    @HZ_Sai 2 месяца назад

    i have 0 ideas about gpus and RenderingDevice heck i still don't know how to make a ragdoll but i really want to make some good simulations in godot someday next year

  • @HZ_Sai
    @HZ_Sai 2 месяца назад

    ok . i understand all that .

  • @Crax1415
    @Crax1415 2 месяца назад

    Can we use delete port mapping in the exit_tree() function? It doesn't print anything for me so I'm worried the ports will stay open

  • @ThatGuyDownInThe
    @ThatGuyDownInThe 2 месяца назад

    I always find it so wild how in a year or twos time something like this can become entirely irrelevant, theres people in here praising it so obviously it's just the updates.

  • @dfunited1
    @dfunited1 2 месяца назад

    First, *thank you so much* for making this viewable on mobile. I think a lot of coding videos (especially for older languages) are meant to be watched on a 2nd monitor. Like there's some implicit expectations that programming is done at a desk. Second, this video is going to be so useful in a few weeks when I'm bashing my head into a brickwall trying to implement shaders.

    • @DaveLeCompte
      @DaveLeCompte 2 месяца назад

      could also be done on a laptop

  • @Baccatta
    @Baccatta 2 месяца назад

    Thanks, this was great and helped me a lot. If I may suggest an improvement: a link to GitHub to copy the final code would be great.

  • @mischaelrad6034
    @mischaelrad6034 2 месяца назад

    Really helpful man! Is see the effort and I love that. I really like the Godot community on RUclips!

  • @humanprobably
    @humanprobably 2 месяца назад

    how did you get grass to generate? i cant find anything on how to instance grass on procedural terrain like this

  • @smokedmeats5506
    @smokedmeats5506 3 месяца назад

    thank you so much for explaining the map_get_closest_point part and the RID, i was scratching my head for too long trying to figure out how i make my npc go to the closest point to the target if it's outside the navmesh area instead of just banging on the edge like it wants to be let it 🙏

  • @mouseroot8053
    @mouseroot8053 3 месяца назад

    the query_external_address part is kinda a golden egg, usually i have to use an http request to an ip service, this was nice to have as another way to get the external ip, once again godot makes things so simple.

  • @tibfox
    @tibfox 3 месяца назад

    I <3 this series and will immediatly watch the next part in a few minutes. As a sidenote: In godot 4.3 something is off with the stitching but I am not able to explain why and what to do to fix it :D I'm only starting to understand the shading and stitching code itself ( yes I am not as smart to understand it yet lol)

  • @satanasoreidoinferno5625
    @satanasoreidoinferno5625 3 месяца назад

    THANKSSSSSSSSSSSSSSSS

  • @jairoacosta8940
    @jairoacosta8940 3 месяца назад

    bro, you would think this basic stuff would be easyer to find. thanks

  • @ReadOnlyMAIN
    @ReadOnlyMAIN 3 месяца назад

    Hello, that was very interesting, I like your videos. (I hope the next ones will be posted soon as this one was posted a year ago 😅).

  • @tommytress77
    @tommytress77 4 месяца назад

    are you sick? you sound like the such

  • @sinbala698
    @sinbala698 4 месяца назад

    godot en decadenia , antes estaba mejor

  • @TokotokoYT
    @TokotokoYT 4 месяца назад

    Could someone tell me how I make the mesh visible in Editor, it's currently only visible in-game?

  • @chebgonaz
    @chebgonaz 4 месяца назад

    Fantastic video. Thanks

  • @zottden4970
    @zottden4970 4 месяца назад

    Hi, good video, but what are the server.pck and others files? how can i create them?

  • @castleclashbot5452
    @castleclashbot5452 4 месяца назад

    i have tried to do "hurt damage" animation with animation player to change material color... not work realy, all enemies get the animation, maybe you do a tutorial about this? maybe i didnt have understand how to synchronize correctly... but hp bar own hp and attack and movement worked fine... i am confused

  • @robertdeckard2136
    @robertdeckard2136 4 месяца назад

    subscribed because of your channel name

  • @snakesoul
    @snakesoul 5 месяцев назад

    In case you are watching this in 2024 or later (godot version 4.X or higher), here is the code updated: @tool extends StaticBody3D @export var SIZE: int = 64 @export var NOISE_AMPLITUDE = 16 @export var noise: FastNoiseLite = FastNoiseLite.new() func _ready(): generate_mesh() func generate_mesh(): print("generating mesh") var plane_mesh = PlaneMesh.new() plane_mesh.size = Vector2(SIZE,SIZE) plane_mesh.subdivide_depth = SIZE-1 plane_mesh.subdivide_width = SIZE-1 var surface_tool = SurfaceTool.new() surface_tool.create_from(plane_mesh, 0) var data = surface_tool.commit_to_arrays() var vertices = data[ArrayMesh.ARRAY_VERTEX] for i in vertices.size(): var vertex = vertices[i] vertices[i].y = noise.get_noise_2d(vertex.x, vertex.z) * NOISE_AMPLITUDE data[ArrayMesh.ARRAY_VERTEX] = vertices var array_mesh = ArrayMesh.new() array_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, data) surface_tool.create_from(array_mesh, 0) surface_tool.generate_normals() $MeshInstance3D.mesh = surface_tool.commit() $CollisionShape3D.shape = array_mesh.create_trimesh_shape()

  • @FriskDreemurr66669
    @FriskDreemurr66669 5 месяцев назад

    this line: var image:Image = load(ProjectSettings.get_setting("shader_globals/heightmap").value).get_image() gave me this error: Attempt to call function 'get_image' in base 'null instance' on a null instance. does get_setting work differently now?

  • @robinj6997
    @robinj6997 5 месяцев назад

    This was golden! Been stock on normals the entire day. It didn't make any sense until now. The to_normalmap function solved it all.

  • @FriskDreemurr66669
    @FriskDreemurr66669 5 месяцев назад

    godot 4.2? setget doesnt exist anymore

    • @howislife-v5
      @howislife-v5 5 месяцев назад

      Ikr I just found out😭😭

    • @LaurentSparksMusic
      @LaurentSparksMusic 5 месяцев назад

      Its changed in godot 4 break it up into 2 pieces

    • @LaurentSparksMusic
      @LaurentSparksMusic 5 месяцев назад

      Set and get are seperate methods now

    • @snakesoul
      @snakesoul 5 месяцев назад

      code updated in my comment

  • @mesopable
    @mesopable 5 месяцев назад

    I heard ENetMultiplayer is not valid for WebGL games. Is this relevant when using WebSocketMultiplayerPeer or is that whole different approach and topic?

  • @Rubyboat
    @Rubyboat 5 месяцев назад

    setting the names in the player script is VERY IMPORTANT. I skipped this and it caused me ~1.5 hrs of debugging

  • @darklord8793
    @darklord8793 5 месяцев назад

    How do you do this if you dont have a heightmap aka if your terrain isnt being generated by a noise texture?

    • @user-og6hl6lv7p
      @user-og6hl6lv7p 3 месяца назад

      You have to feed in the height value of whatever algorithm is generating your terrain. This means doing the terrain generation calc for each vertex offset, so at least 3 times.

  • @synccyt_
    @synccyt_ 6 месяцев назад

    Incredible

  • @nyscersul42
    @nyscersul42 6 месяцев назад

    If you have a large data object which controls your game.... how big would be too big to synchronise this object directly?

  • @DusanPetrovcic
    @DusanPetrovcic 6 месяцев назад

    wawwww so much easyer than in unity3D

  • @Tankerbox
    @Tankerbox 6 месяцев назад

    This litterally made my game possible! Without this tutorial I would be moving on lol.

    • @ditzyninja
      @ditzyninja 6 месяцев назад

      That's awesome man. I'm really glad this helped out. I don't make tutorials anymore, but I've learned a lot since making this. Let me know if you run into any other hurdles. I might be able to give some tips.

    • @Tankerbox
      @Tankerbox 6 месяцев назад

      @@ditzyninja For context, Im using this framework as collision for my raycast based driving system. The major hurdle I'm running into currently is whenever the collision plane regenerates the raycast slips through for a frame making the driving feel jittery and unpredictable at times. If you found a fix to that or had a similar problem a general tip would be great. If not that's fine Im still extremely grateful for the tutorial!

  • @puleroxd4116
    @puleroxd4116 6 месяцев назад

    God

  • @bertnuts
    @bertnuts 6 месяцев назад

    Really appreciate this