Page 1 of 1

3,125 Raindrops drawn per game frame!

Posted: Sun May 30, 2010 5:03 pm
by Cakester
Instead of making a new thread I will just put my new video in this.

As promised, I have figured out how to draw custom meshes at run-time via code. In this example I combined three nested for loops to draw each game frame. The X , Y, and Z are increased in value based upon Elapsed Time, a random number between 1 and 3, and a set of arbitrary values.

Video, http://www.youtube.com/watch?v=dU0-h5oYX38
The game uses a ModelViewProj matrix (equivalent to WorldViewProj). This matrix needs to be set with SetVertexShaderConstantF.
To make the matrix it is a bit tricky.

First you multiply the current world transform by the current view transform. Then multiply the WorldView by the current Projection. But before you can use this final matrix you need to switch some values around in the 4x4. If you need the code for that I can provide it to you.

Now that I am confident I can draw the raindrops where I want at any time, I can either move on to making the rain fall in a natural way from the sky, or work on making it so the rain drops do not penetrate solid collision objects. Both will be done before the end, but are separate challenge I believe.

Oh and if you are wondering about the exact dimensions of the rain show in that video, it is 25x25x5. 25 x, 25 y, and then 5 layers of z.

So yeah I hope this makes up for my absence over the past couple days. (life issues)

Re: 3,125 Raindrops drawn per game frame!

Posted: Sun May 30, 2010 5:21 pm
by The Philadelphia Lawyer
Cakester wrote:Instead of making a new thread I will just put my new video in this.

As promised, I have figured out how to draw custom meshes at run-time via code. In this example I combined three nested for loops to draw each game frame. The X , Y, and Z are increased in value based upon Elapsed Time, a random number between 1 and 3, and a set of arbitrary values.

Video, http://www.youtube.com/watch?v=dU0-h5oYX38
The game uses a ModelViewProj matrix (equivalent to WorldViewProj). This matrix needs to be set with SetVertexShaderConstantF.
To make the matrix it is a bit tricky.

First you multiply the current world transform by the current view transform. Then multiply the WorldView by the current Projection. But before you can use this final matrix you need to switch some values around in the 4x4. If you need the code for that I can provide it to you.

Now that I am confident I can draw the raindrops where I want at any time, I can either move on to making the rain fall in a natural way from the sky, or work on making it so the rain drops do not penetrate solid collision objects. Both will be done before the end, but are separate challenge I believe.

Oh and if you are wondering about the exact dimensions of the rain show in that video, it is 25x25x5. 25 x, 25 y, and then 5 layers of z.

So yeah I hope this makes up for my absence over the past couple days. (life issues)
*Head explodes*

Posted: Sun May 30, 2010 5:26 pm
by MR Snake
Upgrade your choppy computer.

Posted: Sun May 30, 2010 5:56 pm
by Cakester
WTF. Everyone accuses me of having a shit computer or that the mod itself most be a poor design.

FUCK YOU MAN. I work my ass off, and the shit I show you is recorded with the best CamCorder I have.

And honestly the best CamCorder has nothing to do with maximum performance possible . I like not having to convert gigabyte in size files every fucking time i want to show people something. So i stick with what i know, and what i know gives me decent quality videos that i can upload and not have to wait for conversion or an entire day for it to be processed to even show that EXTRA QUALITY you seem to think is possible.

Posted: Sun May 30, 2010 8:08 pm
by gobbleykins
Put yo gun away fool, what are you gonna do with it, shoot raindrops?

Posted: Tue Jun 01, 2010 3:57 pm
by inomel
Acid raindrops keep faalllin on my head!

Posted: Tue Jun 01, 2010 5:28 pm
by MR Snake
Cakester wrote:WTF. Everyone accuses me of having a shit computer or that the mod itself most be a poor design.

FUCK YOU MAN. I work my ass off, and the shit I show you is recorded with the best CamCorder I have.

And honestly the best CamCorder has nothing to do with maximum performance possible . I like not having to convert gigabyte in size files every fucking time i want to show people something. So i stick with what i know, and what i know gives me decent quality videos that i can upload and not have to wait for conversion or an entire day for it to be processed to even show that EXTRA QUALITY you seem to think is possible.
Get fraps then convert the shit into an avi and stop your crying. If you want to cry then go to the wasteland. I dont want to watch that choppy shit because it hurts my eyes.

Posted: Wed Jun 02, 2010 6:53 am
by Psychoul
i dont get how those things are raindrops. can someone explain.
in english

Posted: Wed Jun 02, 2010 2:30 pm
by St. Toxic
Psychoul wrote:i dont get how those things are raindrops. can someone explain.
in english
Cakester wrote:(life issues)
I think that's about as good an answer as you'll ever get.