Page 1 of 1

3D Framework - scene with sphere! As detailed as needed.

Posted: March 19th, 2017, 10:37 pm
by Byteraver
Hi everybody, in order to learn to understand Chili's 3D Framework I added a scene with a sphere (the first scene actually so I didn't have to hit the tab button each time :mrgreen: ). You can choose how many "slices" the sphere is made of in each direction (from 0 .. 2 PI and from top .. bottom), just change the values at the top of sphere.h:

Code: Select all

    static const int NrHSlices = 20;
    static const int NrVSlices = 16; // top & bottom disc included
I thought you might like it. I'm sorry for the messy colors, ran out of time to fix that. But you get the idea ;)
I should've posted this as a separate branch on github but I couldn't be bothered to figure out how to do that.
I'm afraid I had to make a default constructor for your IndexedTriangleList Chili, sorry ;)

Re: 3D Framework - scene with sphere! As detailed as needed.

Posted: March 20th, 2017, 3:45 am
by chili
Hey that looks good man! Well, I mean the color scheme is a little pukey, but the sphere looks good :)

I'm gonna be using a sphere when we get to gouraud shading in the future.

Re: 3D Framework - scene with sphere! As detailed as needed.

Posted: March 20th, 2017, 7:23 am
by Byteraver
Will you go directly to Gouraud shading or start with Larousse shading, then Gouraud, then Phong shading? Can't wait to see the tutorials! I kind of know how they work but implementing them is another matter of course.

Re: 3D Framework - scene with sphere! As detailed as needed.

Posted: March 20th, 2017, 7:54 am
by chili
It'll be flat shading -> Gouraud (per vertex) -> phong (per pixel) and then ill talk about specular and finally normal maps.