HL2 + Optics

Z

ZoTz3Mob

Guest
Okay i have done a search for this and come up blank.

It probably has been mentioned before, but i am not sure (I have perused since this forum went up but cba to register then, too many flames, but i did read 'lots').

So.........

When i watched the the E3vid and the lovely Bink of Dr.Kleiners lab the thing that really struck me as being a 'nice touch' was the Magnifying lens on the desk. At first i thought 'wow is that really magnifying', i sat amazed. Then i looked at it a little bit harder. Now i am not entirely sure, but this just looks like it's just a displaced image of whatever is behind it, at the same scale, not straight through like glass but an image slightly off-centre from the image behind giving the impression that it is magnifying.

I would assume that if you involved real optics then it would mean a large CPU overhead to calculate the refractions, hence the need to use visual trickery to avoid the CPU overhead. This has been demonstrated already in the HDR demo, not the HL2 one, but the DirectX9 spinning marbles/skull/rope thingy that was posted here before.

If you take a close look at that demo you will note that when objects (solid spinning marbles) pass behind the middle object when its material is set to a refracting material (glass, ruby, etc...) you will note that the object passing behind the refracting object is not rendered. Although light does appear to pass through the object, i doubt that it is actually being refracted but instead reflected from its surface attribute using light values that hit the back side of the object.

Two different interpretations of refraction, with differing results.

So if i assume that 'true optics' is not coded into HL2, what would be the possibility of their being a 'Glass Brick' partition wall somewhere in the game, with enemy behind that you can see moving (hopefully somehow distorted). And [fingerscrossed] will these optical objects be breakable [/fingerscrossed].

The stained glass window of Gordon in the tech demo sort of gives the impression of the glass brick, albeit a very large and colourfull one.

[givingmymindatreat] 'Me pulls pin on HL2 gren and throws it towards the glass brick wall that the Combine squaddie has nipped behind to have a sly smoke' [/givingmymindatreat]

:)
 
yeah, i'm not sure what your asking o whatever, but i agree with it all.. lol... but as with nading guys through glass and stuff, i just want to be able to shoot through walls you would normally be able to shoot through in real life :)
 
A SMART HEADCRAB, the world truely has gone to hell in a handbag.

jk haha.
 
It's done with shaders AFAIK, just like the effect when the strider uses it's weapon. The world seen through the weapon's 'beam' is all distorted and twisted. This could probably be used to refract too, like they do with the water effects.

[edit: spelling]
 
They mentioned they have real-time REFRACTION in the water. The same thing could be applied to the magnifying glass since refraction is what causes magnification. :p
 
the magnifying glass is an i/o filter. it was stated by someone from valve in the info thread a while back.

edit: and of course it will break. the magnifying glass is a glass object with special properties giving it the effect it has.
 
[vader]Impressive. Most impressive.[/vader]
 
I'm just so excited about all the things in HL2 (visual efects, believeable physic situations etc.) that will make me scream: WOOWW!!! FINALY THIS IS A GAME OF THE NEW MILLENNIUM !!!
 
Render-to-texture distortion effects that give an approximation of refraction and light-bending in transparent objects is possible in source, on a DX8 and above card.
 
Originally posted by ZoTz3Mob
I would assume that if you involved real optics then it would mean a large CPU overhead to calculate the refractions, hence the need to use visual trickery to avoid the CPU overhead. This has been demonstrated already in the HDR demo, not the HL2 one, but the DirectX9 spinning marbles/skull/rope thingy that was posted here before.

Never heard anything about Pixel Shaders? DX9?

Well this lens effect is exactly a pixel shader effect. The same as red transparent liquid in the containers behind, the same as the strider shooting pulse or all water effects.

It's a mathematical calculation done entirely by the shader core, no CPU time is needed.
 
Back
Top