Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 18 Nov 2005
Offline Last Active Oct 17 2014 01:04 PM

#5072054 Environment reflection & fresnel correct ?

Posted by dpadam450 on 22 June 2013 - 12:37 PM

Just listen to the real world:

Smooth and Wet Rocks

Medium Rough Rocks
Very Rough Rocks
Very Rough Rocks

If you still want to keep it then at the very least, remove the specular from one side of the rock.

#5071948 Environment reflection & fresnel correct ?

Posted by dpadam450 on 22 June 2013 - 12:51 AM

Well I'm looking directly down my white painted walls matched right down line of sight and there is not noticeable fresnel from either light. I've never seen a rock ever perform mirror like specular, ever.

What is right is what looks good. Take a rock outside pt it in direct sunlight, move around it and observe and determine what is happening. That is how you should determine what to do. Or bring a rock inside and move a light around the rock and observe the same point/edges around that rock to see if it reflects that way.

#5071897 Environment reflection & fresnel correct ?

Posted by dpadam450 on 21 June 2013 - 05:13 PM

I looked at the rock and knew immediately it didnt look right. Why would your rock have any specular let alone fresnel reflection....

It looks wrong yes. If it is supposed to be wet, the specular would be more white and a higher specular exponent power.

#5071190 Rotation based on normal vector

Posted by dpadam450 on 19 June 2013 - 12:33 PM

You are essentially making the cars up axis, the terrain's up axis at a given point.  So if your car is exported with the up-axis directly up (Y-Axis), you can figure out two angles needed to rotate that car (or just think of its up axis), to rotate and match the terrains up axis.  Rotating the car on the Y-axis would only spin it and not manipulate the direction that "up" is. So you need to rotate some degrees on the x or z, then some on the y and your cars up will match the terrains up.

If you view down the z-axis (2d), your two vectors can drop the z-component so that you make it a 2d problem and you can dot product and find the angle with it by using the vectors (0,1,0) and (normal.x,normal.y, 0) , then spin it by that angle on the z-axis. You have to visualize it this way and you will understand.  You then view the vectors top down from the y-axis. Use your new rotated vector, take the dot product between that vector and your normal vector dropping the y-components since you are viewing top down and don't care about the height. You then find the rotation to use on the y-axis to match your normal.

#5063025 Render to a texture without using a FBO ?

Posted by dpadam450 on 19 May 2013 - 10:48 AM

Render to the screen, glCopyTexImage to copy screen to texture.

#5050461 Shadows Mapping - Triangle Casting Shadows On Self

Posted by dpadam450 on 05 April 2013 - 07:00 PM

I ended up forcing shadows on fragments who's normal was facing away from the light.

That is actually what I was saying.  Now do the other thing I said which is render into the shadow map with culling GL_BACK, so taht front facing triangles render into the shadow map, just like how normal rendering from the eye works. Then you wont have those awful bleeding spots around the areas touching the floor.

#5042961 Understanding skeletal animations

Posted by dpadam450 on 13 March 2013 - 10:03 PM

Obviously things are in one matrix space and not the one you want. Have your artist edit the messed up skeleton down to 1 single bone. Have him edit the geometry down to a cube. Have him do 3 snapshot frames. Rotated 90 on the x only, 90 on y only , 90 on z only. Look at what comes out and try to make logic of it. Does a rotation on the x designate a y rotation? Make sure he edits and doesnt create new ones so that you can verify the data is identical and not some new object that may be working in the frame you want.

The skeleton may have an object level rotation. Meaning after creating the skeleton, the user selected it as a whole and rotated. This caused problems for me in blender so I got lazy and didnt fix it. I make sure the skeletons matrix is the identity and then if I need to fix the skeleton to point down the z I edit the skeletons bind pose itself, not the actual skeleton object, or any keyframes.

#5040448 Attempting to create a pool allocator

Posted by dpadam450 on 07 March 2013 - 10:58 AM

Your use of class member variables should take note of being a member variable by either:


or naming it

m_at; (m_ noting it is a 'member' variable)

You may also want to return a void* instead of char* since you are technically return a pointer to not a char but a random object (could be a GameObject*, int*, Texture*)

#4979850 Cylindrical texture coordinates

Posted by dpadam450 on 13 September 2012 - 03:46 PM

So the only solution to this would be to have 3 texture coordinates for each triangle, rather than to have one texture coordinate for each vertex. Do people usually do that?

the texture fragment would be spanning across almost the whole texture!

What the hell are you talking about. How does a texture fragment which has a single pixel from a texture have a whole texture mapped to it? That's impossible. And to unwrap a cylinder to a texture you only need 2 uv's. You have to have a seam obviously. Take a soup can without top/bottom, cut the label from top to bottom and unfold. It is 2d applied to a cylinder.

#4977481 Valve introduce greenlight fee - is $100 too much?

Posted by dpadam450 on 06 September 2012 - 09:43 PM

It was my understanding that anyone could release on Steam until greenlight came out. All these years I was tricked into thinking how cool and awesome Steam was, and yet it's nothing I thought it was. Apparently it charges about 30-40% for each sale too which is pretty steep for a company that I hear is built by indies for indies and innovation.

Why do they need to charge? greatness in a pool of garbage will rise to the top by votes from users. That's how iphone/android work, and that's how kickstarter works.

I think the overall issue I have with it is that when I spend money on something I want something in return. I'm paying 100 dollars for.....a tiny icon to click on greenlight in hopes that people will upvote and then after all the upvotes have second hopes that Steam will let me through? Pretty lame for 100 bucks.

#4975230 select mimap level?

Posted by dpadam450 on 31 August 2012 - 03:13 PM



Setting 2 of those should do it.

#4974156 Maintaining aspect ratio in fullscreen mode

Posted by dpadam450 on 28 August 2012 - 10:05 AM

0,0 is relative to the windows 0,0 and not the desktop. If you didn't know that already, I suggest you just start diving in to opengl. You don't need scissoring for the viewport. If you simply started opengl you would figure that out almost immediately. Not sure what centered on the screen means.

#4969629 Rotate flat surface in 3D space

Posted by dpadam450 on 14 August 2012 - 04:49 PM

There are 2 matrices. Projection and Modelview. You set them up separately. glMatrixMode(). A modelview matrix does not have a projection matrix.

#4969563 Rotate flat surface in 3D space

Posted by dpadam450 on 14 August 2012 - 12:45 PM

No idea what you are talking about. What is a flat 3D object? a 2d object...?... a 3d plane?
Using 2D instead of 3D in your gl calls means you dont get perspective, and your objects are 2d.

#4965305 Moving object on a path

Posted by dpadam450 on 01 August 2012 - 03:13 PM

position.x += direction.x;

if(direction > value)
direction.x *= -1;