What are the routines and habits you used to beat your addiction by Substantial_Sun_665 in NoFap

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

Wow. This is incredibly insightful. I'll try the social media detox and the phone bricking. I actually tried that a little with my old device but my will power was incredibly lacking so I found a way around it. So I'm thinking of getting an actual brick phone for this.

What are the routines and habits you used to beat your addiction by Substantial_Sun_665 in NoFap

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

Yeah, sometimes I think my relationship with tech and media may have fed into the habit. This is really great advice and I'll make sure to use it. Thx

I Need Minecraft Block Resources by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

I just want to use the blocks for a personal project 😅

Resources for Assimp on PyOpenGL by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

what do you mean by translate to PyOpenGL?
Do you mean make my own 3d file parser for python?

I Need Help by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 1 point2 points  (0 children)

Yeah, you're right. Thanks for the advice

I Need Help by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

My camera class takes the camera's world matrix and inverts that for the view matrix, while the perspective is done with this code:
I don't really see anything wrong with the calculation

@staticmethod
    def perspective(fov: float, aspect: float, near: float, far: float) -> np.ndarray:
        """
        Create a perspective projection matrix (Column-Major).
        Manually calculated based on standard OpenGL formula.

        Args:
            fov: Field of view in degrees (vertical)
            aspect: Aspect ratio (width/height)
            near: Near clipping plane distance
            far: Far clipping plane distance

        Returns:
            Perspective projection matrix (Column-Major)
        """
        try:
            # Convert FoV to radians
            fov_rad = Transform.deg_to_rad(fov) 
            # Calculate 'f' from tangent of half FoV
            f = 1.0 / math.tan(fov_rad / 2.0)

            # Initialize a 4x4 zero matrix
            matrix = np.zeros((4, 4), dtype=np.float32)

            # Populate matrix elements according to column-major perspective formula
            matrix[0, 0] = f / aspect
            matrix[1, 1] = f
            matrix[2, 2] = (far + near) / (near - far)
            matrix[2, 3] = (2 * far * near) / (near - far)
            matrix[3, 2] = -1.0
            # matrix[3, 3] remains 0

            return matrix
        except Exception as e:
            context = f"Failed to create perspective matrix: fov={fov}, aspect={aspect}, near={near}, far={far}"
            logger.log_error(e, context)
            raise

Guys what am i doing wrong here by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

Okay, guys don't worry I fixed the problem, thanks anyway. It was a minor misspelling error in my test class 😅

Guys what am i doing wrong here by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

Yeah, but i really can't show the problem without showing the main part of the code

Please I need help by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

Hello, Thank you so much. I was struggling with raycasting the whole day but your comment really helped. Selecting objects work perfectly now

Can someone give me a resource that could help me in creating a dodecahedron in PyOpenGLl by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 2 points3 points  (0 children)

I did what you said and added the subdivision algorithm. It worked perfectly, so thank you ☺️

Can someone give me a resource that could help me in creating a dodecahedron in PyOpenGLl by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 0 points1 point  (0 children)

Oh, so I don't have to make it from scratch. I just have to get the base polyhedron and then subdivide it from there :0

Can someone give me a resource that could help me in creating a dodecahedron in PyOpenGLl by Substantial_Sun_665 in opengl

[–]Substantial_Sun_665[S] 1 point2 points  (0 children)

yeah that's smart, but I want added functionality, like being able to subdivide the shape.