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
Nuggan
Jul 17, 2006

Always rolling skulls.

Darkpenguin posted:

Unfortunatly, yes, I am a Full Sail Student. I'm starting to get the feeling that coming to this school may have been a mistake, judging by the reception I'm getting from industry professionals I've met.

Greetings fellow Full Sail goon! Who have you talked to in the industry thats not liked the school? Everyone I've met has said either neutral or positive things.

Adbot
ADBOT LOVES YOU

tyrelhill
Jul 30, 2006
To quote the CTO of PEO STRI, the company that delegates billions of Department of Defense milsim money: "Half of a Full Sail class is filled with students who's parents are happy that their son is even in college, and the other half are students that you would see in a computer science class."

The school will never get a good rep because they will never become regionally accredited (and cause of their retarded degree programs, like Recording Arts). Going there will get you a job in the industry if you have the initiative and are smart enough.

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

tyrelhill posted:

To quote the CTO of PEO STRI, the company that delegates billions of Department of Defense milsim money: "Half of a Full Sail class is filled with students who's parents are happy that their son is even in college, and the other half are students that you would see in a computer science class."

The school will never get a good rep because they will never become regionally accredited (and cause of their retarded degree programs, like Recording Arts). Going there will get you a job in the industry if you have the initiative and are smart enough.

Same thing with UAT. Although slightly less true of the quote. It's more like 90 percent of the parents don't know what the gently caress to do with their kids, and the other 10 percent have SOME sort of idea on what to do.
Their programming degrees are bullshit. They even changed the name of Bachelor of Computer Science to Bachelor of Advanced Computer Technology, or something stupid like that

:wtc:

One of the many reasons I left. Another was the 15K espresso machine. That students couldn't use for free. But faculty could.

Although rumor has it they are about to get regionally accredited, so instead of losing all 60+ of my credits I only lose 54!

QuantumPotato
Feb 3, 2005

Fallen Rib

tyrelhill posted:

To quote the CTO of PEO STRI, the company that delegates billions of Department of Defense milsim money: "Half of a Full Sail class is filled with students who's parents are happy that their son is even in college, and the other half are students that you would see in a computer science class."

The school will never get a good rep because they will never become regionally accredited (and cause of their retarded degree programs, like Recording Arts). Going there will get you a job in the industry if you have the initiative and are smart enough.

Yeah, that quote describes the people in the classes I'm in too a T. I'm just worried that I'm getting in over my head here. Working as a programmer in the Gaming industry is my dream job, and I'd hate to lose out on that because I'm getting some bogus degree that isn't going to do me any good. Makes me wish I'd stuck with Mechanical Engineering sometimes.

I Guess I'll just have to find out what happens when I graduate.

Vinterstum
Jul 30, 2003

Darkpenguin posted:

Yeah, that quote describes the people in the classes I'm in too a T. I'm just worried that I'm getting in over my head here. Working as a programmer in the Gaming industry is my dream job, and I'd hate to lose out on that because I'm getting some bogus degree that isn't going to do me any good. Makes me wish I'd stuck with Mechanical Engineering sometimes.

I Guess I'll just have to find out what happens when I graduate.

Degrees don't mean all that much when it comes to programming in the games industry.

Being able to demonstrate a firm grasp of C++ and an actual personal interest in programming (like having personal or open source projects to show off, preferrably gaming related), means far more than whatever degree you have or where it's from.

Vinterstum fucked around with this message at 08:48 on May 21, 2009

Benji the Blade
Jun 22, 2004
Plate of shrimp.
If it makes you feel any better, I got into the game industry as a programmer straight out of college with my liberal arts BA (Media Studies). I worked programming jobs throughout college, and had some good projects to show from those jobs and from advanced classes I took, which, along with a connection or two, got me in the door.

To those of you currently at Full Sail: make the most of your projects. I don't really know how teams are formed or whatever, but if you have any hope of making your projects good, do it, even if it means carrying the whole team. If that's unreasonable, you'd best start working on something on the side.

terminatusx
Jan 27, 2009

:megaman:Indie Game Dev and Bringer of the Apocalypse

Benji the Blade posted:

