Hacker Newsnew | past | comments | ask | show | jobs | submit | more codezero's commentslogin

I did tech support when the 99->00 switch happened, got paid 3x overtime. I got one call, and it was actually legitimate, but was a third party piece of software so after that we left and went to a party :)

I doubt this will be a real problem in 2038, then again the prevalence of computing devices is much larger now and will continue to grow by 2038, but so will technical aptitude, so hopefully they'll cancel out and this will still not be a problem.


Same, but 4x overtime here :) I was just on the PC team though so I left at 7pm after finishing the last few BIOS updates; the AS400 and HP-UX teams got the pleasure of staying past midnight.


This is pretty interesting to read, but does anyone have any good links that describe what shadow volumes are and why this solution was clever at the time? Is it still clever, or has some new method taken its place?


Caveat: I'm not a rendering engineer (though I do work in game development), so my knowledge might be a bit out of date or imperfect.

It's very clever, and leads to pixel-perfect shadows. the other main technique used to do real time shadows, shadow mapping, writes them to a buffer, so if you have a larger buffer you get better shadows, and with a smaller buffer you get worse, more aliased shadows (there are techniques to make this harder to notice, though).

Shadow volumes is also typically slower, and puts (more) restrictions on your geometry than shadow mapping, so my experience is that most engines use shadow mapping.

Though, I think I remember one of the rendering engineers saying that shadow volumes is much easier to implement for small engines, and that he's disappointed it isn't more widely used, but I might just be thinking of some other less robust method of stencil-buffer shadowing.

Searching shadow mapping and shadow volumes in Google looks like it leads to good links if you're interested in learning more.


Shadow volumes have a number of disadvantages. You have to create geometry for every shadow casting object and for every light source for which it casts a shadow, this is a lot of geometry and a lot of CPU overhead, so you generally used them for static lights and only shadowed moving objects that crossed the light cone. These days CPU doesn't matter as much, but back in 2000 it was a big deal. It was hard to solve the problem in a general way, and you ended up asking your modelers to tag which objects could be shadow casters, which could be shadow receivers, and which lights corresponded to the shadows.

Shadow maps are faster and compounding shadows is much easier. What you do is render the subset of the scene that you want casting shadows from the point of view of each light source that you want casting shadows, and then render the entire scene once for each light, using the shadow map to kill fragments that aren't illuminated. Back in the late 90's and 2000, you could potentially have one, maybe two shadow maps. The downside is resolution, but you can play tricks with the projection matrix to bias the pixellation artifacts into more distant areas.

Pre-computed shadow volumes were awesome for static lights, where you didn't have to pay the geometry compute overhead every frame, and shadow maps were awesome for things like flashlights and moving lights, since they allowed moving the shadow compute complexity to the GPU. When the Riva TNT2 came out, and you could multi-texture, shadow map performance doubled.

Lighting is hard! If you have 2 shadow-map shadow casters, and one shadow volume, you're rendering the scene at least 5 times and the shadow volume twice, using the geometry processor to kill front or back sides from the point of view (can't pre-compute this).

