Open eastskykang opened 2 years ago
Hi, @eastskykang, do you mean we should put Ex1, Ex2.1, Ex2.2, Ex3, Ex4 in the main branch? Because in the README, we are told to put Ex1-EX4 in the main branch and Ex5 in the "ex5" branch.
Yes.
On Sat, 19 Mar 2022 at 23:31, AnqiaoLi @.***> wrote:
Hi, @eastskykang https://github.com/eastskykang, do you mean we should put Ex1, Ex2.1, Ex2.2, Ex3, Ex4 in the main branch? Because in the README, we are told to put Ex1-EX4 in the main branch and Ex5 in the "ex5" branch.
— Reply to this email directly, view it on GitHub https://github.com/CMM-22/a2/issues/3#issuecomment-1073114848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXEFLCOQGLMXCWT5EVMIOTVAZBS7ANCNFSM5QY3BAPA . You are receiving this because you were mentioned.Message ID: @.***>
If you are already done with all exercises (and also bored), please try to implement exercise 5 for a more complex terrain loaded from a mesh file. If you manage to successfully implement this, you will get extra 5% point (but your final point cannot exceed 100%)
This could be pretty complicated and may require a lot of code modifications. So please create a new branch called
meshterrain
and work there while keep your successful implementation of Ex.1~Ex.5 on the master (or main) branch. Again, please make sure your implementation of Ex.1 ~ Ex.5 stays safe in master (or main) branch. It's your responsibility to keep the main branch clean and working.Successful implementation will looks like this:
Click this for demo video
You can download a terrain file you want to use from any internet source, but if it's hard to find one, you can use one in data directory
data/terrain/terrain.obj
Note. You may need to read the code base thouroughly and spend quite some time.
Let me give some hints:
the strategy is as follows. From underground e.g. (x, -1.0, z), we will shoot a ray toward the sky (straight up) and then will find a
hitPoint
. ThehitPoint.y
is the ground height at (x, z) coordinate.