Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homework2, draw opencv 3d logo in motion with opengl compat, support shade flat/smooth and smoothing group #38

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sleeplessai
Copy link

@sleeplessai sleeplessai commented Jul 26, 2023

小彭老师,这是我第二次作业的实现,请批改。😀

  1. 通过提供的opencvpart.obj资产实现了基本绘制任务,在Game初始化函数中进行变换组合成OpenCV Logo,渲染循环中仅计算MVP变换
  2. 实现了平直着色,调用OBJ类的 draw_obj() 函数即可
  3. 为了实现平滑(组)着色,为 OBJ 的 load_obj() 函数加入了 grouped 参数,实现模型载入阶段对面进行分组,在原有 obj 文件中添加了自定义的分组注释 #group G 用于提示面分组,数据保持原有不变
  4. load_obj() 函数中的 grouped 参数默认为 false,不开启分组,即仅有一个分组,调用 draw_obj_smooth() 函数,实现整个模型的平滑着色
  5. load_obj() 函数中的 grouped 参数为 true 时,则可以按照分组注释 #group G 保存分组索引,此时调用 draw_obj_smooth() 函数,实现平滑组着色
  6. 按照 Render pass 和程序化的思想,整理了绘制的函数,方便复用

@sleeplessai sleeplessai reopened this Jul 28, 2023
@sleeplessai sleeplessai changed the title homework2, draw opencv 3d logo in motion with opengl compat. homework2, draw opencv 3d logo in motion with opengl compat, support shade flat/smooth and smoothing group Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant