Jump to content

  • Log In with Google      Sign In   
  • Create Account

Graphics Programming Exercises


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 s.howie   Members   -  Reputation: 138

Like
0Likes
Like

Posted 07 January 2014 - 02:33 PM

Hi all,

 

I've had an interest in graphics programming for some time, but I've been intimidated by the perceived complexity of it. As I am getting older (30 this year) and time is passing me by, I've decided to overcome these fears and for the last month I have been studying the WebGL graphics library and pipeline. (I chose WebGL simply because I have web dev experience and so it is the most accessible graphics library for me.)

 

I've bought a few books on the topic, and I'm slowly marching my way through them. But these books are more an introduction to the graphics library, imparting basic theoretical understanding of the WebGL pipeline and the WebGL API. This is great knowledge to have, but I crave an additional stream of learning that is more practical in nature.

 

When learning a new programming language I like to do exercises such as those found on Project Euler. This way I can learn about the language whilst putting it to practice solving interesting problems. Could anyone recommend some good graphics programming exercises that I could tackle to take my theoretical book knowledge and turn it into practical experience?

 

Any suggestions are greatly appreciated.



Sponsor:

#2 d4n1   Members   -  Reputation: 424

Like
0Likes
Like

Posted 07 January 2014 - 02:49 PM

You're better off using a framework, check out ThreeJS



#3 s.howie   Members   -  Reputation: 138

Like
0Likes
Like

Posted 07 January 2014 - 03:16 PM

@d4n1

 

Thanks for your reply.

 

I understand the advantages of utilising a framework such as ThreeJS. However, in this case, I am not trying to make a game. Rather I am learning Graphics Programming. To this end I want to go closer to the metal. :)



#4 d4n1   Members   -  Reputation: 424

Like
0Likes
Like

Posted 07 January 2014 - 06:40 PM

The code is open source, ThreeJS is after all a wrapper to WebGL; being that it is open source it would do you good to look at the code.  Also the library isn't strictly for making video games, they have a huge demo base located here

 

If you still don't like the library you can google NeHe WebGL tutorials



#5 Rld_   Members   -  Reputation: 1520

Like
0Likes
Like

Posted 08 January 2014 - 06:18 AM


The code is open source, ThreeJS is after all a wrapper to WebGL; being that it is open source it would do you good to look at the code.  Also the library isn't strictly for making video games, they have a huge demo base located here

 

I would not do that until you at least have a bit of experience. I don't know how big it is, but if you don't know where to look at or what things do, this might be a tad overwhelming.

 

I don't know anything about webgl and I don't know if the NeHe tutorials are good in that regard. The old normal opengl ones are outdated as far as I know, but in the time they were of good standard, so I would think these are surely worth a look at.

 

There are also plenty of starter OpenGL and DirectX tutorials out there that start with setting up visual studio and such and explain in good enough details what what does and such. 



#6 s.howie   Members   -  Reputation: 138

Like
0Likes
Like

Posted 08 January 2014 - 04:11 PM

Thank you, both, for your replies. They are greatly appreciated.

As far as reading materials go, I am very happy with the books and tutorials I have already sourced.

What I am interested in finding is a set of problems to exercise my grasp on the knowledge I've gained from the reading materials.

Some example exercises may be:

- Write a program that renders a cylinder that meets a specific set of parameters (easy with a framework, harder without).
- Write a program that renders a pyramid that meets a specific set of parameters.
- Write a phong shader.
- etc

#7 Rld_   Members   -  Reputation: 1520

Like
2Likes
Like

Posted 09 January 2014 - 01:56 AM

Alright, here something you can do: Make your own framework, This will be the base of every exercise afterwards.

 

  • Create a basic framework in which you can render a triangle.
  • Give that triangle a color through a shader.
  • Achieve this effect: http://www.packtpub.com/sites/default/files/Article-Images/4767OS_01_04.png
  • Extend your framework so it supports materials in a way it's easy to re-use and support for lights so they're easy/easier to define. (this is just to make your life easier)
  • Have a camera class you can traverse the scene with.
  • Create different lighting models and play around with different material properties.
  • Create a particle system.
  • Extend the framework with a model loader (wavefront obj should do fine for now).
  • Extend the framework so it supports post processing effects.
  • Make the scene grayscale through a post process effect. (or when confident, make a blur)
  • Adjust the framework to your liking so you can easily (re)create scenes without a lot of effort.
  • Play around with different effects.
  • Think of a real life scene or something from a game and try to recreate it as best as possible.

With the last point for example I tried creating an underwater scene as realistic as possible with the simplest effects possible. I studied how water and light react with one another, why certain phenomena happen (light shafts, why water is blue-ish, why it gets darker when going deeper, etc) and tried to recreate that without doing it physically accurate. There was no stopping me from doing so, but I had a deadline so I wouldn't be able to make that in time. (was a college specialization project).

 

You can do this with everything basically, observe and create. Figure out how certain things are done already. Skim through the graphics programming section of this forum and see what others are doing and so something similar.

 

The above list is by no means the golden way and I might have missed some steps in between, so for others, feel free to pitch in. But at least this should keep you busy for a while and get your experience up in a way you can figure out what you want to do next as there is always room for improvement or new techniques to try out :)

 

Good luck!



#8 Solid_Spy   Members   -  Reputation: 454

Like
0Likes
Like

Posted 09 January 2014 - 03:36 AM

When I learned how to first set up graphics, I tried out the tutorials from RasterTek, and it was a very helpful website, although it does a lot of things that should be done with GLEW, it still teaches all the basics, and can get you started with shaders etc.

#9 studentTeacher   Members   -  Reputation: 904

Like
0Likes
Like

Posted 09 January 2014 - 11:46 AM

Just to add one more thing to the list: I started with just trying to do what I wanted to do! I wanted to make terrain, so I started as said above, making a triangle, adding materials, learning shaders, a camera class for movement, and then doing the terrain -- a triangle grid, height-maps, etc. If there's things in particular you want to do, those can definitely drive your studies. Try something out like that if you feel stuck or unmotivated.....but overall Rld_ has the idea correct :)



#10 s.howie   Members   -  Reputation: 138

Like
0Likes
Like

Posted 09 January 2014 - 08:48 PM

Thank you, everyone, for your replies.

 

@Rld_

 

Thank you for the time you took to outline a sequential set of exercises that build one on top of the other. That's fantastic (and there is a lot of work there to keep me busy)!

 

@studentTeacher

 

Thanks for the inspirational anecdote of your own learning experience. I do find I learn better when I am exploring my own interests, so I will take this on board.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS