Jump to content

  • Log In with Google      Sign In   
  • Create Account


dpadam450

Member Since 18 Nov 2005
Offline Last Active Yesterday, 04:38 PM

#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:

 

this->at
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

http://www.opengl.org/sdk/docs/man/xhtml/glTexParameter.xml

MIN_LOD, MAX_LOD, BASE_LEVEL, MAX_LEVEL

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;
}

?


#4964663 Really Big Textures?

Posted by dpadam450 on 30 July 2012 - 06:47 PM

You have a texture that is 12000x12000? ..........sigh

Kill whoever built it. max texture size is 8192x8192 unless it got bumped up even more that I dont know of. But that doesnt matter, no texture for an object needs to be that big.

Downsampling will work but im looking to get really good detail out of the object

I've seen plenty of detail out of 2048 textures, most of the time not needed 4096 textures. I would post a pic because that doesnt make any sense. Unless you plan to in game hold a microscope and zoom it in 10x.

If for say a gigantic spaceship, then this should have been built with multiple uv textures/uv coordinate sets. So each section would be a separate model/texture. If you need tiny detail, multiply a tiled black and white detail map and blend that with the other lower res textures. Or do the same: tile a detail normal map over the object.


#4963644 Help with Shadow Mapping and Multi-Texturing

Posted by dpadam450 on 27 July 2012 - 08:29 AM

Look up cross product right hand rule. The order of the two vectors matters.


#4963458 Help with Shadow Mapping and Multi-Texturing

Posted by dpadam450 on 26 July 2012 - 04:49 PM

If your quads are supposed to be evenly lit, then you are probably taking the wrong vertices to cross and doing them in the wrong order causing some to be negative.


#4963362 glRotatef behaves strange

Posted by dpadam450 on 26 July 2012 - 10:45 AM

Use glOrtho instead of gluPerspective.

If you hold your hand 45 degrees like the image and put it far left of your head and them move it towards the right, you will see the same thing. On the left your hand is facing you, on the right it is facing away from you and distorted because you are looking down the side of the hand and cant see the front anymore.




PARTNERS