Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
heeen
May 14, 2005

CAT NEVER STOPS





video! http://heeen.de/proj/refract.avi

Adbot
ADBOT LOVES YOU

heeen
May 14, 2005

CAT NEVER STOPS

Dr. Stupid posted:

Is this you own algorithm or something you "just" implemented? Cause it looks pretty drat nice.

It's actually not so big of a deal, just raycasting a refracted viewing vector in the fragment shader, which fragments can see which part of the underwater scene is the tricky part. The idea is from me and my CG professor for what you could call bachelor's thesis.

heeen
May 14, 2005

CAT NEVER STOPS

Zagrod posted:



Are the broken walls modelled or do you use some kind of procedural shader to generate the plaster?

heeen
May 14, 2005

CAT NEVER STOPS

Nomikos posted:

I got sick of how all available music-visualization plugins had really poor spectrograms, so I made my own.


This is someone playing the piano and singing.


This is tremolo at the end of a guitar solo.

Unfortunately glDrawPixels() takes up an ungodly amount of CPU time for some reason; at the size above it's already using 100% of one core. Still trying to find a good way to draw lots of pixels to the screen very fast...

It's written in Haskell and uses PortAudio for the backend. For the screenshots above I connected it to the output of Amarok using JACK.
looks like writing your values into a 1D-texture and doing the scrolling in a fragment shader or something like that might be a possibility.

heeen
May 14, 2005

CAT NEVER STOPS

Nomikos posted:

Thanks for the suggestions about glDrawPixel alternatives. From my initial look at the GLSL tutorials, synchronizing the scrolling action between my program and the shader sounds difficult so I'll probably try the enormous-stream-of-vertices idea first.
You can just send the current "time" of your program to the shader via a uniform float variable.
The way I'd implement this is:

Render into a texture, using an orthographic projection:
* a thin quad with the new column of data all the way on the left
* next to it, filling the rest of the frustum a quad with the old data, change the texture coordinates on the right to cut off the oldest column of data

render to your main view:
* a quad with the texture created above

You don't even need a fragment shader. Make sure to not use texutre filtering in the first pass.

heeen
May 14, 2005

CAT NEVER STOPS




A little experiment I'm building, app engine based.

heeen
May 14, 2005

CAT NEVER STOPS
I'm trying to find the quad that covers a given triangle on the screen, as in the minimum and maximum screen coordinates of all three triangle points.
I'm calculating the normalized device coordinates of my points and take the minimum and maximum accordingly, however I have problems with points that lie behind the camera / the near plane.
Since they get a negative .w value, their x and y coordinates get flipped and somehow I can't seem to get it right.
However simply saying that their x- y- coordinates lie on the edge if their w component is negative has so far not proven successful.

code:
for(int i=0; i<3; i++) //original triangle
	{
		ndc_points[i]=(gl_ModelViewProjectionMatrix*gl_PositionIn[i]);
	}
(...)
	vec3 vmin, vmax;
	
	vec3 temp[3];
	temp[0] = ndc_points[0].xyz / ndc_points[0].w;
	temp[1] = ndc_points[1].xyz / ndc_points[1].w;
	temp[2] = ndc_points[2].xyz / ndc_points[2].w;
	
	for(int i=0;i<3;i++)
	if(ndc_points[i].z<0)
	{
			temp[i].x=-sign(ndc_points[i].x);
			temp[i].y=-1; // clamp to bottom edge :( -sign(...) does not always work
			temp[i].z=-1;
	}
	vmin.x=min3(temp[0].x ,temp[1].x,temp[2].x);
	vmin.y=min3(temp[0].y ,temp[1].y,temp[2].y);
	vmin.z=min3(temp[0].z ,temp[1].z,temp[2].z);

	vmax.x=max3(temp[0].x ,temp[1].x,temp[2].x);
	vmax.y=max3(temp[0].y ,temp[1].y,temp[2].y);
	vmax.z=max3(temp[0].z ,temp[1].z,temp[2].z);

	quad[0].w=1;
	quad[1].w=1;
	quad[2].w=1;
	quad[3].w=1;
	
	quad[0].xyz=vec3(vmin.x,vmin.y, vmin.z);
	quad[2].xyz=vec3(vmax.x,vmin.y, vmin.z);
	quad[1].xyz=vec3(vmin.x,vmax.y, vmin.z);
	quad[3].xyz=vec3(vmax.x,vmax.y, vmin.z);

	//emit quad

