dilevin / computer-graphics-meshes

Computer Graphics Assignment about Meshes
1 stars 6 forks source link

cube.cpp weird result #65

Open MelodyZ708 opened 1 month ago

MelodyZ708 commented 1 month ago

The image below is the meshed cube after running my program. The color of the grid does not seem to be correct. What could be the problem? Does it have to do with UV and UF?

image
ZewenShen commented 1 month ago

I assume that you haven't incorporated the texture information; otherwise, it should resemble a Rubik's Cube. First, verify the number of faces on your cube. There should be six, but your image appears to have 24 faces (6 × 4). Additionally, check the signs of the normal vectors.

MelodyZ708 commented 1 month ago

the faces look correct now, but it still cannot capture the meshes. By "incorporating the texture information", do i also need to incorporate into cube.cpp? I notice in obj.cpp, "set_texture_from_png("../data/rubiks-cube.png", v.viewer.data())" should already capture the texture information.

image

I assume that you haven't incorporated the texture information; otherwise, it should resemble a Rubik's Cube. First, verify the number of faces on your cube. There should be six, but your image appears to have 24 faces (6 × 4). Additionally, check the signs of the normal vectors.

ZewenShen commented 1 month ago

You have to set UV and UF correctly. Did you watch the tutorial video that I sent out?

yousefjan commented 1 month ago

I'm having trouble with this as well.. Where is the tutorial video?

ZewenShen commented 1 month ago

Please check the first announcement that I sent in Quercus.