Jump to content

  • Log In with Google      Sign In   
  • Create Account


Burnt_Fyr

Member Since 25 Aug 2009
Offline Last Active Aug 22 2014 08:22 PM

#5137042 Billboard Matrix Generation C++, DX11

Posted by Burnt_Fyr on 06 March 2014 - 08:03 PM

http://swiftcoder.wordpress.com/2008/11/25/constructing-a-billboard-matrix/

 

be for warned that the article above uses column vectors, and so the matrices may need to be flipped along the diagonal

 

EDIT: Nehe's tutorial might be a better fit for you: http://nehe.gamedev.net/article/billboarding_how_to/18011/




#5134568 Audio Programming

Posted by Burnt_Fyr on 25 February 2014 - 04:09 PM

After writing my own sampler and mixer with XAudio2, I can tell you that there was little information easily found on the internet at all. I have previously noted that gamdev does not have a specific forum devoted to audio programming.

 

I assume that your prior knowledge on DSP is not code related, but on how these work on waveforms. If that's the case, I would look into how to manipulate waveforms and attempt to recreate the tools of trade as used in the studio, amplitude effects such as compressors/limiters or expanders, delay effects like flanging and reverb, and filter effects like phasers, EQ, and wahs. This would tap into your knowledge of DSP and give you stuff to work on with your hobby coding.




#5134564 Legacy code (what's it and how is related to c++)?

Posted by Burnt_Fyr on 25 February 2014 - 03:45 PM

I don't have anything to add here, but I find it unsettling that the OP's posts have almost universally received negative ratings. Is this necessary? I realize the posts show a lack of knowledge, but that is why the thread was started in the first place. It seems they are being punished for asking a question, IMHO.




#5124419 Component based game and component communication

Posted by Burnt_Fyr on 17 January 2014 - 09:47 AM

I have handled this by using a seperate store for components rather than storing them in the entities or systems themselves. The systems operate on the stores themselves. Now I don't worry about a post movement update to copy the position to the physics components or a pre physics update to grab the current postion and transform. As the data exists seperately from the system. So my components are not coupled, and neither are the systems. The systems that need access to components will contain references to the stores for those components. Every problem can be handled by another layer of abstratction is a motto that I see to live and die by more and more.




#5096247 CreateWindowExW not setting window title

Posted by Burnt_Fyr on 23 September 2013 - 01:55 PM

 

You might try passing (LPCWSTR)"blargh" rather than L"blargh"


Why would you convert a const char* pointer to a const wchar_t*? I can't think of a situation where that even makes sense.

 

He isn't. Did notice the title of the thread? CreateWindowExW points out that this is a unicode build.




#5096225 Direct3D 11 Questions

Posted by Burnt_Fyr on 23 September 2013 - 01:03 PM

Actually, MJP is the Pettineo and I'm the Zink from your list of authors smile.png  Can you please specify more precisely where in the book something is unclear about the resource usage?  If it would help others, then I can add a mention of something like that on the Hieroglyph 3 codeplex page.

 

Be honest, you loved saying that :)




#5091814 is prototyping always necessary ?

Posted by Burnt_Fyr on 05 September 2013 - 10:18 AM

No. you could go straight to programming if you prefer. But at the end of 3 months-3 years, you might end up with a dud. Prototyping is just a means to ensure that your idea has enough merit to put in those long hours. If the prototype stinks, think of the time you saved that could be put to better use.




#5091783 A woo who moment with vehicle and terrain alignment need advise

Posted by Burnt_Fyr on 05 September 2013 - 07:58 AM

The normal is used for finding the angle between the object and the terrain. both of these normals(object,terrain) should be pointing relative uppish, and the angle you get is the one that will rotate one onto the other. If your using the wrong normal(0,-1,0) for one, but still get the right results, then you are likely using the wrong normal for BOTH.

 

I think that the issue is in your calculation of the terrain normal, or, when creating the rotation axis, you are specifying the normals in the wrong order. When you take the 3 points and get the 2 vectors, you should probably use c-a, and b-a to create U and V vectors. which if i my math is correct will give the proper normal. Remember that the cross product is not associative, which means that x^y = z != y^x.




#5091614 How do I create the equation for a curve?

Posted by Burnt_Fyr on 04 September 2013 - 01:29 PM

Are you looking for a quadratic that goes through those 3 points, or are controlled by those 3 points?

 

If controlled, a point p on a curve c can be found using t, where 0 < t < 1 from start to finish.

 

v0 = (1-t)*x + t *y

v1 = (1-t)*y + t * z

 

and finally:

 

p = (1-t)*v0 + t*v1

 

if you are looking for a curve that fits those 3 points, i'm not 100% sure, but I think that more than 1 curve could fit.

 

EDIT: I stand corrected. Essentially you create the quadratic for each point and then with those 3 equations, Solve for a,b, and c.

EDIT2: I think i feel vindicated, multivariable quadratics would allow for an infinite number of quadratics that fit those points




#5089182 Debugging DX11 Shaders as a hobbyist.

Posted by Burnt_Fyr on 26 August 2013 - 08:47 AM

I've found intels GPA to be a suitable replacement. I recently moved from x9 to x11 and although i had to go right back to a simple triangle to get anything on screen, i was able to debug the issues i had. After that i was able to bring back most if not all of my frameworks capabilities within a week or so.




#5084583 Particles Rotation

Posted by Burnt_Fyr on 09 August 2013 - 08:32 PM

ok, so using your process:

 

f = -0.5f * particleSize;
D3DXVECTOR3 vertical(0,1*f,0)

 

this *might* work. The issue is that you you are using the camera's up vector as the up for your particle. As you pitch the camera(what you call a vertical rotation) the camera's up vector changes, which causes your vertical vec3 to point somewhere that is not aligned with the world up. By using the Y axis(which i assume to be world up) directly, as shown above, you ensure that the particle's quad is parallel to the Y axis.




#5084448 Particles Rotation

Posted by Burnt_Fyr on 09 August 2013 - 12:46 PM

I think what you want is for the particles to face the camera, but still be constrained to the up/down of the world.

Vec3 up = world.up; // (usually (0,1,0)
Vec3 side = crossproduct(up, -camera.forward);
vec3 forward = crossproduct(side,up);
 
Matrix4 particleworld= (  Vec4(side, 0), Vec4(up,0), Vec4(forward,0), Vec4(particle.position, 1));

as long as your camera cannot look directly up or down this should work. EDIT: but be forewarned, i'm low on caffeine at the moment.




#5081957 Good book on physics and collision detection.

Posted by Burnt_Fyr on 31 July 2013 - 10:47 AM

Christer's book is by far the best i've seen on collision. I liked Physics for Game Programmers, though I've had others tell me it was a shyte book, I haven't got a chance to check out Eberly's book, but have used WM as a reference for lots of math/mesh related things.




#5080567 Combining 2 world matrices

Posted by Burnt_Fyr on 25 July 2013 - 03:01 PM

rather than sending the identity view matrix, send the same view as you would normally, but send the inverse view matrix as the 1stperson  world transform. This is the same as your cameras world transform. It should keep the weapon at the same spot on the screen, but your gun will be in the correct location for lighting.




#5069610 Rotation in 3D

Posted by Burnt_Fyr on 13 June 2013 - 07:24 PM

hmmm.... It's not that, as the (position.forward * velocity) will create a new variable on the stack before being added to the position.

//remember that the matrix in this form

[ X Axis,0]
[Y Axis, 0]
[Z Axis, 0]
[Position,1]

//is a local->world transform. The view transform is the opposite; world->camera. Invert the matrix before you send it to the directx device.

If that's not it, well post the updated code, and we'll have another peek.






PARTNERS