3,125 Raindrops drawn per game frame!

Since Bethesda decided to make Fallout 3, we figured we might as well have a forum about it.
Post Reply
User avatar
Cakester
They call me Bum Tickler
Posts: 420
Joined: Wed Jul 22, 2009 6:24 pm

3,125 Raindrops drawn per game frame!

Post 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)
User avatar
The Philadelphia Lawyer
Scarf-wearing n00b
Scarf-wearing n00b
Posts: 26
Joined: Sun May 23, 2010 9:06 pm
Location: In your grill!

Re: 3,125 Raindrops drawn per game frame!

Post 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*
Ew... ghoulification...
MR Snake
Chinderella
Chinderella
Posts: 2228
Joined: Sat Aug 02, 2003 8:07 pm
Location: Fapping in my mothers basement

Post by MR Snake »

Upgrade your choppy computer.
Do these glasses and my two chins make me look sexy?
User avatar
Cakester
They call me Bum Tickler
Posts: 420
Joined: Wed Jul 22, 2009 6:24 pm

Post 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.
gobbleykins
Vault Veteran
Vault Veteran
Posts: 320
Joined: Thu Feb 25, 2010 8:49 pm
Location: Canada

Post by gobbleykins »

Put yo gun away fool, what are you gonna do with it, shoot raindrops?
User avatar
inomel
Wanderer
Wanderer
Posts: 422
Joined: Fri Feb 19, 2010 1:25 am

Post by inomel »

Acid raindrops keep faalllin on my head!
Appearing stupid is sexier than being stupid. Although I hear stoopid was a cut perk in fallout three, but was abandoned when the devs found out it could be simulated by simply playing the game...
MR Snake
Chinderella
Chinderella
Posts: 2228
Joined: Sat Aug 02, 2003 8:07 pm
Location: Fapping in my mothers basement

Post 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.
Do these glasses and my two chins make me look sexy?
User avatar
Psychoul
Elite Wanderer
Elite Wanderer
Posts: 625
Joined: Sun Nov 25, 2007 9:57 am
Location: Oil Rig

Post by Psychoul »

i dont get how those things are raindrops. can someone explain.
in english
User avatar
St. Toxic
Haha you're still not there yet
Haha you're still not there yet
Posts: 3378
Joined: Fri Dec 31, 2004 3:20 am
Location: One-man religion.
Contact:

Post 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.
Post Reply