To those of you currently at Full Sail: make the most of your projects. I don't really know how teams are formed or whatever, but if you have any hope of making your projects good, do it, even if it means carrying the whole team. If that's unreasonable, you'd best start working on something on the side.

Word up to you full sail goons, I drive by it every day going to work. :whatup:

My totally unqualified opinion:
Fully formed side/personal projects are of ultimate importance when trying to get in the games industry at entry-level, moreso than any degree or team project. A student with only a bunch of team projects is probably less qualified than a student with a crappy but COMPLETE personal project, especially if you manage to publish your game (via the internet or otherwise).

:( you see, I'm trying to rationalize this thought, because I chose to NOT go to schools like Full Sail or FIEA so that I would have more time to work on personal games in order to ultimately land a job in the biz.

Star Warrior X
Jul 14, 2004

terminatusx posted:

My totally unqualified opinion:
Fully formed side/personal projects are of ultimate importance when trying to get in the games industry at entry-level, moreso than any degree or team project. A student with only a bunch of team projects is probably less qualified than a student with a crappy but COMPLETE personal project, especially if you manage to publish your game (via the internet or otherwise).

As an actual industry professional in charge of interviewing and hiring, do NOT listen to this man. No game developer in real life is in a vacuum. Everything is done in teams. If I see you failed to complete a bunch of team projects, but succeeded in putting a crappy flash game on the web somewhere, you go on the stack of resumes under everyone with a finished, good game made while working with other people. Because working with other people is what you would be doing if you worked for me.

I have never had the opportunity to interview a Full Sail graduate (or anyone from a similar place), but my initial thoughts on such places are that the education given there is too narrow for what I would consider an ideal candidate for me. This may be related to my specific situation, where I have quite small teams (3-5 full timers and a couple of interns), so each member needs to wear several hats, and I prefer people with broader skill sets and diverse backgrounds to draw upon.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Star Warrior X posted:

If I see you failed to complete a bunch of team projects, but succeeded in putting a crappy flash game on the web somewhere, you go on the stack of resumes under everyone with a finished, good game made while working with other people.
I'm in kind of an annoying situation with this personally. I worked on a team project and added a bunch of features to the tools/engine at the request of other members, but the project died after losing two critical members to personal issues and being unable to replace them.

Is this type of experience treated as nearly worthless because it didn't finish?

Star Warrior X
Jul 14, 2004

OneEightHundred posted:

I'm in kind of an annoying situation with this personally. I worked on a team project and added a bunch of features to the tools/engine at the request of other members, but the project died after losing two critical members to personal issues and being unable to replace them.

Is this type of experience treated as nearly worthless because it didn't finish?

Well, having an unfinished game is better than no game at all, but if your portfolio is full of unfinished games, it needs work. Focus on the things you have finished.

terminatusx
Jan 27, 2009

:megaman:Indie Game Dev and Bringer of the Apocalypse

Star Warrior X posted:

:words: bout game biz shenanigans

Thanks for your insights..! as I said in my post, it was my totally unqualified opinion. But my whole "team projects vs personal projects" thing should've been more accurately stated as "school team projects vs personal projects", cuz that's what the discussion started with. But when I say personal projects, that doesn't necessarily indicate that you are the only one working on it.

I'm still interested in what people like yourself think about projects completed in schools like Full Sail or FIEA. Would they be considered in the same category as "finished, good games made with other people"?

Star Warrior X
Jul 14, 2004

terminatusx posted:

I'm still interested in what people like yourself think about projects completed in schools like Full Sail or FIEA. Would they be considered in the same category as "finished, good games made with other people"?

Yes, absolutely. My studio employs a large number of interns from local universities (in fact, everyone who is here full time started as an intern), so we absolutely feel that student projects 'count.' The things that, to me, make any sort of independent (non-funded) project, whether school-related or not, stand out are polish and coherent, distinctive style.

I mention those two factors because they are the most common shortcomings I've seen in student games. Either they were rushed to completion, or they're just another generic whatever, or both. If you're student or non-student independent group can avoid both of these pitfalls, it shows you have the talent, time-management skills, and willpower to survive in the real world, and the creativity to make that survival worth something.

terminatusx
Jan 27, 2009

:megaman:Indie Game Dev and Bringer of the Apocalypse

Star Warrior X posted:

do NOT listen to this man.

quoted for truthiness

Vinterstum
Jul 30, 2003

This is why I recommend getting involved with an open source project. It'll mean working in a team (and probably a team of mixed experience, as opposed to student teams with no experience at all), and having your code public and scrutinized, which is great for forcibly getting rid of bad habits. There's plenty of game projects like that around, but even non-gaming-related projects can be very valuable experience.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Vinterstum posted:

This is why I recommend getting involved with an open source project. It'll mean working in a team (and probably a team of mixed experience, as opposed to student teams with no experience at all), and having your code public and scrutinized, which is great for forcibly getting rid of bad habits. There's plenty of game projects like that around, but even non-gaming-related projects can be very valuable experience.
Problem with open source and free game projects in general is that they have a high mortality rate, making it hard to get finished work out of them.

Vinterstum
Jul 30, 2003

OneEightHundred posted:

Problem with open source and free game projects in general is that they have a high mortality rate, making it hard to get finished work out of them.

Very few open source projects are ever "finished", so that's not something people should be expecting :). It's not about completing a project, it's about showing some level of team participation over time and being able to write code useful enough for inclusion in the project (since you want a job as a coder and not a manager...). As long as you pick something which has had a reasonable level of activity for some time and has more than 1-2 people involved, it's usually a fairly safe bet.

Vinterstum fucked around with this message at 12:55 on May 25, 2009

Benji the Blade
Jun 22, 2004
Plate of shrimp.

Vinterstum posted:

Very few open source projects are ever "finished", so that's not something people should be expecting :).

Star Warrior X posted:

The things that, to me, make any sort of independent (non-funded) project, whether school-related or not, stand out are polish and coherent, distinctive style.

This is one big problem with open-source games. The number of open-source games I can consider to be polished and distinctive is vanishingly small. Not that opening up the source code leads to incomplete and/or crappy games, but the open source community isn't, generally, going to make your game better (except maybe at the level of infrastructure and libraries).

I'd much rather see someone who made a cool little original game and finished it than someone who contributed to a large game project that will be perpetually in development.

Vinterstum
Jul 30, 2003

Benji the Blade posted:

I'd much rather see someone who made a cool little original game and finished it than someone who contributed to a large game project that will be perpetually in development.

If I was hiring a game designer, then definitely. For a coder, I really don't care if it's finished or not :). To me, it's far, far more important that someone's worked in a team, than that they've completed a pet solo project (though the latter is far better than nothing, of course). I've met too many coders who are very technically proficient but completely unable to work as part of a group and ended up being a net negative contributor.

It doesn't even matter that much if the open source project is games related or not. What makes someone a good candidate isn't that they know good pathfinding algorithms, any decent coder should pick up the techniques specific to the games domain quickly (with the exception of pretty specialized things like shader programming).

Vinterstum fucked around with this message at 18:12 on May 26, 2009

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Benji the Blade posted:

This is one big problem with open-source games. The number of open-source games I can consider to be polished and distinctive is vanishingly small. Not that opening up the source code leads to incomplete and/or crappy games, but the open source community isn't, generally, going to make your game better (except maybe at the level of infrastructure and libraries).
There are a bunch of problems with the open-source/free game scene making "big" projects:

- Programmers tend to spend disproportionate amounts of time on things that are flashy and fun to code (especially renderer features) over things that are really important but not flashy or fun to code, like tools.

- They require a combination of good talent, including good management and artists, to be successful. Inexperienced project leads are notorious for excessive project revisions, overambitious goals, and feature creep.

- Attracting good artists requires a promising project, which requires a good demo, which requires content, which requires artists or prefab assets which cost money.

- Decent sound ALWAYS costs money.

- Members that burn out tend to be very difficult to replace, and the longer the project goes on, the more likely they are to burn out.


poo poo like this is why I really don't get why there's such an emphasis on a finished project, especially when artists don't really need to assemble a complete project to have an impressive portfolio.

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

You could always get onto an open source game project that HAS been released, and is just releasing new versions and/or patches. (i.e. Nexuiz)

Nybble
Jun 28, 2008

praise chuck, raise heck

SAHChandler posted:

You could always get onto an open source game project that HAS been released, and is just releasing new versions and/or patches. (i.e. Nexuiz)

Good call, looks like there are some fun bugs that people could jump in and help with too if you don't have your own project right now.

Speaking of which, those who are ready to start a project and want to code in VC++, 2DBoy (Creators of World of Goo) just released a 2D framework to use with VS 2008 C++. It is on their blog here.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
How does one create merged circles like the one in the image? I'm essentially trying to programatically recreate the two-tone outlined circles in this mock-up.



When I have only 2 overlapping circles (as is the case near 'Blam'), it's pretty easy to find the world coordinates of the two intersection points, and calculate the two arcs needed to draw the new shape. When I have 3 or more circles that all overlap, however, the problem seems to be more difficult -- especially if those circles belong to disparate players (and therefore the area needs to be split).

My first thought was to pass an array of points (in the above image there would be 5) to a pixel shader. Then, as I passed over the image, determine the distance of every pixel from the center of one of the points, and check to see if it was within some threshold. That, however, balloons really quickly, as every pixel must be checked against every point to determine it's ownership.

The next thought was to determine the intersection points, the center, and the radius of each circle and draw either an arc, a line, or nothing between the sets of points. However, this breaks down if more than 2 circles encompass a single area. Imagine if each of the three circles in the diagram below was a separate player. I'd have to do a second pass to check for line intersections to ensure the center area got split evenly between the three players.



This seems like a pretty standard game algorithm, but I can't figure out what to call it so I can google further.

I also thought that I could do something like render a circular gradient around each point, and draw my perimeter using a pixel shader to sample for a specific threshold value. The problem there is that my perimeter does not maintain the nice clean consistent width it does in the diagram above. This method also requires a channel for each player. Suddenly I'm way over my head as far as shaders go. I've written simple ones to handle color swapping and simple blur effects before, but that's about it.

Any suggestions?

Avenging Dentist
Oct 1, 2005

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

Pfhreak posted:

Any suggestions?

You're going to hate me for this, given how long your post is compared to mine: given all your circles, draw all of them slightly larger than necessary. Then draw them at normal size over the enlarged ones.

(If you need them to be translucent, do the drawing onto an off-screen texture and then draw that texture to the screen with some alpha-blending stuff.)

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

Avenging Dentist posted:

You're going to hate me for this, given how long your post is compared to mine: given all your circles, draw all of them slightly larger than necessary. Then draw them at normal size over the enlarged ones.

(If you need them to be translucent, do the drawing onto an off-screen texture and then draw that texture to the screen with some alpha-blending stuff.)

Wow, that works nicely. Although, it doesn't handle the case where two players have overlapping areas that need to be split. Still, it provides a nice clean 'easy path'.

Hubis
May 18, 2003

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

Avenging Dentist posted:

You're going to hate me for this, given how long your post is compared to mine: given all your circles, draw all of them slightly larger than necessary. Then draw them at normal size over the enlarged ones.

(If you need them to be translucent, do the drawing onto an off-screen texture and then draw that texture to the screen with some alpha-blending stuff.)

Actually, what I'd suggest is the opposite -- but use the stencil buffer.

So (in OpenGL speak):

code:
GLfloat CENTER_COLOR[] = {0.25f, 0.25f, 0.25f, 0.25f};
GLfloat BORDER_COLOR[] = {1.00f, 1.00f, 1.00f, 0.80f};

glEnable(GL_BLEND);
glClear(GL_STENCIL_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
for (int c=0; c < circleGroups.size(); ++c)
{
    // Draw the circle centers
    glColor4fv(CENTER_COLOR);
    glDisable(GL_STENCIL_TEST);
    glStencilFunc(c, GL_ALWAYS, 0xFF);
    drawCircles(circleGroups[c], 0.0f);

    // Now draw the edges; the areas in the middle will be masked out by the stencil
    glColor4fv(BORDER_COLOR);
    glEnable(GL_STENCIL_TEST);
    glStencilFunc(c, GL_NOTEQUAL, 0xFF);
    drawCircles(circleGroups[c], BORDER_PAD_SIZE);
}
that *should* do what you want it to. This has an advantage over the method AD posted in that you're not writing the border color everywhere first, so if you want the middle to be more transparent than the edges (which you likely do) you don't have to jump through any hoops.

e: Hmm, dealing with overlaping groups would be a bit trickier. You might still be able to get away with it though by changing the code as follows:


code:
GLfloat CENTER_COLOR[] = {0.25f, 0.25f, 0.25f, 0.25f};
GLfloat BORDER_COLOR[] = {1.00f, 1.00f, 1.00f, 0.80f};

glEnable(GL_BLEND);
glClear(GL_STENCIL_BIT);
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);

glDisable(GL_STENCIL_TEST);
for (int c=0; c < circleGroups.size(); ++c)
{
    // Draw the circle centers
    glColor4fv(CENTER_COLOR);
    glStencilFunc(c, GL_ALWAYS, 0xFF);
    drawCircles(circleGroups[c], 0.0f);
}

glEnable(GL_STENCIL_TEST);
for (int c=0; c < circleGroups.size(); ++c)
{
    // Now draw the edges; the areas in the middle will be masked out by the stencil
    glColor4fv(BORDER_COLOR);
    glStencilFunc(c, GL_LESS, 0xFF);
    drawCircles(circleGroups[c], BORDER_PAD_SIZE);
}
Now the circles should draw as before, but with the added bonus now that earlier groups will have lower 'priority' than later groups, and so should be shaped properly. You'll have weirdness with the borders where two groups meet with this code as written I think, but you can make this more sophisticated if you want using something like stencil-only passes, etc.

If you want something where intersecting groups somehow balance borders so there's a straight line or something between them, then you will need to change the "DrawCircles" code to deform the shapes appropriately when rendering. That's up to you, though.

Hubis fucked around with this message at 02:03 on Jun 3, 2009

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
In the first example: Do you want two for loops there? Draw all the centers, then all the perimeters? What advantage does drawing 1 center then 1 perimeter give you?

I've never used the stencil buffer before. I've previously had to get as fancy as to render to a different rendertarget so I could use a pixel shader on the output of rendering my whole scene, but that's the extent of my knowledge. OpenGL is also not my strength. Just to make sure I understand what's going on here:

1.) I draw my background elements -- stars, etc.)
2.) Draw the centers, making sure the stencil buffer is flagged on upon drawing that pixel. The GL_ALWAYS ensures we'll always draw our center. Is the stencil buffer 32 bit? Are we setting the value to 0xFF? (Although, if we draw semi-transparently, won't overlapping sections be drawn with more saturation?)
3.) Draw our perimeters. Only draw where the stencil buffer is not 0xFF?
4.) Change my stencil mode back to GL_ALWAYS and draw my foreground elements and HUD.

Once again, I've never actually worked with OpenGL, but I can Google well enough to think I know what that code is doing. I'm more familiar with XNA, but translating between them is easy enough. I'm going to hold off on handling two intersecting circles of enemy territory at this point, and just try to get this working correctly.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Pfhreak posted:

How does one create merged circles like the one in the image?
Additively render circles that have a radial gradient as a texture, with a value of 0 at their centre and a value of 1 (or 255, if you like 8-bit) at the perimeter.

Now, after you've rendered all the circles, remap the values so that everything that is below, say, 0.95 is set to 0 and everything else is set to 1. The value of 0.95 will specify how wide the circles' perimeters will be. Have a small ramp from, say, 0.94 to 0.96 to anti-alias the perimeter.

This would require a pixel shader.

Hubis
May 18, 2003

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

Pfhreak posted:

In the first example: Do you want two for loops there? Draw all the centers, then all the perimeters? What advantage does drawing 1 center then 1 perimeter give you?

I've never used the stencil buffer before. I've previously had to get as fancy as to render to a different rendertarget so I could use a pixel shader on the output of rendering my whole scene, but that's the extent of my knowledge. OpenGL is also not my strength. Just to make sure I understand what's going on here:

1.) I draw my background elements -- stars, etc.)
2.) Draw the centers, making sure the stencil buffer is flagged on upon drawing that pixel. The GL_ALWAYS ensures we'll always draw our center. Is the stencil buffer 32 bit? Are we setting the value to 0xFF? (Although, if we draw semi-transparently, won't overlapping sections be drawn with more saturation?)
3.) Draw our perimeters. Only draw where the stencil buffer is not 0xFF?
4.) Change my stencil mode back to GL_ALWAYS and draw my foreground elements and HUD.

Once again, I've never actually worked with OpenGL, but I can Google well enough to think I know what that code is doing. I'm more familiar with XNA, but translating between them is easy enough. I'm going to hold off on handling two intersecting circles of enemy territory at this point, and just try to get this working correctly.

I think the second example is a strict improvement of the first for your purposes; having two loops is better.

1) Yes, draw anything you want covered by the circles
2) Correct. GL_ALWAYS means that we will always pass the stencil test regardless of the buffer value; the stencil reference value is actually c (the current group ID) -- 0xFF is the stencil mask, which in this case is essentially unused. Your stencil buffer will 8 bits, meaning that algorithm will only work with 256 circle groups -- you can probably get more if you need to however by clearing the stencil buffer and drawing the sets of groups in batches somehow.
3) Only draw where the stencil buffer is not equal to the group ID c (or, in the second example, only draw when the stencil value is strictly less than c). This will essentially only draw the borders in areas not covered by either the current group's center, or by another group.
4) Yes; you can clear the stencil buffer and re-use it if you need to after this.

I'm not sure what the equivalent code is off the top of my head, but you should be able to do the same thing in DirectX/XNA/Whatever

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...
OK, I thought about it a bit more and I think I have a final version that's a winner:


code:
GLfloat CENTER_COLOR[] = {0.25f, 0.25f, 0.25f, 0.25f};
GLfloat BORDER_COLOR[] = {1.00f, 1.00f, 1.00f, 0.80f};

glEnable(GL_BLEND);
glClear(GL_STENCIL_BIT);

// Do a sencil-only pass to set the stencil buffers
glDisable(GL_STENCIL_TEST);
glColorMask( GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); // Disables writing to the color buffer; we're only updating stencil values here
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
for (int c=0; c < circleGroups.size(); ++c)
{
    // Draw the full circle+border 
    glStencilFunc(c+1, GL_ALWAYS, 0xFF);
    drawCircleStencils(circleGroups[c], BORDER_PAD_SIZE);
}


// Now that we have a valid stencil buffer, write the inner and outer circles
glEnable(GL_STENCIL_TEST); // Enable stencil tests
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); // Re-enable color writes
glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO); // Now we reset the stencil value to zero whenever a write succeeds
for (int c=0; c < circleGroups.size(); ++c)
{
    // Draw the circle centers
    glColor4fv(CENTER_COLOR);
    glStencilFunc(c+1, GL_EQUALS, 0xFF);
    drawCircles(circleGroups[c], 0.0f);

    // Draw the circle edges; since all the center pixels were zero'd out in the previous draw, we'll only render to the edges
    glColor4fv(BORDER_COLOR);
    glStencilFunc(c+1, GL_EQUALS, 0xFF);
    drawCircles(circleGroups[c], BORDER_PAD_SIZE);
}
What this does is
1) For each circle group, draws the group to the stencil buffer only with a value of c+1
2) For each circle group,
2a) Draw the inner circles to pixels with a stencil value of c+1, setting the stencil value to 0 on any pixels written
2b) Draw the outlines to pixels which still have a stencil value of c+1 (i.e. those not covered by the inner circle)

Now you won't draw earlier groups to any pixels which are covered by later groups. This has the secondary advantage of allowing you to automatically compute circle group intersections if you want by applying a pixel shader in drawCircleStencils() that does a fragment discard if the current circle group is not closer to the pixel than any other group. This is admittedly a bit complex for a pixel shader (you're probably better off just deforming the shapes themselves) but it's doable.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
I modified the example you gave me, and it works like a charm for one player. Wow the stencil buffer is nice to have. Now I just need to figure out a way to deform the circles where two player's areas overlap. I could just award them to no one, and use a the stencil buffer again, I suppose.

Hubis
May 18, 2003

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

Pfhreak posted:

I modified the example you gave me, and it works like a charm for one player. Wow the stencil buffer is nice to have. Now I just need to figure out a way to deform the circles where two player's areas overlap. I could just award them to no one, and use a the stencil buffer again, I suppose.

Computationally, the easiest thing would probably be to flatten the overlapping circle into a "D" shape, which I don't think should be too hard...

HauntedRobot
Jun 22, 2002

an excellent mod
a simple map to my heart
now give me tilt shift

Hubis posted:

Computationally, the easiest thing would probably be to flatten the overlapping circle into a "D" shape, which I don't think should be too hard...

Instead of circles, render them as flat shaded spheres, then the areas where they intersect will be nicely delineated.

Hubis
May 18, 2003

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

HauntedRobot posted:

Instead of circles, render them as flat shaded spheres, then the areas where they intersect will be nicely delineated.

Oh, clever.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

Hubis posted:

Oh, clever.

Can you explain why this is clever? I'm not sure I understand.

6174
Dec 4, 2004

Pfhreak posted:

Can you explain why this is clever? I'm not sure I understand.

The intersection of the two spheres defines a circle. When viewed so that the circle appears to be a line, it will define the boundary point for the "D" shape that Hubis mentioned a few posts up.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

6174 posted:

The intersection of the two spheres defines a circle. When viewed so that the circle appears to be a line, it will define the boundary point for the "D" shape that Hubis mentioned a few posts up.

I visualized it on my ride home. That really is pretty clever. I'll have to try it out this evening.

Sapozhnik
Jan 2, 2005

Nap Ghost
I'm looking for some sort of library that will let me write portable shaders (i.e. write one shader that works on both DirectX and OpenGL), and nVidia's Cg looks very promising. It doesn't look like it's been updated since 2007, which, considering the breakneck pace of computer graphics development these days, is slightly worrying. Then again, they do mention that Quake Wars uses it.

Is Cg worth using these days? ISTR that it dates back to the DirectX 8 days before HLSL was invented.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
Cg was more useful when there were several radically-different shader standards on DX8 hardware, and GLSL wasn't out yet. Since SM1 stuff is falling off the map and GLSL is the standard for OpenGL now, its main remaining uses are if you need to maintain GLSL and HLSL compatibility in the same application, supporting lovely Intel IGPs that don't support GLSL, or writing stuff targeting the PlayStation 3.

Whether it's "worth using" is kind of up for debate. GLSL, Cg, and HLSL are practically identical except for type names (which you can adjust using preprocessor defines) and how they handle input/output. It's quite possible that you could share the vast majority of your shader code in D3D and OpenGL shaders, and just write some platform-specific I/O glue for each shader that feeds everything through a "common" processing function.

Cg has been getting updated steadily, the most recent release is April 2009. I'm not sure where it's going to go though, because on one hand, NVIDIA's GLSL compiler is based on it and the PS3 uses it, but on the other, GLSL killed off its primary use and cross-platform capability isn't a good excuse when you can accomplish the same thing with stupid preprocessor tricks.

OneEightHundred fucked around with this message at 06:28 on Jun 10, 2009

CHEESE-kun
May 20, 2004

by Peatpot
I'm kind of stumped adding brightness control to my Direct3D 10 application. It seems like this should be trivial, but:
-It's not recommended to manipulate the DXGI gamma ramp
-Just adding a value in the pixel shader looks odd on some blend modes I use.

Is the only clean solution to implement two-pass rendering and apply the brightness in the second pass, after everything's been blended? MSDN mentions sRGB textures but I don't see how they'll help me.

Adbot
ADBOT LOVES YOU

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

CHEESE-kun posted:

Is the only clean solution to implement two-pass rendering and apply the brightness in the second pass, after everything's been blended? MSDN mentions sRGB textures but I don't see how they'll help me.
Yes, this is basically the only clean solution. Additionally, you need to render to a rendertarget that supports a bit more range than the simple 8 bits per pixel (i.e. a floating point target, or an sRGB target) to avoid artifacts like banding and the fact that decreasing the brightness on a superwhite pixel (i.e. brighter than '1') would turn it gray.

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