alecjacobson / computer-graphics-shader-pipeline Goto Github PK
View Code? Open in Web Editor NEWComputer Graphics Assignment about the Shader Pipeline
Computer Graphics Assignment about the Shader Pipeline
When I am testing with test-05.json, I kept getting this kind of effect instead of having a smooth rendered surface in the provided gif. I have no idea how can I fix this, can anyone help me with this?
In case to prove that I calculate the normal of surface correctly, here is the normal image of the model:
And this is the normal image of the model when I adjust the tessellation level to 1:
When I tried running ./shaderpipeline ../data/test-03.json, I received the following warning:
'''
WARNING: Output of tessellation evaluation shader 'pos_fs_in' not read by fragment shader
shader compilation successful.
'''
As a result, I was unable to see through the object. Any ideas why?
Btw, running on mac 10.13.6.
To get the normal do we use the point on the sphere or the point to which the view and model matrices have been applied?
and if it the former, does that mean we would need to transform these perceived normals we obtain?
I know the file type doesn't matter but just for consistency, the file type of procedural_color here on github is .fs but the required file type on MarkUs is .glsl
What's the range of this function? -1 - 1? Are we supposed to use the output of the perlin_noise
as the input of this function?
When I tried running ./shaderpipeline ../data/test-01.json
on CDF machines I got.
No protocol specified
Could not initializing glfw
Any thoughts?
Does it have to be earth? Can I make it into another planet?
I think the professor meant perlin_noise.glsl instead rather than just noise.glsl in the README.
Also, to implement perlin_noise.glsl, you need to implement smooth_step.glsl which was not indicated in the README and people might be confused.
The output expected from the tangent function is
T 3D unit tangent vector
B 3D unit tangent vector
is B actually the bi-tangent vector?
Thanks
Good afternoon,
I usually work on the UG machines in GB remotely and this has worked for all previous labs. But for this lab, in trying to check if the workspace is okay, I get:
ERROR: failed to compile vertex shader
0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, and 3.00 ES
I cannot find a way to remote into ECF machines. I tried remoting a CS machine via NoMachine but I had not luck there either. Trying to set up a work space on my personal desktop now will take a very long time. Is there a suggested workaround for this? Can I lower the version in the 410version.gl file?
Thanks,
This relates to the snap_to_sphere implementation,
When I debug by mapping the color based on the normal value, I get a very faceted appearance and I am not sure how to get the normals of neighboring triangles so I can have a smoother transition.
does pos_es_in contain all of the neighboring triangles' vertices?
thanks
I was able to build the code with cmake and make build and it worked. But when I try running the executable I get:
""
GLX: GLX version 1.3 is required
Could not create glfw window
"""
How do I fix this. I am connecting to cdf using the nx client so I can see the visual displays
Hi,
I'm wondering if there should be another translation "t" input for the model function, since model expects translate and "model_view_projection.vs" only expects model.
Or should we just hard code the translating unit into the file.
Thanks.
In snap_to_sphere.tes, the input of the function is indicated as
// array of 3 3D path corner positions
in vec4 pos_es_in[];
The outputs of the function are
// Outputs:
// projected, view, and model transformed 3D position
out vec4 pos_fs_in;
// view and model transformed 3D position
out vec4 view_pos_fs_in;
// view and model transformed 3D normal
out vec3 normal_fs_in;
// 3D position _before_ applying model, view or projection
// transformations (e.g., point on unit sphere)
out vec3 sphere_fs_in;
It seems that the outputs are all information about a single points. If this is the case, what should we do with the input triangle?
Thanks.
For test-06 and test-07, do we need to generate the completely same output animation as it is on the website to get full mark? More specifically, do we need to create the exact same marble texture in part 06 and the bumpy appearance of planet in part 07 as the sample animation?
what is the type of the lit file?
Under the topic Tesselation Control Shader...
" the number of new edges each input each should split into (gl_TessLevelOuter[1] = 5 means the edge across from vertex 0 (i.e., the edge between vertices 0 and 2) should be split into 5 edges); "
Do you mean "the edge across from vertex 1 " instead?
In smooth_heaviside.glsl,
// t control steepness of step function: --> 0 more linear, --> inf more like
// Heaviside function (piecewise constant function x<0--> -1 , x>0 --> 1)
However, when I was trying to plot the function, it seems that the boundary point should be 0.5 instead of 0.
When I run the executable on Visual Studio in Windows, opengl reports it cannot read the "test-01.json" file and says "file has changed since the latest compilation attempt". I didn't change the file at all. I also tried doing a clean build of all the files again and then running the application but still no luck, I get the same message.
Anyone know how to fix this?
^^
I find that the math equations for this lab's extremely difficult to read. (Ex: in the bump mapping section) I have also tried reading from the source README.md but I also still find it difficult to read as it is cluttered with cryptic symbols like mathbf, \, weird spacings and all that.
Are there outside references in which we could get the equations from? If not, how can we improve the readability of the math equations in the readme?
This same issue was already brought up by multiple students since the first assignment during the tutorial session but the TA's just told us to try and read from the source README.
Thanks!
Hey, I am a bit confused about the marble implementation. According to the description, the marble texture is only an example, so as long as our output satisfied
adds a procedural color to the objects. The color should not change based on the view or model transformation.
we should be fine even the find appearance does not look like marble right? I would like to leave the marble implementation to the last if it is not required as the schedule is pretty tight these days...
Hi,
I just encountered a weird thing. I normalize the normal_fs_in in the snap_to_sphere.vs
, which is the normal vector of the transformed interpolated vertex in view coordinate system. Then when I was doing lit.fs
, I am using blinn-phong in the view coordinate system, and I assumed the normal vector which is normal_fs_in should've been already normalized and it's good to go. However, the result has obvious artificial effect similar as #14 , #24 . And if I do normalize(normal_fs_in) in lit.fs
again, I could get a smooth lighting as we expected. Why this happens?
Here is the result with normalize in lit.fs
Here is the result without normalize in lit.fs
Both of them have normal_fs_in normalized in snap_to_sphere.vs
Thanks
Hi, the build is failing under MacOS.
Reproduction steps:
mkdir build; cd build; cmake ..; make
Can be fixed by adding the following include statements in the header files
#include <iostream>
to ./include/print_program_info_log.h
#include <fstream>
to ./include/create_shader_program_from_files.h
the criteria for the smooth_step function applies to many functions.
Is this function analogous to the weighing function mentioned in the book?
thanks
I am not sure what it means to "snap the vertices .. to the unit sphere".
Also, is that supposed to be done before or after interpolation?
thank you
Are these provided?
I think I have finish implementing the peril_noise correctly, however i'm not sure how I'm supposed to get the same exact pattern as the one in the Readme. Also, I am not fully sure on what is expected to earn full marks?
Are we required to mimic exactly the drawing to get full marks or as long as we can show how to manipulate or change the texture of the planet we are good?
Or can you give some guidance in order to verify that we have the correct implementation? Thanks!
I cmake this assignment with windows but when I ran the assignment I received:
PS computer-graphics-shader-pipeline\build_windows\Release> .\shaderpipeline.exe ..\..\data\test-01.json
Usage:
[Click and drag] to orbit view
[Scroll] to translate view in and out
A,a toggle animation
L,l toggle wireframe rending
Z,z reset view to look along z-axis
OpenGL version recieved: 3.2.0
Supported OpenGL is 3.2.0 - Build 23.20.16.4973
Supported GLSL is 1.50 - Build 23.20.16.4973
..\..\data\test-01.json has changed since last compilation attempt.
-----------------------------------------------
there is a black window popping up but then it stuck there with no errors. Do I miss anything here?
And I have installed OpenGL Extensions Viewer, it says the OpenGL Version is 4.5, but why is the OpenGL version recieved is 3.2.0? is that a problem?
How can we find the tangent vector when we don't have access to the other vertices in the fragment shader? I am given the unit normal vector n = (n1,n2,n3) and only know that n1(x-x0)+n2(y-y0)+n3(z-z0)=0 for some point (x0,y0,z0) on the tangent plane. Please help!
For perlin noise, there's the hash function P that maps to a number from 0 - 256 and then the output of that is then the input to G. I found that there's a preset P array with a specific permutation of the numbers from 0 -256 but when I try to use that, the shader is super slow. Are we supposed to use random_direction instead of G[P[i+P[j+P[k]]]? I know in the improved version we don't have to generate a random output of G but we still need to use P and I don't know how I can use an array of numbers unless a texture is created and passed into the fragment shader which I don't think we can do.
At the start of the file, there is a comment that states
Values between -½ and ½ ?
Isn't the range of the perlin noise should be [-sqrt(N/4),sqrt(N/4)] where N is the dimension.
So in our case N would be 3 ?
When I ran ./shaderpipeline ../data//test-01.json
, I got the following errors:
$ ./shaderpipeline ../data//test-01.json
Usage:
[Click and drag] to orbit view
[Scroll] to translate view in and out
A,a toggle animation
L,l toggle wireframe rending
Z,z reset view to look along z-axis
OpenGL version recieved: 3.3.0
Supported OpenGL is 3.3 (Core Profile) Mesa 19.0.8
Supported GLSL is 3.30
../data//test-01.json has changed since last compilation attempt.
-----------------------------------------------
../src/version410.glsl has changed since last compilation attempt.
-----------------------------------------------
ERROR: failed to compile vertex shader
0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, and 3.00 ES
failed to create tessellation control shader
failed to create tessellation evaluation shader
ERROR: failed to compile fragment shader
0:1(10): error: GLSL 4.10 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 1.00 ES, and 3.00 ES
error: linking with uncompiled/unspecialized shadererror: linking with uncompiled/unspecialized shader
ERROR: Failed to link shader program
-----------------------------------------------
It says GLSL 4.10 is not supported, what should I do here? Any help?
in model.glsl, it says "expects: identity, rotate_about_y, translate, PI"
in my mode_view_projection.cpp, I can only get the correct picture if I do something like
proj * view * (model * vec4(pos_vs_in, 1.0) + translation);
so in my model.glsl, I do "rotate_about_y, scaling" instead.
Am I doing anything wrong here?
Are we supposed to do all the research based on the fact we learned nothing related from lecture?
Hey, I tried to implement the blinn phong model and see the following effect. The highlight (spectacular light) looks really rough and different from the example showed. I remembered that in Alec's class, one example (twisted pipe) is showed about this issue: The prof had similar wrong highlight, and after the prof did something, the highlight is being corrected and looks really smooth.
However, I forgot what the professor actually did. According to my rough memory the prof cut several lines of code from one section (vertex shader?) to another section (fragment shader?) and it turns to be right.
May the professor or anyone who remembered say again about what is being done to correct the highlight?
Is the moon also supposed to be orbiting about itself? It appears as so in the gif.
Does it matter how fast/slow we make the animation run or should the moon finish a full rotation and a full revolution in a specific number of seconds?
Thanks
For the Blinn-Phong shading, I noticed that my specular highlight doesn't seem to be appearing in the centre of the diffuse coloured section (though moving the view around also moved the specular highlight around). I'm wondering if this is something that I'm doing wrong, or if it's just like that (the gif in the readme also seems to have the same issue).
Once we calculate the perlin noise value, how do we add it to our color texture?
Say I already have obtained a vec3 color vector by calling bling-phong, how do I append my noise value to the color vector?
Hi Professor,
For bump.fs, I have followed all of the instructions and steps to calculate the normal (also Implemented the improved perlin noise). However i keep on getting a completely different result than the one in the README. Also with openGL, it's significantly harder to debug (can't simply print values on screen).
Here is a screenshot of my completely wrong results:
I have also researched into setting up a TBN matrix but to no avail, it still produces a completely different result. I feel like I'm getting stuck in a loop trying after trying to read the many different articles online back and forth and the book doesn't really touch upon this topic either.
Am I going in the right direction? Also, am I overthinking the problem?
In seems in readme, it it missing this file but we need to implement this one...
In planet.fs, I cannot see how to make the effect of the cloud, especially:
Right now I have something like this:
Also, I am wondering what is the marking scheme for the last one? Could my current output get full mark? I really need to balance my time and begin with my other assignments...
On the README, smooth_heaviside is listed as one of the functions that should be implemented but the function is already implemented.
Do we need to make any modifications to this function?
Good evening,
Just to clarify, are we supposed to:
I don't recall using anything that would need smooth_heaviside, but it is part of the MarkUs submission list and tangent is not. Can I get a clarification on what actually needs to be done?
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.