(I've been working on this stuff since the 90's. SGI was doing this stuff years before games, but it just wasn't well known because nobody could afford those damn things, it took cheap 3D commodity hardware to make this work really fun, well, minus the whole thing about it sucking to work in the games industry.)


Another reason stencil shadows are difficult in a production environment is that any model that casts a shadow needs to be watertight (i.e. a manifold). Models need to have to full geometry for things like hair, thin fins, and grass.


If a triangular surface has a hole (a cycle of one-triangle-only edges) it's manifold but not watertight.


Shadow mapping[1] has pretty much taken over at this point. This is mainly because of the high overdraw when rendering shadow volumes. You can also filter shadow maps to get soft shadows. This is not really possible with shadow volumes.

Raytraced shadows are starting to become feasible.

[1]http://en.wikipedia.org/wiki/Shadow_mapping


Let's not forget that he was not the first to come up with this technique. From wikipedia [1]:

William Bilodeau and Michael Songy discovered this technique in October 1998, and presented the technique at Creativity, a Creative Labs developer's conference, in 1999.[2] Sim Dietrich presented this technique at both GDC in March 1999, and at Creativity in late 1999.[3][4] A few months later, William Bilodeau and Michael Songy filed a US patent application for the technique the same year, US 6384822 , entitled "Method for rendering shadows using a shadow volume and a stencil buffer" issued in 2002. John Carmack of id Software independently discovered the algorithm in 2000 during the development of Doom 3.[5] Since he advertised the technique to the larger public, it is often referred to as Carmack's Reverse.

[1] http://en.wikipedia.org/wiki/Shadow_volume


According to an earlier comment, iD used this technique in Doom3. Would Carmack have had to pay patent license fees?


<Sigh>, so many things are independently discovered.. Why do we still have patents??


Patents were originally on the specific mechanical system (like the Colt revolver) or chemical composition.

Math was excluded, as was computer code as a specific usage of mathematical logic.

But slowly patents on computer code made its way into patents, initially as code controlling mechanical or chemical processes.


Ah, i initially heard about this as a fix for z-fighting.


From my memory the only games which ended up using shadow volumes were Doom 3 and games based on the Doom 3 engine. Shadow maps always seemed like the way forward to me. That is purely based on my own "what looks better" scale. Given that most techniques in 3D programming are hacks to make things look better, I was surprised to see Carmack go down the shadow volumes path. It felt like he'd chosen it based on having nicer code versus an overall nicer looking game. This is all my opinion of course.


I find shadow volumes tend to look better, at least cleaner anyway. Shadow mapping if not properly done can look glitchy and aliased. One surprisingly bad offender was Skyrim.


I recall seeing both shadow mapping and volumes in Far Cry. Mapping was generally used outdoors in daylight (parallel casted light), and volumes for point lights. F.E.A.R. used volumes extensively also.


Are there actual production games using ray traced shadows? For non realtime rendering the advantages are soft shadows through lots of rays, rendering in one pass, and no geometry based artifacts. To do them in games though you have to trace against some sort of geometry and that geometry has to be sorted every frame. Simple proxy geo and dynamic bvhs are feasible I'm sure, but it seems to me to be a solution in search of a problem for the time being since all geo to be traced must stay in memory (and for transparency, the opacity textures as well). Now filtering cone sampling of volumes like the Unreal engine is a different story.


I’m wondering what is the technique behind the shadows in this recent Unreal demo: https://www.youtube.com/watch?v=4249b94KtyA

Looks like some sort of volumetric ray marching approach acceleratred by a signed distance field. Does anyone know what it is?


Not only overdraw but also having to be careful with how you craft the scene. SM pretty much allows for arbitrary scenes.

Also small nitpick: you don't filter the shadow map, but the resulting shadow response.


Cool, thanks a bunch for that info.


There is nothing new about the idea that to determine whether a point is inside a shape (2D or 3D), you can extend a ray from that point to infinity and then count the transitions across object boundaries. If the count is odd, the point is inside, otherwise it is outside.

Secondly, this ray can be extended in any direction; it doesn't matter.

In the shadow volume rendering algorithm, they were originally casting that ray from the visible point on an object (corresponding to a pixel) back toward the eye. Carmack realized that you can cast it away from the eye. But that ray can obviously go in any direction. The eye has nothing to do with whether the point is in a shadow. Of course the algorithm breaks sometimes if the ray is cast toward the eye, and stops at the eye, since it hasn't gone to infinity. So if the eye is in shadow, then the ray has failed to emerge from that shadow, and count that.

I suspect that a much cleaner solution would be to cast the ray toward the light source! Then we only have to consider the silhouette polygons/surfaces, basically: the light-source-side "caps" of the shadow volume. We don't even need the shadow volume as such; we don't need the sides (because they are parallel to any ray we cast toward the light source) and we don't need any caps on it on the opposite side, away from the light source.

The down side, however, is that casting rays not in the eye direction means considering objects that are not in the visible scene. Your database of objects for the frame has to include anything that can potentially be between the light source and the visible point. The beauty of the shadow volumes algorithm is that it can work with viewport-clipped data. (And that is why you want to cast that shadow volume intersecting ray away from the eye: because stuff behind the eye is clippped!)


In/out works for shapes in geometry with continuous boundaries. But digital shapes are defined by vertices. If your ray intersects a vertex right as it inflects back (tangent to a corner) a 'crossing' gets counted yet nothing was crossed?

Another way to do this is to count the area from a point (sum of dot products of consecutive shape vertices). If its positive - inside. If its negative - outside?


For a convex polygon, you can determine whether a point is inside or outside by giving each edge an consistent orientation around the path. Then check where the point lies w.r.t. that orientation: is it to the left of the line or to the right? If the polygon is counter-clockwise, say, and the point is to the left of every edge-line, then the point is inside. This extends to 3D convex polyhedra, where you have a consistent orientation of each face. If a point is in the negative half-space of each face, then it is inside.

These approaches require traversing the whole shape though, whereas the ray-intersecting approach works with clipped pieces (that are not necessarily even connected to form a complete shape). You don't even know which pieces belong to which volumes, necessarily.


Alas, if only you had been there 14 years ago to create that cleaner, yet performant solution.


I know! I somehow lost interest in hacking on computer graphics about 20 years ago though.


And for what shadow volumes are: It is basically an imaginary volume that encloses the shadowed area on your world. For example a sphere produces a cone shaped shadow volume behind it when a point light hits it. In computer graphics you can use this geometry to render shadows on object.

Imagine a ray coming out from your eye, if that ray first hits a shadow volume and then an object then that point of that object is inside shadow. If ray never hits the volume or passes through volume


My favorite thing about this post is how they're generating music with Lisp :)


Given the time frames they looked at, couldn't a bunch of these be people going to a pub, and then leaving after last call?

This would also explain the spike near the weekend, among other things.


that would certainly explain the Boston geographic map.


Or, parties and events at downtown hotels (e.g., Boston back bay).


Personally I self host a domain that accepts anything@ and file it into a special inbox. This lets me give real addresses to specific sites and blacklist them as needed.


I did that, until I got the second run of someone sending spam to [dictionary]@mydomain.


Luckily this hasn't happened yet. Last time someone spammed my "throw away" domain I just took it offline (killed DNS) for a few days, that seemed to work :P


I hope you're doing [email protected] otherwise you'll get catchall spam.


Surprisingly, I haven't been getting catchall spam. If that happens I'll just write a quick interface to add permitted stuff through easily or just create a pattern that catchall won't use :)


Where has this been shown? Since I bike daily, I'm really curious about studies about helmet safety.


Probably referring to the study in the uk to examine how overtaking distances of passing vehicles is affected by the attire of the cyclist [1].

There's suggestions that making helmets compulsory reduces cyclists, which in turn makes cycling unsafer.

I cycle in London every day (for the past 10 years) and personally don't wear a helmet (though plenty of my friends do). I tried, but found for me it was a mild occasional obstruction to my peripheral vision - something I value highly on the road.

[1] http://news.bbc.co.uk/1/hi/england/somerset/5334208.stm


I want to make a joke about how you all ride on the wrong side of the road, but your points are all too good to snipe at :)



Interesting, but not really definitive. Seems like there's a big factor related to the size of the bike lane as well. There could also be a bias towards male and female cyclists, since this experiment was conducted using a wig to make the rider look female with no helmet on. Would still like to see more.

My current ride gives me a pretty huge bike lane, and so far I've felt better with a helmet on than without.


I just started biking to/from caltrain and in the first week, I've already had someone try to steal my bike off the train and have nearly been hit by several cars in completely un-extraordinary circumstances.

I'm sticking with it, but it doesn't paint a great picture for biking over other forms of convenient, readily available transport. Also the initial cost of biking, even when going for a super cheap bike and gear was ~$400, which will only pay for itself after ~6 months assuming I don't need to buy more gear (I already know I will, to deal with rain, and repairs).

My alternative was paying $50 for monthly parking at the caltrain station. My cost estimate includes the price of gas to get to and from the caltrain station.


I was going to say that $400 is going to pay for itself in dramatically less than six months if you're paying City prices for parking. $50/mo for CalTrain is a steal -- if you're parking _in_ SF anywhere near downtown or SOMA / South Park, that's a couple of day's charges, possibly a week's worth if you're walking a few blocks.

I'd factor in a few other points on cycling in that you're getting exercise, replacing at least some of a gym or other cost. And your bike will almost certainly last more than six months. A decent bike will last a lifetime, or at least a good ten years. You'll want to factor in service and parts but if you're spending more than $100-$200/year, you're likely using it for more than just casual commuting. That's a few tanks of gasoline for a car.


You're right. I definitely would have done this even if the cost didn't make too much sense. The exercise is one reason, another is that the caltrain lot fills up before about 7:45 am, so even if I'm catching an 8:15 train, I need to be there early. With a bike, I can ride for 10-15 minutes and get there on time. My bike won't last a year, or a lifetime, it's not decent, I've had to do a bunch of bolt tightening even after a few weeks, but that's OK, I didn't pay a lot.


Bolt-tightening (especially on a recently-purchased bike) is hardly unexpected. On a new bike, there's a lot of general stretching and breaking-in of components over the first few days/weeks of use.

A used $400 bike _should_ last you a long time, if you've selected properly. Though replacing components is fairly typical -- chain and freewheel, cables, tires, wheels. I've gone through a number of other components as well over various bikes under heavy use, though I've still got two frames that I've had for decades.


I bought a new $350 bike so my expectations are low. I'm ok with that. I wasn't sure the bike commute would stick so I didn't want to go all in right away.


Sunk cost, so, well, roll with it. But a used purchase in this case is almost always going to be more appropriate.

There's a serious inflection point at the lower end of the bike market where you get very low-quality kit. I've not bought new for such a long time I'm not sure where it is any more, but ~$400 - $800 is likely around the range for a basic city bike (e.g., "mountain bike" type stance but geared for city streets).

Figure paying half that for a lightly used model, of which there are generally many to choose from for numerous reasons.


City biking does have a bit of a learning curve, and I do highly recommend you look into those classes that I linked to above (or find similar ones in your area).

You will get better with experience though, and the better you get the more you'll be able to understand how to bike defensively and reduce any sort of close calls.


I wish more people would take your advice and learn how to ride defensively. I really feel like most people who get in accidents on their bicycles probably aren't paying attention to what's going on around them.


You're right! I come from a very bike-dense country (The Netherlands, we have more bicycles than inhabitants.) My son is 4 and he rides his bike to school. I'll cycle next to him, but he does know all the rules and basics about defensive riding.

I bicycled in and around NYC last year and it was crazy. Car drivers didn't really pay attention to bikers, but that was actually much less dangerous than I anticipated. The cyclists however were flipping mad! No rules, no courtesy, aggresive riding, running red lights, cutting off cars... Madness! Not all,of them, of course, but considerably more than you would see in, say, Amsterdam.

The bike lanes is NYC were fantastic, though. NYC seems perfect for bike transportation, I never got why you don't see more cyclists. SFO with all those hills (like I said, I'm dutch, no hills here...) and cable cars seems more challenging!


This sounds like victim shaming. Possibly the drivers of the cars are not paying attention, maybe both, but to assume that people are somehow doing something wrong (many may be) just because they are in an accident seems overly presumptuous.

You can advocate for learning more about defensive riding without making it seem like those who are in accidents are just ignorant or unaware.

My first two car accidents were completely unavoidable and unrelated to my awareness. I would have hated to have someone tell me these accidents could have been avoided with further training, knowing nothing else about the accident except that I had one.

edit: I see your other comment in this thread, it has more information, thanks for that, all the same, it definitely seems to ignore a lot of complex factors and use anecdotal evidence (4 years of that, though, is pretty reasonable).

My main gripe with any car/bike interactions are that they are orders of magnitude different. A car slams on its brakes to respond to something in the road, or swerves, and they can do that an order of magnitude faster and more powerful than a person on a bike can. As long as bikers share the road with cars, there will be an imbalance of power which is unavoidable, so they should feel a bit of indignation.


which will only pay for itself after ~6 months

It can also replace a gym membership.


I think that for most purposes 32 bit had worked without much issue so it's a matter of cost vs benefit. Can you think of any issues that people face because Chrome was 32 bit? So far I'm seeing Java 8 integration, which is probably a tiny fraction of their users. Also it's not really breaking since those users can just use Firefox for that purpose. They obviously don't consider this a loss.


Security is a big one. 64-bit address spaces are inherently harder to exploit, plus, IIRC, on OS X in particular, ASLR in 32-bit processes has some weaknesses that were never fixed.


Good point! To stay on my angle, are there Chrome specific security bugs that are in the most recent builds that are exacerbated by 32bit builds?


This is true for almost any application (very few things NEED 64 bits).


If I have the 32 bit Chrome, do I need to install a new version, or will updates going forward give me the right architecture?


Mine just updated to version 39 and it got the 64-bit support.


Just to confirm, if I wait, the updater will grab version 39 x64 eventually, it just takes time to rollout.


Yes.


I can't imagine they'd force people to use 64 bit via an update.

It's customary to give the option.

http://www.chromium.org/getting-involved/dev-channel


Is there any point to giving the option for OSX? When was the last OSX version that did not support 64bit? Is there any reason to prefer a 32bit version on an OSX that supports 64bit?

Real questions, not rhetorical!

If I look at http://www.chromium.org/getting-involved/dev-channel , they list a Windows 32-bit channel and separate 64-bit channel, but only one Mac channel. I'm not sure if this means anything about their release intentions, or if the page may still be updated.


OS X has supported x86_64 applications since 10.5 (Leopard), so there's no problem there if your CPU supports it; moreover, the last OS X release to support 32-bit-only x86 CPUs was 10.6 (Snow Leopard). However, Chrome does support 10.6, so I guess this release may have the effect of dropping support for some Mac models from 2006 that previously worked.


It's customary to give the option when there's an option. If you go to the Chrome download page, there is no longer any option to download the 32-bit version.


I just checked chrome://chrome for updates and it confirmed there was no update and 38 was the latest, but when I re-downloaded chrome from https://www.google.com/chrome/browser/ it was the 64-bit v39 - so yes you do need to install a new version!


I doubt they'd stop updating users just because of this change. It's more likely that they roll out the auto-upgrade in stages, rather than having everyone update all at once.


But that doesn't make sense - if it's true that they will not be providing a 32bit version for Mac from now on. Then most people will be stuck on version 38.


I had the exact same issue:

Oddly enough, chrome didn't want to auto-update to this, it was "up-to-date" at 38.x, even quitting and relaunching applied no change. Downloading a fresh `dmg` archive from https://www.google.com/chrome/browser/ applied the 64-bit update.


When you download the new browser, does all of your preferences like bookmarks and extensions and stuff transfer over?


As far as I can tell, once you've downloaded the 64-bit app, you can launch it instead of the older version and it's an exact drop-in replacement. For example, all my open tabs were restored in the 64-bit process, as they had been in the 32-bit one.


Yes.


What about if you had pages open that you don't want to lose (literally hundreds of tabs)?


> What about if you had pages open that you don't want to lose (literally hundreds of tabs)?

There's always one of these in every discussion about a web browser. That one person who, instead of bookmarking things, keeps literally hundreds of tabs open.

(Some of my best friends are "this guy")


Then you should first change your browsing habbits, and probably several other ways in which you organize things in general. And ask yourself if you really understand modern technology.

Second, you could save all the open tabs as bookmarks, with the Bookmarks -> Bookmark all Tabs command. It will save all open tabs in a new bookmarks folder.

Lastly, when you reopen the browser after the update, you can click File -> Reopen closed tabs, which will reopen all of those, even if you haven't bookmarked them.



Why not save open tabs as bookmark folder? Then reopen the bookmark folder as a tab-set? I know you can do this with FF (maybe +ext).


you can right click on a tab to bookmark all tabs to be safe.


Or speeds up :)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: