Do you need a 3rd person camera rotating around the player?
If so, I recommend you to use quaternions. It's much easier.
If not, can you describe what you want more clearly?
Btw, I don't recommend you to deal with LookAt and Eye vectors. You can define a world transform for your camera because it's quite easy to perform some transformations (translate, rotate etc.) over a world matrix. And when you need a view matrix, just take the inverse of this world matrix.
- Viewing Profile: Posts: programci_84
Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics
Community Stats
- Group Members
- Active Posts 415
- Profile Views 2,021
- Member Title Member
- Age 28 years old
- Birthday July 14, 1984
-
Gender
Male
-
Location
Istanbul, Turkey
333
Good
User Tools
Latest Visitors
Posts I've Made
In Topic: Rotating camera around player origin
17 May 2012 - 11:04 PM
In Topic: Problem with shaders
09 April 2012 - 08:10 AM
I think your problem comes from depth output:
Why are you writing 1.f to DEPTH semantic output?
I think this will cause that all pixels' depth value would be 1.f; so everything would be invisible (according to your Z-Buffer config.).
Sorry, I didn't read your last sentence about you fixed it. Never mind
hth.
-R
// Pixel shader output structure
struct PS_OUTPUT
{
float4 Color[4] : COLOR0;
float Depth : DEPTH;
};
PS_OUTPUT ps_main (void)
{
//...
Out.color = blah;
Out.Depth = 1.f; //WHY THIS?
return Out;
}
Why are you writing 1.f to DEPTH semantic output?
I think this will cause that all pixels' depth value would be 1.f; so everything would be invisible (according to your Z-Buffer config.).
Sorry, I didn't read your last sentence about you fixed it. Never mind
hth.
-R
In Topic: Mesh collisions
06 April 2012 - 08:26 AM
Physics engines are not designed for a specific graphics library such as DX or GL. Their main goal is to make physical calculations and return final transformations of registered objects/primitives. And your job is to get that transformation data and use for your needs.
PhysX is the most popular physics engine. Now it became free for commercial and non-commercial applications. You can use it. The first important thing you must know about it is that the matrix structure of the engine is column-major but in it's row-major in DX.
On the other hand, Bullet is another popular engine. It's open source and developed by a Sony R&D employee. I know it's used in some animation movies like Toy Story.
hth.
-R
PhysX is the most popular physics engine. Now it became free for commercial and non-commercial applications. You can use it. The first important thing you must know about it is that the matrix structure of the engine is column-major but in it's row-major in DX.
On the other hand, Bullet is another popular engine. It's open source and developed by a Sony R&D employee. I know it's used in some animation movies like Toy Story.
hth.
-R
In Topic: Altitude0 - plane racing at height 0
06 April 2012 - 12:09 AM
I'm an engineer (yes, really I am
). I always think about the physics and find the nonsense things on other racing games (like Racedriver: GRID, NFS series etc.) but I don't care about the physics on this game; because it looks very entertaining 
Keep up the great work man!
Cheers!
Keep up the great work man!
Cheers!
In Topic: Question about occlusion culling
05 April 2012 - 11:34 PM
I think there's a good explanation about occlusion culling in GPU Gems 3. You can find it on nVidia's website; it's free to read.
Btw, I don't use occlusion culling. I don't know whether this will be helpful or not, but here's a list of what I'm doing:
1) Checking visibility: By using view frustum and bounding volumes. It's quite easy.
2) Filling Z-Buffer: First, setting ZWriteEnable to TRUE, ZEnable to TRUE and ZFunc to LESSEQUAL. Then I'm rendering the visible objects (returned from the prev. step) to only Z-Buffer (i.e. don't touch the front-buffer or any pixel) with a front-to-back order (Ordering is calculated in view space).
3) Rendering with Z-Culling: First, setting ZWriteEnable to FALSE, ZEnable to TRUE and ZFunct to EQUAL then rendering the objects.
This technique is called "Early Z Culling" and works well for forward renderers (like CryEngine 2 and Doom 3 Engines). With this technique, pixel shader won't be executed for invisible pixels (maybe invisible objects). I cannot say anything about performance comparison between occ. culling and this one; try and see.
hth.
-R
Btw, I don't use occlusion culling. I don't know whether this will be helpful or not, but here's a list of what I'm doing:
1) Checking visibility: By using view frustum and bounding volumes. It's quite easy.
2) Filling Z-Buffer: First, setting ZWriteEnable to TRUE, ZEnable to TRUE and ZFunc to LESSEQUAL. Then I'm rendering the visible objects (returned from the prev. step) to only Z-Buffer (i.e. don't touch the front-buffer or any pixel) with a front-to-back order (Ordering is calculated in view space).
3) Rendering with Z-Culling: First, setting ZWriteEnable to FALSE, ZEnable to TRUE and ZFunct to EQUAL then rendering the objects.
This technique is called "Early Z Culling" and works well for forward renderers (like CryEngine 2 and Doom 3 Engines). With this technique, pixel shader won't be executed for invisible pixels (maybe invisible objects). I cannot say anything about performance comparison between occ. culling and this one; try and see.
hth.
-R
- Home
- » Viewing Profile: Posts: programci_84

Find content