I just now realize, I have to take the other points of the triangle into account, because they determine if the camera is above or below the triangle... If the camera is below the triangle, i have to clamp to the top edge, if it is above ,I have to clamp to the bottom edge... hmmm

heeen
May 14, 2005

CAT NEVER STOPS
I think that dialog box should be painted blue :colbert:

heeen
May 14, 2005

CAT NEVER STOPS

RonaldMcDonald posted:

I just got done writing a little application to scan our file server for screwed up permissions. We had a lot of issues with directories that had permissions that made no sense so I wanted to clean up our server. Since I didn't find an application that helped much, I wrote one myself. Took maybe 100 hours.



If anyone's interested, the download is under
http://exar.ch/windows/
Heh, I was thinking about writing something very much like this, I'll give it a try.

heeen
May 14, 2005

CAT NEVER STOPS

Iniluki posted:

No where near as good as some of the stuff i've seen you guys post. But it's entertaining the hell out of me at the moment.


Click here for the full 800x641 image.


I'm in the middle of remaking a website that allows people to design their own ads to appear in our newspapers.

As we're a "family" paper no profianties are allowed in the ads, but they sometimes creep through.

So for the past day and a bit I've gotten to snoop around the internet looking for swear words to make a comphrensive list.

This is going to bite you in the rear end when it finds swear words when there were none intended. What if grandma Smith is missing her pussycat?

heeen
May 14, 2005

CAT NEVER STOPS

Stramit posted:

Here are two images i made in one of my old raytracers. I'm rejigging it to be actually nice and incorporate all the new coding stuff / performance i know since I wrote it originally (about 2 years ago).





Other then this I'm working on an iPhone turn based strat game (writing an editor atm). I'm not a massive fan on Obj-C so far, but it's not that bad I guess.
Can it do checkerboard surfaces?

heeen
May 14, 2005

CAT NEVER STOPS

heeen
May 14, 2005

CAT NEVER STOPS
A vintage terminal shader I'm working on: http://heeen.de/proj/screenshader.avi
edit: youtube: http://www.youtube.com/watch?v=d5uf0T8Yk74

heeen fucked around with this message at 21:54 on Feb 6, 2009

heeen
May 14, 2005

CAT NEVER STOPS
http://heeen.de/proj/picking.avi

heeen
May 14, 2005

CAT NEVER STOPS

Subdivision surfaces!

heeen
May 14, 2005

CAT NEVER STOPS

Hubis posted:

I hear the performance overhead for CUDA/GL interop is pretty bad, C/D?

Cuda:
Steps: 4 pre kernel 0.156981ms cuda 45.9069ms render 1.42665ms FPS: 21.0568 quads: 331008

Cuda Emulation:
Steps: 4 pre kernel 16.1864ms cuda 1684.88ms render 1.33251ms FPS: 0.587405 quads: 331008

Geforce 8800 GTS 320MB

heeen
May 14, 2005

CAT NEVER STOPS
Extending on my previous work, now refraction + caustics:


http://heeen.de/proj/refractioncaustic.avi

heeen
May 14, 2005

CAT NEVER STOPS

akadajet posted:

Are the caustics just random, or are they actually calculated based on the surface normals?

The caustics, as is what the camera sees, are raycasted in fragment shaders.

Jo posted:

That's very much a thing of beauty. Didn't see much in the way of documentation in /proj, though. Have you a source or publications page?

I can upload the previous work without caustics, I have yet to write the paper about the caustics extension.
http://heeen.de/proj/thesis_refraction.pdf

heeen fucked around with this message at 09:20 on Apr 20, 2009

heeen
May 14, 2005

CAT NEVER STOPS

Nam Taf posted:

What are those white line artifacts around the side of the pool caused by?

the caustic is rendered into an offscreen texture (bottom) and it indexes into it, sometimes it misses the correct spots, due to the correct refraction. Working on this.

Here's a version that is more sexy:
http://heeen.de/proj/refractioncaustic_filtered_specular.avi

vvv bring it vvv

heeen fucked around with this message at 20:19 on Apr 20, 2009

heeen
May 14, 2005

CAT NEVER STOPS

shodanjr_gr posted:

At the moment it is simulating a "mid-noon" sun, so the light source is essentially directional and staring straight down. It's quite easy to change that around in the implementation (or switch the whole thing to a point light), but I just wanted to stick to the stuff mentioned in my paper (couldn't fit everything in).

You are right with regard to the sun color though. I'll try to fix that once I do my revision :).

Keep the comments coming :D.

Yup. Just make it a bit stronger (you want the user to be able to tell apart the top 3-4 generations easily so its important that they differentiate color-wise).

Nice, we were trying to get our paper finished for Siggraph, but we didn't make it deadline for submissions is monday.
Are your light rays actually raycasted?

heeen
May 14, 2005

CAT NEVER STOPS

OneEightHundred posted:

I dunno this is one of those times I wish I had more art to work with so I could put out something more impressive. I also wish I wasn't too burned out to continue this work earlier, but hay, lost my job.


It's actually not true radiosity, and I've consequently stopped calling that, but a convincing emulation of it:
- Small wide-FOV scene renders are snapped from every sample point
- Pixels from scene render are used to determine ambient contribution based on direction and manifold area. This is currently the major bottleneck, and converting it to SSE helped a lot.
- Contribution is combined with a recast of direct light influences
- All light is rescaled to produce the same total scene brightness as just the direct light contribution.
- Repeat

All passes but the final one are done at low resolution to reduce computation time.

The main difference between this and true radiosity is that radiosity normalizes per sample. My theory is that luminescence is uniform enough in real-world scenarios that global normalization will work fine.

Can you give some detail on why your method is better/faster/more applicable than, say, q3map2 -light -bounce X etc?

heeen
May 14, 2005

CAT NEVER STOPS

OneEightHundred posted:

q3map2's approach is conceptually a decent idea: It takes polygons and chops them up until the light gradient is low enough, then spawns area lights from them. The approach I'm using is just faster because doing a scene render and running a big SIMD multiply/accumulate over it faster than casting a light by several orders of magnitude.

Of course, q3map2 is further impaired by its light casting algorithm being slow AND scaling very poorly.

I see. How fast in actual numbers on, say the three lights from your screenshot, is your algorithm? I take it 300 samples per seconds means not realtime?

heeen
May 14, 2005

CAT NEVER STOPS
This has taken me far too long.

heeen
May 14, 2005

CAT NEVER STOPS
Finished my final thesis :)

heeen
May 14, 2005

CAT NEVER STOPS

Hubis posted:

Cool! Is this view-dependent LOD?

View dependent subdivision surfaces with displacement mapping.

heeen
May 14, 2005

CAT NEVER STOPS

Fecotourist posted:

Are you using a geometry shader?

No, all in CUDA.

heeen
May 14, 2005

CAT NEVER STOPS
Playing around with Qt+OpenGL loading images in a second thread:
http://heeen.de/proj/qt-loading.avi
Three 4096² png textures loaded in a thread with lowest priority.

heeen
May 14, 2005

CAT NEVER STOPS

I added a live glsl editor to my project because I was sick of reloading the whole app just to debug a shader and because Qt is just so easy to work with (and they already had a syntax highlighter example).

Right now I'm just polishing my OpenGL framework and playing around with Qt. For instance I try to track opengl states to minimize state changes. if two consecutive materials use the same shaders, I don't issue calls to change the active shader. Same thing for vbos.

heeen
May 14, 2005

CAT NEVER STOPS

brian posted:


(Click to go to the LD page to play/download)

Here's my Ludum Dare entry named Every Man Is An Island. I probably only spent 18-20 hours on it and almost all of that was art (i'm terrible with art so it took me forever). There's a few bugs with the collision of the whale and it's incredibly short but i'm happy overall with the finished product.

I don't know what GPU/CPU you develop on, but player movement seems 10x too fast for me. Also the player vanishes if you touch the whale.
Edit: you don't center the screen on the player if he respawns outside of the screen

heeen fucked around with this message at 19:29 on Apr 28, 2010

Adbot
ADBOT LOVES YOU

heeen
May 14, 2005

CAT NEVER STOPS

Mista _T posted:

I picked up the style, and I found it to be the most readable. The start and end are easily found while reading the code.

How the hell ist that abortion more readable than going straight down to find the point the block ends?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply