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

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?

Adbot
ADBOT LOVES YOU

slovach
Oct 6, 2005
Lennie Fuckin' Briscoe

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.

What Q3 code base are you using as a base? IOQuake, CPMA, Vanilla?

How much of it is left? I remember Carmack somewhere saying about how he wanted to modernize the renderer a bit by adding support for VBO's, etc for Quake Live, but he didn't in the end because of time (i think was the reason).

shodanjr_gr
Nov 20, 2007
I've been spending the last couple of days writing a volume renderer as a way to learn ObjC and figure out OpenGL on a Mac (this is my definition of free time apparently).

I now have screenshots:





The raycasting shader is very simple at the moment. No transfer function, it just brute forces an intersection by sampling about 150 points front-to-back and looking for a value that falls between a certain range (thats why the result looks so noisy I assume). Then it computes a normal (shown on the output).

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

heeen posted:

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?
I think lighting that map takes about an hour, about half of that is the final terrain light pass (which uses the afforementioned slow, poorly-scaling algorithm).

It uses a 6"x6" lightmap resolution.

slovach posted:

What Q3 code base are you using as a base?
Vanilla. I didn't see much compelling reason to use a different base, I've already fixed the security issues IOQuake touched on.

quote:

How much of it is left? I remember Carmack somewhere saying about how he wanted to modernize the renderer a bit by adding support for VBO's, etc for Quake Live, but he didn't in the end because of time (i think was the reason).
The new renderer operates stand-alone, which is why the global illumination tool and model viewer are both perfectly capable of rendering maps.

All that's left of the original renderer is the WGL code, and 1500 lines of glue to bind the Quake 3 refresh API to the new renderer.

ATLbeer
Sep 26, 2004
Über nerd
This is something that's currently in a soft launch and I'm doing little promotion as I'm finishing up some other projects right now but, it's a pretty simple concept. Basically I hate sending people links to Youtube where someone has given a video a horrible or inappropriate title or description. Or simply the comments have been spammed with something horrible. I just wanted a simple page where I could embed a video and then link someone too it.

http://www.plainvid.com/


Click here for the full 1088x867 image.


Click here for the full 1093x916 image.


Currently it supports videos from YouTube, Vimeo, and Liveleak. Just added support today for making the URL short via bit.ly and links to directly tweet the video and share via facebook and reddit.

Example page: http://bit.ly/edb3P

If your interested in following the project I'm posting updates as I go to Twitter: http://twitter.com/plainvid

Inquisitus
Aug 4, 2006

I have a large barge with a radio antenna on it.

Roflex posted:

Something like in the original version?



Also, video's up, I'll annotate it later: http://www.youtube.com/watch?v=T26nQX1Pc6g&fmt=22

What'd be nice is if the opacity of the cells fades out as they sink, so they don't just suddenly disappear.

Xerol
Jan 13, 2007


Inquisitus posted:

What'd be nice is if the opacity of the cells fades out as they sink, so they don't just suddenly disappear.

