This might be a stupid question, but i want to have a simple 2d textured plane that sits in 3d space, rendered with Makie. Eventually there should be more complex 3D Meshes, but for now i struggle to even get a textured plane.
Here is what i have so far:
verts = [[-1.0,-1.0,-1.0],[1.0,-1.0,-1.0], [1.0,1.0,-1.0], [-1.0,1.0,-1.0]] #These could change specifically be rotated
points = [Point3(p) for p in verts]
poly = Polygon( points)
fig = Figure(resolution = (600,600))
axs = Axis3(fig[1,1],aspect = :data)
mesh!(axs,poly)# throws error : no method matching earcut_triangulate()
So this method doesn’t even render a polygon. I tried with the vertices as an array and face numbers, but i seem unable to texture that mesh.
faces = [
1 2 3;
3 4 1;
]
verts = [-1.0;-1.0;-1.0;; 1.0;-1.0;-1.0;; 1.0;1.0;-1.0;; -1.0;1.0;-1.0]
mesh!(axs,verts, faces)
This does what i want, but i seem unable to put a texture on top of my plane. Any ideas what i can do? Its hard to use GeometryObject, since the documentation is nonexistent, and there seem to be no 2d Rect for 3d rendering, so id rather avoid it. If GeometryObject.jl is the only way to texture 3D objects, a better documentation would be great. It also seems weird to me, that the library essentially redefines Vectors (Points) which seems to be a bad going forward with compatibility with other Julia modules.