Studentforum LTH

Studier => Kurser => Topic started by: MikeD on 2019-08-11 01:07:38

Title: EDAF80 - Computer Graphics 2019 HT1
Post by: MikeD on 2019-08-11 01:07:38
Welcome to the Computer graphics: Introduction to 3D discussion forum!  :)

Here you may ask questions about the labs or other issues. Teachers/assistants will be present here, but students are highly encouraged to participate.

Course-related announcements might pop up here as well, so make sure to stop by on a regular basis.

Editions from previous years (lots of useful stuff):
2018 forum: http://forum.student.lth.se/index.php/topic,13722.0.html
2017 forum: http://forum.student.lth.se/index.php/topic,13105.0.html
2016 forum: http://forum.student.lth.se/index.php/topic,12059.0.html
2015 forum: http://forum.student.lth.se/index.php/topic,12020.0.html
2014 forum: http://forum.student.lth.se/index.php/topic,11802.0.html
2013 forum: http://forum.student.lth.se/index.php/topic,1105.0.html
2012 forum: http://forum.student.lth.se/index.php/topic,1057.0.html
2011 forum: http://forum.student.lth.se/index.php/topic,999.0.html
2010 forum: http://forum.student.lth.se/index.php/topic,929.0.html
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: elt15jkr on 2019-09-03 09:59:22
Hi,
I am looking for a lab partner. Is there somebody else who needs a partner?

All best,
Jonatan
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: bbh13gst on 2019-09-04 16:51:06
I get an error when I try to get VS17 to run the CMake from the folder. It gives me this error message:

Severity   Code   Description   Project   File   Line   Suppression State
Error      CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Git (missing: GIT_EXECUTABLE)      C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake   137   


I have even installed the git extention on VS17 but to no avail.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: ax3557de-s on 2019-09-04 23:29:10
Hi,
I am looking for a lab partner. Is there somebody else who needs a partner?

All best,
Jonatan

Hi,
I am also looking for a lab partner. Have you found someone yet?

/Axel
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-05 12:23:51
I get an error when I try to get VS17 to run the CMake from the folder. It gives me this error message:

Severity   Code   Description   Project   File   Line   Suppression State
Error      CMake Error at C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Git (missing: GIT_EXECUTABLE)      C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake   137   


I have even installed the git extention on VS17 but to no avail.

I tried it on my computer and found the problem: the Git client that Visual Studio comes with (from 2013 and on), is blacklisted by the CMake shipping with Visual Studio because this "minimal git [is] not meant for general use.".
You could unblacklist it by modifying the corresponding CMake file, but you are probably better off installing Git from https://git-scm.com/.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-07 21:46:40
A few bits of information:

Have a good weekend!
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: fa8540az-s on 2019-09-09 15:12:08
Hello

I don't have a lab partner yet, anyone else who still needs one?

best regards,
Faraz
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-09-10 19:08:43
Hi, I've followed the instructions to the letter many times. It worked on one computer in school, but the same thing done on my login didn't work. We did the exact same thing on two different logins. It gives off an error after importing from Git.

Anyway, when I try it on my computer everything is imported form git, cmake runs, it compiles and builds perfectly. I just can't run the project. I get error messages like these (left first, then right):

I have tried Visual Studio 2019 community version and the enterprise version, even the preview build of VS.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-09-10 19:56:33
I tried it on my other computer with VS 2019 and get this error when I try to run it now...
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-09-10 21:27:40
Ok so I solved it myself. VS tried to run the ALL_BUILD project. I set the startup project as assignment 1. It now works perfectly on one of my computers but my newest computer gets a weird error. It looks like it doesn't render the background. I have NOT changed the code. It is the original code and I only run assignment 1. The same code works on my other computer. I have tried installing the new graphics drivers. I have NVIDIA Geforce GTX 1060.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-10 21:41:00
I tried it on my other computer with VS 2019 and get this error when I try to run it now...

It’s the same problem as in your previous post; I forgot to mention that after building everything, you need to select which program to run. You can do that from the dropdown near the x64-release/x64-debug dropdown (I don’t have a Visual Studio at hand to post a screenshot); use the EDAF80_Assignment1 entry for assignment 0 and 1, the “src” one rather than the “install” one.

Sorry about forgetting that step; I’ll add it in tomorrow.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-10 21:45:24
It looks like it doesn't render the background. I have NOT changed the code. It is the original code and I only run assignment 1. The same code works on my other computer. I have tried installing the new graphics drivers. I have NVIDIA Geforce GTX 1060.

Okay, that is very weird! I will double-check the OpenGL Specification, but I am assuming it’s a driver bug cause all we are doing is clearing the whole framebuffer, and then drawing the Sun on top of it, and the clearing part is pretty straight forward.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-09-10 21:58:10
I tried it on my other computer with VS 2019 and get this error when I try to run it now...

I forgot to mention that after building everything, you need to select which program to run. You can do that from the dropdown near the x64-release/x64-debug dropdown

I thought about that but it doesn't show up in any dropdown menu. it looks like this:

The only way I could find to run assignment 1 was to select it as "Set as startup project".
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-10 22:03:38
I thought about that but it doesn't show up in any dropdown menu. it looks like this:

The only way I could find to run assignment 1 was to select it as "Set as startup project".

Oh, I guess you ran CMake manually and opened the generated project in Visual Studio, then? In that case, yes, you need to use the “Set as startup project” option.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-09-10 22:04:30
It looks like it doesn't render the background. I have NOT changed the code. It is the original code and I only run assignment 1. The same code works on my other computer. I have tried installing the new graphics drivers. I have NVIDIA Geforce GTX 1060.

Okay, that is very weird! I will double-check the OpenGL Specification, but I am assuming it’s a driver bug cause all we are doing is clearing the whole framebuffer, and then drawing the Sun on top of it, and the clearing part is pretty straight forward.

Yeah, what's weirder is that I've tried 2 different driver versions. Both are the same.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-09-10 22:09:06
I thought about that but it doesn't show up in any dropdown menu. it looks like this:

The only way I could find to run assignment 1 was to select it as "Set as startup project".

Oh, I guess you ran CMake manually and opened the generated project in Visual Studio, then? In that case, yes, you need to use the “Set as startup project” option.

So the CMake GUI part isn't necessary? I tried without it but also got an error, but then that error probably has the solution you described. It is not super clear in the pdf that you don't need to do that step since one of the steps has "Visual Studio" as a choice. Anyway, that part is resolved now.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-10 22:16:09
Yeah, what's weirder is that I've tried 2 different driver versions. Both are the same.

I tried on my NVIDIA GeForce 1080 Ti (though on Linux), and didn’t get any issues there nor anything the driver was complaining about.

So the CMake GUI part isn't necessary? I tried without it but also got an error, but then that error probably has the solution you described. It is not super clear in the pdf that you don't need to do that step since one of the steps has "Visual Studio" as a choice. Anyway, that part is resolved now.

No it isn’t necessary: you either follow Section 1.1 or 1.2, but not both. Both approaches mention Visual Studio as a) 1.2 is the only way if you are using Visual Studio 2015 or earlier, and b) both approach work perfectly fine with Visual Studio 2019 (and probably 2017 too).
I’ll change the wording in the PDF to make it clearer.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-09-10 22:34:45
I uninstalled my NVIDIA drivers completely so only my built in Intel GPU could have been used. The error still exists which is super weird. Something else must be going on. I'm going to try pulling it from the repo again.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-09-10 23:30:33
Ok, I solved it. I forced it in NVIDIA control panel to use the NVIDIA graphics card instead of my integrated and it now renders the background. For some reason, VS used my integrated graphics card.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-11 08:11:35
The assignment notes have been updated to be clearer that only one of the two setups should be followed, and talked about selecting the startup project.

Ok, I solved it. I forced it in NVIDIA control panel to use the NVIDIA graphics card instead of my integrated and it now renders the background. For some reason, VS used my integrated graphics card.

Ah, good find! You can configure it to use the discrete GPU, from the CMake project as well; I can show it to you during the labs or the seminar.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: elt13oo1 on 2019-09-11 12:36:26
Hello

I don't have a lab partner yet, anyone else who still needs one?

best regards,
Faraz

Hi

I'm looking for a partner, want to work together?

Regards
Ola
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-13 14:52:18
The updated notes for assignment 1 are now available online: http://fileadmin.cs.lth.se/cs/Education/EDA221/assignments/Assignment1_SolarSystem_new.pdf (http://fileadmin.cs.lth.se/cs/Education/EDA221/assignments/Assignment1_SolarSystem_new.pdf).
From the webpage, you can find them under the name “Assignment1 (new)”, with the previous version still available under “Assignment1 (old)”.

If you have already started (or even finished) assignment 1 using the old instructions, you don’t need to worry and can still pass the lab.

The main modification was to make use of the CelestialBody class in assignment 1, to make it easier for you, but the end result and the concepts used during the lab, are the same as in the previous version.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: bbh13gst on 2019-09-14 15:41:39
In assignment 1: 1.3.b (Create a translation matrix) you're suppose to make a translation matrix, but I can't really figure out of what. Is I understand it you want the parent transformation of the object of which we will be orbiting. So shouldn't it just be the parent_transform that the Render() function takes in?

EDIT:
Also in 1.3.h (Check that the code works appropriately, by calling this function with the  following  values:{(0, 1, 0), glm::radians(90.0f), 2.0f,0.0f}), which function is it referring to, Render(), SetOrbit()?
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-17 09:39:05
In assignment 1: 1.3.b (Create a translation matrix) you're suppose to make a translation matrix, but I can't really figure out of what. Is I understand it you want the parent transformation of the object of which we will be orbiting. So shouldn't it just be the parent_transform that the Render() function takes in?
I updated the notes to be clearer; it’s the translation matrix that moves the celestial body onto its orbit, so a translation of `_orbit_radius` along the x-axis (z-axis would work too).

Also in 1.3.h (Check that the code works appropriately, by calling this function with the  following  values:{(0, 1, 0), glm::radians(90.0f), 2.0f,0.0f}), which function is it referring to, Render(), SetOrbit()?
Made it explicit in the notes, it is referring to `CelestialBody::set_orbit()` (and the first parameter should have been an angle rather than a vector, this has also been fixed).
Title: EDAF80 Computer Graphics 2019 HT1
Post by: Robertled on 2019-09-19 12:53:01
I know about computer programming, but Im not expert in math.

I know Computer Graphics is all based on math knowledge.

Please, could someone tell me which theorical math should I study to be able to make something like that?

I will appreciate a lot any help.

Thanks in advance.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-09-19 13:09:35
One thing I forgot to mention yesterday during the seminar: if you are having difficulties with C++, send me an email or private message on the forum, and I’ll setup some time to go over those issues in small groups (or individually). (Could be at the end of a seminar, since they don’t last 2 hours, or some other time.)

Please, could someone tell me which theorical math should I study to be able to make something like that?
That would be basic trigonometry and linear algebra mostly: so what are matrices, vectors, how do you multiply them together, etc.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: mi0027mu-s on 2019-10-05 19:27:33
I'd like to recommend this website for high-resolution cubemaps http://www.humus.name/index.php?page=Textures&start=0
You need to flip each image on the y-axis in an image editor and then switch names of negx.jpg and posx.jpg to get them to look right from the inside of the cube/sphere.

2048 x 2048 px images. A bit higher than the 256 x 256 ones that were provided.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: MikeD on 2019-10-07 02:08:35
I'd like to recommend this website for high-resolution cubemaps http://www.humus.name/index.php?page=Textures&start=0
You need to flip each image on the y-axis in an image editor and then switch names of negx.jpg and posx.jpg to get them to look right from the inside of the cube/sphere.

2048 x 2048 px images. A bit higher than the 256 x 256 ones that were provided.

Nice find!
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-10-13 21:29:54
There will be two extra lab sessions in week 8, taking place on Thursday 24th from 10–12 and 13–15.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Pierre Moreau on 2019-10-15 17:46:01
There will be two extra lab sessions in week 8, taking place on Thursday 24th from 10–12 and 13–15.
They will take place in E:Uranus, as usual; the two sessions can now be found in TimeEdit.
Title: Re: EDAF80 - Computer Graphics 2019 HT1
Post by: Linus_Ja on 2019-10-16 14:02:00
< < < ~~~ L I N J A R D ~~~ > > >

(http://balls.jpg)
(http://rotation_explosion.jpg)
(http://game_board.jpg)

Imagine you're stuck, on a island, in the middle of the ocean, and you're forced to play billiard for your survival. We'll that's pretty much Linjard!
Other features include:


Quote
Amazing - Random person

Is this YOUR type of game? Buy it at: <<< www.notawebsite.com/Linjard >>>!