I was considering that (maybe when I get color scripting in I'll allow alpha channel as well) but it'll have to wait until I finish the new camera system as the current one only does sorting based on simple assumptions about the camera position.

DLCinferno
Feb 22, 2003

Happy

ATLbeer posted:

This is something that's currently in a soft launch and I'm doing little promotion as I'm finishing up some other projects right now but, it's a pretty simple concept. Basically I hate sending people links to Youtube where someone has given a video a horrible or inappropriate title or description. Or simply the comments have been spammed with something horrible. I just wanted a simple page where I could embed a video and then link someone too it.

http://www.plainvid.com/
That's a fantastic idea. Anything to reduce the chaff is tits in my book.

ATLbeer
Sep 26, 2004
Über nerd

DLCinferno posted:

That's a fantastic idea. Anything to reduce the chaff is tits in my book.

Thanks... It's in a soft launch stage right now but, I consider it in "production" and I'm taking bug requests and feature requests via twitter (http://twitter.com/plainvid) or just PM me if your not into the whole Twitter thing.

ColdPie
Jun 9, 2006

ATLbeer posted:

Thanks... It's in a soft launch stage right now but, I consider it in "production" and I'm taking bug requests and feature requests via twitter (http://twitter.com/plainvid) or just PM me if your not into the whole Twitter thing.

I don't mean to be a dick or anything, but since it sounds like you're trying to be professional about this website, I'm just going to politely suggest that you learn the difference between "your vs you're" and "they're vs their vs there". It looks very unprofessional when you gently caress those up and I'd hate to see it happen in some promotional material for your website or in contact with your users.

ATLbeer
Sep 26, 2004
Über nerd

ColdPie posted:

I don't mean to be a dick or anything, but since it sounds like you're trying to be professional about this website, I'm just going to politely suggest that you learn the difference between "your vs you're" and "they're vs their vs there". It looks very unprofessional when you gently caress those up and I'd hate to see it happen in some promotional material for your website or in contact with your users.

Yeah... It's an awful habit of mine. I appreciate the advice and it's not being a dick. I get the same reaction when I'm in technical meetings with non-technical people and they misuse terminology.

I already have a proof read version of my 'about' page in my version control and it's getting pushed out tomorrow.

wlievens
Nov 26, 2006
Fantasy dungeon generator, you could use this in tabletop games. All the textures are procedural, there is no file input at all.


Click here for the full 576x864 image.


A random world map generator, fantasy style. Fully procedural.


Click here for the full 1000x1000 image.


It also generates provinces on the map.


Click here for the full 1000x1000 image.

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

wlievens posted:

Fantasy dungeon generator, you could use this in tabletop games. All the textures are procedural, there is no file input at all.


Click here for the full 576x864 image.


A random world map generator, fantasy style. Fully procedural.


Click here for the full 1000x1000 image.


It also generates provinces on the map.


Click here for the full 1000x1000 image.


Neato! What's the method for the provice generator, out of curiosity?

wlievens
Nov 26, 2006

Hubis posted:

Neato! What's the method for the province generator, out of curiosity?

I first seed a bunch of province center points, at a minimum distance from one another. Then I create a Voronoi diagram on the raster, so each land pixel gets an owner. I do this on the raster because I'm too lazy to implement the geometric algorithm, but also because this helps me cope with jagged coastlines. This voronoi raster implicitly gives me the delaunay triangulation, i.e. a graph of which province neighbours which others. I then create borders by connecting the midpoints of the edges and the triangles formed in the delaunay triangulation. I also add the points where the voronoi pixel borders hit the coastlines. I then split up those borders into tiny segments, and apply some noise on them so that I get jagged borders. Then I assign all pixels that changed hands with this method.

The province generation is independent of the geography generation (which is plain old perlin noise), so that's why I have to do all those tricks. If you turn stuff around, and generate geography based on random provinces, you probably get an easier algorithm and better looking borders, but less plausible geography.

bgreman
Oct 8, 2005

ASK ME ABOUT STICKING WITH A YEARS-LONG LETS PLAY OF THE MOST COMPLICATED SPACE SIMULATION GAME INVENTED, PLAYING BOTH SIDES, AND SPENDING HOURS GOING ABOVE AND BEYOND TO ENSURE INTERNET STRANGERS ENJOY THEMSELVES

wlievens posted:

The province generation is independent of the geography generation (which is plain old perlin noise), so that's why I have to do all those tricks. If you turn stuff around, and generate geography based on random provinces, you probably get an easier algorithm and better looking borders, but less plausible geography.

I actually think it's a lot better the way you do it, because the borders, to me, imply geographical features on the landmass: rivers, mountain chains, etc.

Are there any parameters for the province borders to represent, say, straight line borders? Think of the U.S. state borders. Some use natural boundaries, others use arbitrary surveying markers (lines of latitude, longitude, etc).

Regardless, that looks really impressive.

leedo
Nov 28, 2000

wlievens posted:

I first seed a bunch of province center points, at a minimum distance from one another. Then I create a Voronoi diagram on the raster, so each land pixel gets an owner. I do this on the raster because I'm too lazy to implement the geometric algorithm, but also because this helps me cope with jagged coastlines. This voronoi raster implicitly gives me the delaunay triangulation, i.e. a graph of which province neighbours which others. I then create borders by connecting the midpoints of the edges and the triangles formed in the delaunay triangulation. I also add the points where the voronoi pixel borders hit the coastlines. I then split up those borders into tiny segments, and apply some noise on them so that I get jagged borders. Then I assign all pixels that changed hands with this method.

The province generation is independent of the geography generation (which is plain old perlin noise), so that's why I have to do all those tricks. If you turn stuff around, and generate geography based on random provinces, you probably get an easier algorithm and better looking borders, but less plausible geography.

Great info! I started writing a Risk clone in perl6 a while back. After I got all the rules implemented I started thinking about how to generate a map and hit a bit of a brick wall.

jonnii
Dec 29, 2002
god dances in the face of the jews

wlievens posted:

terrain generator.

You don't have PMs enabled, can you send me an email? I have a few questions for you! me [at] jonnii [dot] com.

newsomnuke
Feb 25, 2007

For people interested in this kind of procedural generation, Texturing & Modelling: A Procedural Approach is essentially the bible for this. Great fun.

wlievens
Nov 26, 2006

bgreman posted:

Are there any parameters for the province borders to represent, say, straight line borders? Think of the U.S. state borders. Some use natural boundaries, others use arbitrary surveying markers (lines of latitude, longitude, etc).

I haven't explored that, because I have mostly fantasy-themed things in mind for now (in spite of the fact that another terrain generator I wrote is used in my modern-themed political game). It should be possible but it's not trivial to implement.

leedo posted:

Great info! I started writing a Risk clone in perl6 a while back. After I got all the rules implemented I started thinking about how to generate a map and hit a bit of a brick wall.

This is exactly the kind of project you could use this stuff for. If you want more info just shoot met an email at "lievenswouter" on google mail.

jonnii posted:

You don't have PMs enabled, can you send me an email? I have a few questions for you! me [at] jonnii [dot] com.

sent

ChirreD
Feb 21, 2007
Dutch, baby!
I'm really digging some of these projects here, I can't even begin to understand how to build a ray traced shader, very cool.


Last months I've been working on the frontend of a CMS we use in our company. The CMS is called Benzine, made in Adobe Air (Flash&Flex). I'm responsible for the usability (interface) and the development.

Here are two screens (using my own host), one shows a newsitem, and the other shows the overview of videos.





This CMS is used by M-1 Global for example.

It is a desktop app, to manage your sites with (amongst other things). The reason we chose Air, is to make it easier for clients to update sites in terms of usability. For example: Simply dragging a video from your desktop to the application will prompt the user to upload the video to his website.

We put in a lot of effort into making it very user friendly, also we did our best to make it look pretty and not very technical as opposed to most CMS systems. So our designer made a nice user interface and there are lots of subtle animations and transitions in there to show the user what's going on. (For example: Menu sliding open gently, instead of a hard transition)

It contains nifty features, such as when you upload a video, it automatically creates a still image from it (to be used for the thumbnail but maybe also on a website). Or you can press the snapshot button (right side, underneath the videoplayer on 2nd screenshot) to create a new still real easy.
Or it can take out the album art of a mp3 file and use that for the thumbnail.
Things like that, make managing your content a little bit easier.

(don't mind the play button on the top left, that's just a debugging tool :))

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
After finally deciphering spherical harmonics to the point where I discovered order-1 spherical harmonics are ridiculously easy to implement, I've started converting lightmaps to use it instead of my existing approach.

They do a much better job of handling lighting influences from multiple directions, they work better with gloss, and they'll probably work better with texture compression too.


Click here for the full 1280x800 image.


:toot:

I'm actually kind of annoyed that I didn't use these sooner. Ironically, it turned out that order-1 SH is identical to an approach that I was going to try anyway, but didn't think would work.

OneEightHundred fucked around with this message at 03:25 on May 17, 2009

The Wizard of Oz
Feb 7, 2004

I've been goofing off with this idea for realtime editing of parametric surfaces. Mapping (u, v) to (x, y, z) allows for spheres and torii, while a cubemap parameterisation makes the point distribution more even and is used in ZBrush. A simple concept like this makes many things easier than with a poly soup. LOD is just, well, it's just LOD; interpolate up a texture level and you can quarter the number of polygons. You can use compositing or generate the object while editing it then render that to a texture to make things faster, then go back to generation. You can use the same dataset with different rendering techniques, like using geometry shaders. You can use the same dataset with parallax mapping to any level of complexity.

Right now I'm working on the basic framework. The following is a figure eight knot. This function actually produces just a path, and the shader then extrudes a tube along the curve. That would be pretty vicious for a vertex shader, but it's actually done three times per pixel due to the heightmap overlayed onto it. My GPU's all "psh, give me something hard sometime."



Modern GPUs are amazing, and this thing's three years old now. I remember looking at perspective correct texture mapping and realising I couldn't possibly afford it. Now, I hardly even have to wonder whether the GPU can do it, I just got to make sure it's in the right lingo.

What I'm working on today is a simple dungeon crawl mapper. I'm wanting to replay games like Wizardry, but I don't look forward to using graph paper, so I'm yelling at JavaScript/HTML/CSS until it occasionally does what I want. Edit: Now at a usable state, being updated here. Firefox 3 only.

The Wizard of Oz fucked around with this message at 05:08 on May 19, 2009

wlievens
Nov 26, 2006

Snodar posted:

What I'm working on today is a simple dungeon crawl mapper. I'm wanting to replay games like Wizardry, but I don't look forward to using graph paper, so I'm yelling at JavaScript/HTML/CSS until it occasionally does what I want.



Scroll up and check out my dungeon. I'll roll you a set if you want them :-)

The Wizard of Oz
Feb 7, 2004

wlievens posted:

Scroll up and check out my dungeon. I'll roll you a set if you want them :-)

Not generated, replicating actual dungeons in old 3D RPGs. All dungeon creation software for P&P use that I've seen is more like CAD software, which fits poorly into the limited variation and need for rapid editing in a dungeon crawl.

J. Elliot Razorledgeball
Jan 28, 2005

ChirreD posted:

:words:

Wow that's pretty amazing looking, any plans on releasing that?

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

OneEightHundred posted:

After finally deciphering spherical harmonics to the point where I discovered order-1 spherical harmonics are ridiculously easy to implement, I've started converting lightmaps to use it instead of my existing approach.

They do a much better job of handling lighting influences from multiple directions, they work better with gloss, and they'll probably work better with texture compression too.


Click here for the full 1280x800 image.


:toot:

I'm actually kind of annoyed that I didn't use these sooner. Ironically, it turned out that order-1 SH is identical to an approach that I was going to try anyway, but didn't think would work.

I'm a little confused -- what do you mean when you say you're using "spherical harmonics" for light-maps? Are you just unrolling the Theta and Phi coordinates into U and V?

ChirreD
Feb 21, 2007
Dutch, baby!

J. Elliot Razorledgeball posted:

Wow that's pretty amazing looking, any plans on releasing that?

Thank you :)
We finished it last friday actually. So it is available now to our clients.

By releasing, do you mean a public download? That would be hard to do since this baby runs on a backend with a webservice we created. Which is excellent for the websites we create. However this also means that you can't just simply download and install it like Drupal or Joomla.

If you're interested, you can mail me at
tjeerd [at] vurigmedia [dot] nl
I'll happily tell you more :)

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Hubis posted:

I'm a little confused -- what do you mean when you say you're using "spherical harmonics" for light-maps? Are you just unrolling the Theta and Phi coordinates into U and V?
Linear spherical harmonics doesn't need the theta/phi coordinates, because you can solve it using Cartesian coordinates. sin(phi), cos(phi), and cos(theta) are the axial values of the normalized sampling direction.

nDir = normalize(dir);
sampledValue = sh0 + nDir.x*sh1 + nDir.y*sh2 + nDir.z*sh3;

I think it's possible to solve the quadratic band in Cartesian space too, problem is almost all of the material I can find on SH uses polar coordinates. I'd try figuring out how to resolve it into Cartesian space, but 4 lightmaps per surface is already pushing it so gently caress it.

OneEightHundred fucked around with this message at 00:32 on May 19, 2009

Epikhigh
Apr 4, 2009
My program to randomly grab an FML quote. Not working atm :(

Click here for the full 1284x998 image.

Factor Mystic
Mar 20, 2006

Baby's First Post-Apocalyptic Fiction
Thanks for the devkey!

Scaevolus
Apr 16, 2007

Factor Mystic posted:

Thanks for the devkey!

You don't need it anyways if you're just grabbing posts, (you just go to http://api.betacie.com/view/random?language=en)

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

OneEightHundred posted:

Linear spherical harmonics doesn't need the theta/phi coordinates, because you can solve it using Cartesian coordinates. sin(phi), cos(phi), and cos(theta) are the axial values of the normalized sampling direction.

nDir = normalize(dir);
sampledValue = sh0 + nDir.x*sh1 + nDir.y*sh2 + nDir.z*sh3;

I think it's possible to solve the quadratic band in Cartesian space too, problem is almost all of the material I can find on SH uses polar coordinates. I'd try figuring out how to resolve it into Cartesian space, but 4 lightmaps per surface is already pushing it so gently caress it.

Oh, cool -- I hadn't even realized you could linearize spherical harmonics like that. What's the benefit of using spherical harmonics for that? I've seen Wavelet compression used for textures to fantastic effect, usually preserving a lot more detail with fewer terms.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Hubis posted:

Oh, cool -- I hadn't even realized you could linearize spherical harmonics like that. What's the benefit of using spherical harmonics for that? I've seen Wavelet compression used for textures to fantastic effect, usually preserving a lot more detail with fewer terms.
Mainly that it's cheap to evaluate and direction-independent. Apparently it's also possible to do a cheap low-frequency specular approximation with linear SH too, a trick Halo 3 uses: The directional components signify how much light is coming from an axial direction, so you can add up the RGB components for each axis and normalize the result to get a primary light direction, and since the constant component already represents the angle-independent amount of light hitting the surface, you can use that as the color and treat it as a directional light.

I jotted up a mini-article on the various lighting methods I've looked at for this, and the ones I settled on:
http://oneeightzerozero.blogspot.com/2009/05/lighting-is-everything.html

I wasn't even aware people had tried wavelet compression for lightmaps. How's that even work?

OneEightHundred fucked around with this message at 07:11 on May 21, 2009

SixPabst
Oct 24, 2006

Whipped together a quick little utility to upload folders of pictures to Facebook through a folder's context menu. Right Click->Upload to Facebook.

Only registered members can see post attachments!

Jo
Jan 24, 2005

:allears:
Soiled Meat
Not nearly as impressive as a lot of the stuff here, but I recently got moved to the team doing object recognition and reconstruction. Only user input is a single click to select what object to recognize. With simpler objects like chairs and tables, the application can reconstruct 3D models using a single image. It's still very much in the beta.

The Wizard of Oz
Feb 7, 2004

I don't like JavaScript/JScript so I'm writing a compiler for a language that tweaks it and reduces platform variance. It's almost compatible with JavaScript, and its compiler is self-hosting. Here is a screenshot of some of its features.


Click here for the full 658x383 image.


I don't have any illusion of upsetting the balance of power on the world wide web, this is just what I do for fun.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Laffin' that you seem to think finally is a glaring omission from C++. :laugh:

Unless your issue is that braces are necessary around try blocks, which is a little annoying.

The Wizard of Oz
Feb 7, 2004

Avenging Dentist posted:

Laffin' that you seem to think finally is a glaring omission from C++. :laugh:

Unless your issue is that braces are necessary around try blocks, which is a little annoying.

It's the braces (I like my languages consistent, and almost every time with JavaScript I'm running a single expression), but C++ doesn't have finally.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Snodar posted:

C++ doesn't have finally.

As well it shouldn't, since RAII renders finally redundant.

Adbot
ADBOT LOVES YOU

a slime
Apr 11, 2005

seriously AD do you really think it's smart to answer questions in the C/C++ thread when you clearly don't understand exceptions

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