-
Notifications
You must be signed in to change notification settings - Fork 46
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
make-up eyden-tracer-04 #9
base: master
Are you sure you want to change the base?
Conversation
I couldn't implement CSolidGeosphere class completely, but I tried to adjust the code from the link I mentioned in comments. For Phong Shader with bump mapping procedure, I just adjusted CShaderPhong, but did not change the name. Also, I tried to use ground.obj to test it, but unfortunately, was not successful.
I could not implement CGeosphere, but please find attached rendered images with normal sphere as was asked in the original assignment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- GeoSphere was not implemented
- You are rendering cone made of quads and cone made of triangles on top of each other. The for loop where you add the quads should not be there. To achieve better smoothness, you need more subdivisions, so you can increase the number of sides
- No explanations in Problem 2 (-3)
- In problem 3, no textures for geosphere.
@@ -133,11 +133,13 @@ class CScene | |||
return intersect(ray) ? ray.hit->getShader()->shade(ray) : m_bgColor; | |||
} | |||
|
|||
public: | |||
std::vector<ptr_light_t> m_vpLights; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need no light for this assignment... Why?
|
||
private: | ||
Vec3f m_bgColor; ///< background color | ||
std::vector<ptr_prim_t> m_vpPrims; ///< primitives | ||
std::vector<ptr_light_t> m_vpLights; ///< lights | ||
//std::vector<ptr_light_t> m_vpLights; ///< lights |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class should not be modified!
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not found where you add primitives...
const Vec3f top(0, height, 0); // The top point | ||
Vec3f dir0(1, 0, 0); // Initial direction | ||
Vec3f p0 = origin + radius * dir0; // Initial point | ||
float height_segments = sides / 12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of height segments was not required by the assignment
float h0 = 0; | ||
for (int h = 0; h < height_segments - 1; h++) { | ||
float h1 = static_cast<float>(h + 1) / height_segments; | ||
add(std::make_shared<CSolidQuad>(pShader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using quads was not required by the assignment. Here it leads to the errors of smoothness
Vec3f specularColor = m_ks * RGB(1, 1, 1); // white highlight; | ||
res += (specularColor * powf(cosLightReflect, m_ke)).mul(lightIntensity.value()); | ||
} | ||
for(int i = 0; i < nAreaSamples; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you incorporated area samples here ? Is it a copy-paste from last year assignments ?
In this assignment it is not needed at all.
I could not implement CGeosphere, but I implemented CSphere instead to get rendered all three objects on image. For bump mapping Phong shader, I could not complete the task, and I just modified the CShaderPhong, but did not change the name.
Worked in group with Eliza Checiu.