Page 1 of 1

What is the basic requirement for 3d stuff?

Posted: Mon Oct 19, 2020 2:36 pm
by findux
Hello, as I asked in the title, what are the basic things to make 3d things?

I created a transformation with the line
local camera = love.math.newTransform()

I slightly rotated the transformation matrix that I created.
camera: setMatrix (0.9876883,0.0244717, -0.1545085,0,0,0.9876883,0.1564345,0,0.1564345, -0.1545085,0.9755283,0,0,0,0,1)

then I tried line bellow in draw function but I got a meaningless drawing.
love.graphics.applyTransform (camera)

Image

Re: What is the basic requirement for 3d stuff?

Posted: Mon Oct 19, 2020 11:17 pm
by pgimeno
That you can't make sense of it doesn't mean it isn't 3D :)

Re: What is the basic requirement for 3d stuff?

Posted: Tue Oct 20, 2020 6:29 am
by findux
Do I need to load shaders and do matrix manipulation? How to send fragment and vertex information to the graphics card? I'm a newbie in these things. I might be saying something stupid. Also, the drawing screen is not the normalized device coordinate as in opengl.

Re: What is the basic requirement for 3d stuff?

Posted: Tue Oct 20, 2020 8:49 am
by pgimeno
The default view is orthographic. I'm not sure but I believe you need to replace the vertex shader in order to have control over the projection matrix. At least that's how I did it.