Jump to content

  • Log In with Google      Sign In   
  • Create Account

iwoplaza

Member Since 06 May 2012
Offline Last Active Mar 18 2015 10:52 AM

Posts I've Made

In Topic: Efficient way to read .obj files in Visual Studio 2013

22 August 2014 - 05:54 AM

There probably are, but writing your own .obj file loader is a good challenge :). I wrote my own some time ago, and I even have my own model format now xD.

 

I used stdio's FILE to load the file line by line, and then check if the line starts with "v" (for the verticies), and if yes, it used fscanf to get the rest of the data in the line :).


In Topic: [C++, OpenGL, GLSL] Point light lits up objects like a directional light.

21 August 2014 - 02:28 PM

The Y axis is the up direction of my scene. 


In Topic: Quick Multitexturing Question - Why is it necessary here to divide by the num...

21 August 2014 - 09:22 AM

You have to devide it by two, because you are actually trying to get the average of these two textures.

Imagine that you have a red texture and a black texture. By mixing these two you would expect it to turn out as a darker red. It wouldn't, because you are not getting the average of them, you are just adding them together, so:

(red: 1.0, green: 0.0, blue: 0.0) + (red: 0.0, green: 0.0, blue: 0.0) ==(red: 1.0, green: 0.0, blue: 0.0)

BUT

(red: 1.0, green: 0.0, blue: 0.0)/2 + (red: 0.0, green: 0.0, blue: 0.0)/2 ==(red: 0.5, green: 0.0, blue: 0.0)

 

I hope it helped :).


In Topic: Cutting of a piece texture with a different texture.

12 April 2014 - 01:52 AM

Thank you very much :D! +1 for you. But what if I had a vector of 2D points, and I would want all of them to make holes in "the texture", and the number of the points is specified in a variable, so it can change anytime? Can I add multiple textures of "the hole" to the multitexture? Or is it possible to combine all of the "holes" that point made into one texture, and use it in the multi-texture?

 

Thanks in advance :)


In Topic: Need help: a vector of different extended classes

15 March 2014 - 02:16 PM

Thanks for everything guys :)


PARTNERS