Let's code 3D Engine in Python from Scratch

Let's code 3D Engine in Python from Scratch

Coder Space

2 года назад

381,463 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Coder Space
Coder Space - 21.05.2022 03:00

This project was created to learn the basics of 3D. Of course, in terms of performance, Python is not the best option for this kind of thing, but it was pretty fun.
And sorry for some grammatical errors

Ответить
Noba Fan
Noba Fan - 13.09.2023 09:56

Will you be able to cover 3d model animations? I heard early 3d games had to make characters out of multiple objs until they found a way to make character models more realisticallythat bend and morph the mesh. Can you do that some day?

Ответить
José M Fernandez A
José M Fernandez A - 07.09.2023 07:32

A whole semester worth of classes in a single video, essential for my final exam and project, I owe you one.

Ответить
JustAnEric
JustAnEric - 30.08.2023 15:32

Great video! How would I add texturing to my imported OBJ models though?

Ответить
Ezra Chua
Ezra Chua - 17.08.2023 01:47

can you code up a 4d game? I think that would make a great video.

Ответить
Dean Johnson
Dean Johnson - 08.08.2023 17:09

So what did you do today?
Well i started a project and got a pygame rect to be flashing to the screen with movement, you?
Not much just created a 3d engine from scratch

Ответить
Alex L
Alex L - 07.08.2023 15:56

Wow, thank you for this most easily explanation. This will be my start of programming 3D models

Ответить
Razorware
Razorware - 29.07.2023 12:44

Now try to add color to faces! ;)

Ответить
Arturo Beristain
Arturo Beristain - 26.07.2023 09:26

Clean and powerful code, i'll take the idea to test a dual camera projection on nreal air glasses since they are capable of showing stereo images. Thanks a lot.

Ответить
BodaciousChad
BodaciousChad - 27.06.2023 04:27

How to [___] from scratch:
Step 1: "Download these libraries"...
That isn't from scratch.

Ответить
Khalil
Khalil - 16.06.2023 04:50

So I'm running numpy 1.24.3 and when I try to run the program I get a inhomogeneous shape error for when you create the faces np.array in the Object3D class

Apparently from some stackoverflow answers it seems that this problem is fixed if you downgrade to a older version of numpy

Unfortunately I was too lazy to do that and noticing that the shape of the faces object that you wanted to create in the Object3D is the same as that of the faces object you get in the constructor, only difference being is that it is all np.arrays instead of a normal array...

I decided to replace
self.faces = np.array([np.array(face) for face in faces])
with
self.faces = faces

and it worked..?
idk honestly ima just leave it here if anyone has this error too and actually knows how to fix it

Ответить
Garvit Jain16
Garvit Jain16 - 29.05.2023 17:15

please help I am having
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2946,) + inhomogeneous part.
This error, can't figure out why numpy is giving this?

Ответить
Mystic
Mystic - 14.05.2023 19:52

Isn't pygame a 2d module? So is 3D just a 2D screen that somehow turned into a camera that can move freely with 3D Objects? I'm confuse please explain to me, I'm learning

Ответить
Tristan V
Tristan V - 09.05.2023 18:32

This is wonderful and I have never seen such clean and effective python tutorial like this. I can only image what you could do with TensorFlow or PyTorch.

Ответить
veminino
veminino - 06.05.2023 03:46

Is the voice over an AI?

Ответить
Phil Gibson
Phil Gibson - 26.04.2023 04:13

can u add actual blender animations to objects?

Ответить
Faraz Umer
Faraz Umer - 17.03.2023 10:06

Very helpful explanation in easy way for beginners to understand game programming ant its complex geomerty

Ответить
zwwx
zwwx - 06.03.2023 13:48

Solo usando pycharm puedo hacer eso🤔

Ответить
Jason Boyd
Jason Boyd - 28.02.2023 15:53

Why do you sound like a robot?

Ответить
netrunner
netrunner - 25.02.2023 23:30

making a game engine from scratch is the Dark Souls of game development

Ответить
igor bronzato
igor bronzato - 24.02.2023 04:53

it took me 20 mins to make the screen work

Ответить
Kimeg
Kimeg - 23.02.2023 18:13

I've been analyzing this engine and was successful to get proper perspective and camera view working on my project. However as I move the camera forward and go past an object, the object reappears and moves away from the screen when it really should be BEHIND the camera view. It seems that your engine is having this issue as well, so I was playing with both engines to see if can be fixed but no progress yet. I suspect it may has to do with the vertical asymptote of the tangent function approaching either direction of infinity as the camera gets closer to the world coordinate origin.

Ответить
Nick Larkin
Nick Larkin - 23.02.2023 06:23

Thanks!

Ответить
codecaine
codecaine - 15.02.2023 06:01

Excellent work

Ответить
Tecumseh Amaru
Tecumseh Amaru - 13.02.2023 17:31

If you set the playback speed to 0.5 or lower the tutorial becomes actually followable! :D

Ответить
RizzBod
RizzBod - 04.02.2023 07:57

Soo good video content.
Thnx buddy

Ответить
Skezza
Skezza - 22.01.2023 16:54

Please do another video on this! Not just wireframe, actual sides/faces to the 3d shapes! Lighting, etc!

Ответить
Umar CGA
Umar CGA - 22.01.2023 14:03

what would be the best programing language for creating a 3d rendering engine?

Ответить
Александр Куксин
Александр Куксин - 18.01.2023 06:18

Возьмите меня в ученики...

Ответить
John Smith
John Smith - 16.01.2023 23:25

I remember when I wrote my first 3D engine on the Commodore64 back in the mid-eighties
I was so proud of myself too!!

Ответить
Ivan Mironov
Ivan Mironov - 15.01.2023 15:54

For those following the video, when writing out the code, it should be noted that "vertexes" is not a word and will not register IntelliSense to pop up, but "vertices" will.

Ответить
Bartu Arın Oba
Bartu Arın Oba - 14.01.2023 15:20

Feels a little too fast

Ответить
Das Werk
Das Werk - 08.01.2023 01:59

why would someone use python over c++ ?

Ответить
ThunderAppeal
ThunderAppeal - 04.01.2023 06:06

This content is so friggin dreary.

Ответить
Zekkai X50pro
Zekkai X50pro - 03.01.2023 19:28

Woow

Ответить
MrTactics26
MrTactics26 - 31.12.2022 17:01

So can you do this with ChatGPT?

Ответить
manuefmb1
manuefmb1 - 31.12.2022 16:06

Excelente explicação. Você consegue tornar algo complexo em um resultado simples e fácil de entender, sem deixar vazios. Parabéns.

Ответить
Chitus
Chitus - 31.12.2022 11:44

Nice video. Perhaps it would have been a good idea to mention that you used row major matrices and post multiplication. Notation may be confusing.

Ответить
Kazi Tahmin
Kazi Tahmin - 31.12.2022 07:14

wow!
thanks!

Ответить
Zen
Zen - 27.12.2022 01:12

I wouldn't use python for a 3d engine

Ответить
CrjaseMechaEngr
CrjaseMechaEngr - 23.12.2022 14:52

"From Scratch" -_-

Ответить
Backrooms Origin
Backrooms Origin - 18.12.2022 14:29

As someone with a degree in Computer Graphics, this 15 minute video pretty much sums up 2 entire years of university studies. Good job

Ответить
theacp127
theacp127 - 14.12.2022 18:38

It's true, it is nice to look at the cube.

Ответить
Maxi Aleksandrov
Maxi Aleksandrov - 13.12.2022 19:18

i mean its not from scratch, you used a library

Ответить
Дмитрий
Дмитрий - 12.12.2022 00:14

норм

Ответить
Jan Jamnik Srpčič
Jan Jamnik Srpčič - 03.12.2022 18:29

Very well done!

Ответить