OpenGL Tutorial 15 - Stencil Buffer & Outlining

  Рет қаралды 26,812

Victor Gordan

Victor Gordan

Күн бұрын

Пікірлер
@dmaster20ify
@dmaster20ify Жыл бұрын
Oh man. Outlining code is so sweet.
@PaulEmsley
@PaulEmsley 3 жыл бұрын
This is extremely valuable!
@VictorGordan
@VictorGordan 3 жыл бұрын
Good to hear that :)
@navidkhoshavi6420
@navidkhoshavi6420 3 жыл бұрын
Very good explanation.
@VictorGordan
@VictorGordan 3 жыл бұрын
Thank you! :)
@diahaidificbs
@diahaidificbs 3 жыл бұрын
This is awesome thanks a lot you’re great
@VictorGordan
@VictorGordan 3 жыл бұрын
Thx!
@N1664datsnvtz
@N1664datsnvtz 2 жыл бұрын
6:36 That's how Omega Zero looks like on 3D. I hate how Omega Zero doesn't have that in Megaman X DiVE.
@osys7832
@osys7832 Жыл бұрын
or we can use glm::scale(..) with the vertices we have to make it bigger.
@jorgevillarreal2245
@jorgevillarreal2245 2 жыл бұрын
Could it be possible to detect hard edges and use the bisector between the normals to solve the second method fault ?
@VictorGordan
@VictorGordan 2 жыл бұрын
Hmmm, not sure tbh. I'd say hard edges are not that easy to detect afaik
@oskarkassander7063
@oskarkassander7063 Жыл бұрын
Hi, im a bit late but I hope someone will read this and help me out. I follow the tutorial and it works, but if i have other objects in my scene like a floor, the outline is rendered behind the floor
@arthyv8104
@arthyv8104 2 жыл бұрын
Your tutorial is very clear and easy to understand ,is it possible to do OpenGL in android using 3D assests models and also make it as a tutorial ??...
@VictorGordan
@VictorGordan 2 жыл бұрын
Thank you! I am unsure about android. I was actually thinking of doing smth on android with OpenGL. If I figure it out, I'll probably make a tutorial on it ;)
@U_Geek
@U_Geek 2 ай бұрын
For anyone who is like me and none of the methods work becasue, maybe you want to show a user imported model. You can make a new fbo, and draw each mesh with it's own unique flat color shader, then load that fbo texture into your post processing on top of the actual render and then apply an edge detector to the outline fbo, if the absolute value of the edge detector's output is above a threshold, you can draw a flat color instead of the render, this results in a mesh independant outline, that doesn't need any special meshes and doesn't have the gaps that the normal offset one has.
@jeffg4686
@jeffg4686 2 жыл бұрын
I always see "outlining" as the example for stencil buffer usage. It's cool, but I was wondering if anyone can suggest other effects that can be done with stencil buffers. thanks for any suggestions.
@VictorGordan
@VictorGordan 2 жыл бұрын
It's also used for portals or mirrors ;)
@jeffg4686
@jeffg4686 2 жыл бұрын
@@VictorGordan - Thanks - I watched a video not long after which was showing a cube with different environments inside each 'face' of the cube. very cool.
@rakhuu4367
@rakhuu4367 7 ай бұрын
you can also create reflections with stencil buffer
@gemigames154
@gemigames154 3 жыл бұрын
Even though I have no plans to make this framework, I'm loving this video series. I have a question about the outlines though. Is it possible to apply a 2D grow edge shader pass to the stencil buffer to have a consistant line thickness regardless of model distance? Or I imagine you could take the distance of the vertex from the camera and use that as a scaler for the normal displacement of the stencil model to get consistant thickness.
@VictorGordan
@VictorGordan 3 жыл бұрын
Yeah, you can also do it by taking the 2D approach, but then you can't really do it in one shader.
@gemigames154
@gemigames154 3 жыл бұрын
@@VictorGordan Ah I see. Thanks!
@coderflowerdev
@coderflowerdev Жыл бұрын
For some reason that outline is being rendered below the model. Any ideas on how to fix it?
@Relics_tv
@Relics_tv 3 ай бұрын
Same
@aryangoswami3643
@aryangoswami3643 3 жыл бұрын
Keep it up
@VictorGordan
@VictorGordan 3 жыл бұрын
Thank you, I will! :)
@tudor74277
@tudor74277 3 жыл бұрын
You're great!
@SAMUSTORM
@SAMUSTORM 3 жыл бұрын
Could you do a tutorial on how to import imgui into our projects ??
@VictorGordan
@VictorGordan 3 жыл бұрын
Yup, I'll likely do that at some point! Might even be the next video :)
@PhamAnhKhoa118
@PhamAnhKhoa118 3 жыл бұрын
Can you please make an instruction how to implement a mirror using stencil buffer or can you share me any sources that help do this in the easiest way because I find stencil buffer somehow difficult to understand.
@VictorGordan
@VictorGordan 3 жыл бұрын
Sorry but I don't know of any good resources, and I don't think I'll get around to it anytime soon :( But maybe this will help? stackoverflow.com/questions/20511599/how-do-i-draw-a-mirror-mirroring-something-in-opengl
@PhamAnhKhoa118
@PhamAnhKhoa118 3 жыл бұрын
@@VictorGordan thank you bro!
@dmitrykolesnikovich
@dmitrykolesnikovich 2 жыл бұрын
So, what if I need more then single one stencil buffer at a time?
@VictorGordan
@VictorGordan 2 жыл бұрын
I've never tried this before, but I believe you simply need multiple framebuffers and draw calls
@dmitrykolesnikovich
@dmitrykolesnikovich 2 жыл бұрын
@@VictorGordan so i can use framebuffer as a stencil buffer?
@VictorGordan
@VictorGordan 2 жыл бұрын
You should be able to use a texture that is attached to a framebuffer as a stencil buffer. Look at my framebuffer tutorial, I make a depth buffer there for the framebuffer. You should be able to apply the same principle but with stencil buffers instead of depth buffers ;) Good luck!
@PaulEmsley
@PaulEmsley 3 жыл бұрын
Where did the crow come from (who is the artist?) What is the license? (I checked the repo, I didn't see a special note) Thanks.
@VictorGordan
@VictorGordan 3 жыл бұрын
It's in the description under "Resources" ;)
@PaulEmsley
@PaulEmsley 3 жыл бұрын
@@VictorGordan Thank you (it's under "References"). To answer my questions, sketchfab, the artist is AntijnvanderGun and the license is CC Attribution.
@ArtyIF
@ArtyIF 3 жыл бұрын
not to be that guy but first thanks to youtube recommendations lol
@VictorGordan
@VictorGordan 3 жыл бұрын
lol, no problem haha Thx for watching!
@noname-ni3hp
@noname-ni3hp Жыл бұрын
i didnt quite understand is the mesh is huge or my camera view is small
@noname-ni3hp
@noname-ni3hp Жыл бұрын
sorry my camera view was small its should be Camera camera(width, height, glm::vec3(0.0f, 0.0f, 50.0f));
@manpotato295
@manpotato295 5 ай бұрын
texture works with sword but not crow.. why?
@abdousekhi4933
@abdousekhi4933 3 жыл бұрын
bro please i need help i make 3d game engine using opengl and c# i now i want to implement 3d mesh collision detection what should i do
@VictorGordan
@VictorGordan 3 жыл бұрын
I have an upcoming series on Physics, so you can stick around for that :)
@titanovsky
@titanovsky Жыл бұрын
Thanks.
@VictorGordan
@VictorGordan Жыл бұрын
Np :)
@clifflin2307
@clifflin2307 3 жыл бұрын
I'm expecting the tutorial of Blender!! haha
@VictorGordan
@VictorGordan 3 жыл бұрын
I recommend Blender Guru's tutorials for that!
OpenGL Tutorial 16 - Face Culling & FPS Counter
4:31
Victor Gordan
Рет қаралды 16 М.
OpenGL - depth and stencil buffers
10:01
Brian Will
Рет қаралды 18 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
99.9% IMPOSSIBLE
00:24
STORROR
Рет қаралды 31 МЛН
These 12 Mind-Blowing Inventions Are Changing Everything!
10:51
Algorithmic Insights
Рет қаралды 300
Modern OpenGL Tutorial - Compute Shaders
11:27
Victor Gordan
Рет қаралды 64 М.
Modern OpenGL Tutorial - Tessellation Shaders
7:59
Victor Gordan
Рет қаралды 20 М.
OpenGL Tutorial 19 - Cubemaps & Skyboxes
6:09
Victor Gordan
Рет қаралды 34 М.
OpenGL Tutorial 25 - Shadow Maps (Directional Lights)
7:05
Victor Gordan
Рет қаралды 23 М.
OpenGL Tutorial 22 - Anti-Aliasing (MSAA)
4:29
Victor Gordan
Рет қаралды 16 М.
OpenGL Tutorial 1 - Window
7:50
Victor Gordan
Рет қаралды 118 М.
Coding Minecraft from Scratch in C++ [Voxel Engine]
9:18
Carbone Dev
Рет қаралды 8 М.
OpenGL Tutorial 7 - Going 3D
8:01
Victor Gordan
Рет қаралды 52 М.
OpenGL Tutorial 14 - Depth Buffer
4:40
Victor Gordan
Рет қаралды 24 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН