3D Engine in Python. Shadow Mapping, PCF

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ย. 2024

ความคิดเห็น • 43

  • @BRLN1
    @BRLN1 ปีที่แล้ว +5

    Inspired by your fantastic video series on openGL + pygame, I now try myself to implement an openGL driven, animated scatter plot (plotting nodes and lines colored by heat maps); those kind of plots are great to visualize flow network problems (such as traffic networks, electrical circuits, water networks and so on).
    I would love to see the python + openGL video series to be continued, e.g. covering decals or other interesting topics.
    However, what ever video/project comes next, all your videos are great! You do a great job ...

  • @datheo9908
    @datheo9908 2 ปีที่แล้ว +3

    Thank you for another great video. Love your videos man

  • @cursed3231
    @cursed3231 2 ปีที่แล้ว +2

    Very cool Tutorial, I'll use it for an engine, Thanks a Lot, Great Video !!!

  • @skyneon-8500
    @skyneon-8500 2 ปีที่แล้ว +2

    thanks, you make great tutorials

  • @cristioancea3708
    @cristioancea3708 2 ปีที่แล้ว

    Best tutorials since Nehe !!

  • @hippiedonut1
    @hippiedonut1 10 หลายเดือนก่อน +1

    In the getSoftShadowX16() function, I think you may have forgotten to initialize the `shadow` variable. I needed to change this:
    float shadow;
    ...to this:
    float shadow = 0.0;
    ChatGPT also helped me make the shadows look better/less glitchy (on my hardware) like this:
    float getSoftShadowX16(vec4 biasedShadowCoord) {
    float shadow = 0.0; // Initialize the shadow accumulator
    float swidth = 0.5; // Consider smaller steps for a smoother shadow
    float endp = swidth * 1.5;
    for (float y = -endp; y

  • @Blithe7349
    @Blithe7349 2 ปีที่แล้ว +2

    Great video. Very well explained 👍

  • @iriscapes
    @iriscapes 6 หลายเดือนก่อน

    @3:58 I noticed that we can blur the shadow by an amount given by the difference with neighboring pixels.

  • @thereborne5219
    @thereborne5219 2 ปีที่แล้ว +9

    are you going to introduce physics next?

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 ปีที่แล้ว +8

      probably yes

    • @orangasli2943
      @orangasli2943 2 ปีที่แล้ว +2

      Does defining physics in 3d game assumes that we are still in 2d mode
      right?
      Because 3d is just a projection into 2d space..
      For example if I have one 3d object in the screen..how do I tell it to go deeper into the screen like go to position vector
      from the origin
      Do I need to do z=18
      Or maybe express z=f(x,y)
      I don't know

    • @zhabiboss
      @zhabiboss ปีที่แล้ว +1

      @@CoderSpaceChannel when

  • @lefredy7476
    @lefredy7476 2 ปีที่แล้ว +3

    are you going to make a tutorial about vulkan?

  • @BRLN1
    @BRLN1 ปีที่แล้ว +1

    Hey Coder Space, can you explain or show how "picking", i.e. selecting triangles in the 3D-World via mouse courser, can be realized with ModernGL?

  • @buggamesstudio7350
    @buggamesstudio7350 ปีที่แล้ว

    Please continue this tutorial 🙏

  • @damus6665
    @damus6665 2 ปีที่แล้ว

    Thanks for a new video!!!

  • @lolmonster7024
    @lolmonster7024 ปีที่แล้ว +1

    We’re did you learn all of this?

  • @ENRGguy
    @ENRGguy ปีที่แล้ว

    Will you continue tutorial about 3D Engine?

  • @kaan_tuna
    @kaan_tuna ปีที่แล้ว

    Can you please cover how to blit things on the screen as İ really need it

  • @adamebadra3171
    @adamebadra3171 2 ปีที่แล้ว +1

    Good vid.

  • @XENON2028
    @XENON2028 2 ปีที่แล้ว

    when is this series going to resume?

  • @joshuacapistrano4124
    @joshuacapistrano4124 ปีที่แล้ว

    I love you Bro!!!!!!!!!!

  • @SkyFly19853
    @SkyFly19853 2 ปีที่แล้ว +1

    Please.
    More videos.
    ✅✅✅✅✅✅✅

  • @kaan_tuna
    @kaan_tuna 2 ปีที่แล้ว

    How come the glm module doesn't have a vec3 attribute?
    Edit: nevermind it's fixed now \o/

  • @azaias
    @azaias ปีที่แล้ว

    How can reflective surfaces (kinda like a mirror) be implemented? I'm very interested, and would appreciate any info

    • @iriscapes
      @iriscapes 6 หลายเดือนก่อน +1

      This is usually accomplished by rendering a duplicated, mirrored scene. It is easy to imagine a giant mirror.
      However, I don’t know how something like a rearview mirror would work. Maybe rendering the scene from the mirror point of view and using it as a texture?

  • @kakyoindonut3213
    @kakyoindonut3213 ปีที่แล้ว +1

    Coder, I've been struggling to find a way to create a 3d collision on these project, will you ever create a tutorial involvin this or if you don't mind could you recommend me a good tutorial for understanding 3d collision?

    • @CoderSpaceChannel
      @CoderSpaceChannel  ปีที่แล้ว +3

      bounding boxes or spheres, or you can try with pybullet

    • @marc_timeed4355
      @marc_timeed4355 ปีที่แล้ว

      ​@@CoderSpaceChannel3 day and night I struggle to do physics, about the oval there are many different libraries, I looked through half of Google, but I can’t achieve anything, about pybullet г I don’t know, I didn’t even try, I can’t imagine how to work with him. Another problem is the expansion of objects in this 3d engine, I haven’t looked at how to work with it yet, but I think it wakes up just as hard . Can you make at least 1 introductory video on the topic of physics in 3d space, at least the basics collisions and ridgic body physics

  • @matt5742
    @matt5742 ปีที่แล้ว

    Running the code on github produces a scene where everything is black. Do you know what could be the problem? Python 3.11.2

  • @RedstoneHair
    @RedstoneHair ปีที่แล้ว

    How do you go about displaying just the depth?

    • @PeterVanAlem
      @PeterVanAlem 7 หลายเดือนก่อน +1

      You can try something like this after the first pass:
      depth_attachment = np.frombuffer(depth_fbo.depth_attachment.read(), dtype = 'f4')
      depth_map = np.frombuffer(depth_attachment - 1, dtype = np.uint8).reshape((*depth_fbo.size[1::-1], 4))
      cv2.imshow('input', cv2.flip(255 - depth_map[:, :, 2], 0))

  • @sketchwareteamo1649
    @sketchwareteamo1649 2 ปีที่แล้ว

    Tem como programar open Gl no android?

  • @OfficialDeltaDev
    @OfficialDeltaDev ปีที่แล้ว

    Could you maybe add global illumination, if its possible?

    • @AcceleratedVelocity
      @AcceleratedVelocity ปีที่แล้ว

      its Kinda hard,
      vec3 getDynamicReflection() {
      vec3 viewDir = normalize(camPos - fragPos);
      vec3 reflectionDir = reflect(-viewDir, normalize(normal)); // Calculate the reflection direction
      vec3 reflectedColor = texture(u_texture_1, reflectionDir.xy * 0.5 + 0.5).rgb; // Sample the reflected color, I HAVE NO CLUE HOW TO but i'm sure it needs a cubemap, for now reflects off of itself
      return reflectedColor;
      }

  • @furkanunsal5814
    @furkanunsal5814 ปีที่แล้ว

    why do you write all the code in constructors? why not implement classes in an abstact way and use them in a main function?

  • @kirixoto
    @kirixoto 2 ปีที่แล้ว

    Да ну, хоть здесь тебя нашёл, что тот канал то забрасыаешь.

  • @TalalDev
    @TalalDev 2 ปีที่แล้ว +1

    Hello do you have Instagram?

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 ปีที่แล้ว +2

      Yes, but for personal use.

    • @TalalDev
      @TalalDev 2 ปีที่แล้ว +1

      OK I have questions

    • @CoderSpaceChannel
      @CoderSpaceChannel  2 ปีที่แล้ว +2

      in the channel description section there is my email