pouët.net

fisheye view: cubemap or single image distortion ?

category: general [glöplog]
started to think you are going to do sth on a c64 or alike !
no no, I wanted a solution without VERTEX shaders, the reason being my models are not very well tesselated...
added on the 2009-01-16 17:07:57 by Navis Navis
always minimalistic this navis-dude ! ;) love you :)
lens fish effect, without cubemap stuff, heavy math and shaders...

here

added on the 2009-01-16 17:22:25 by Tigrou Tigrou
but...she isn´t realtime ?

Navis, have you solved your problem?
added on the 2009-01-16 17:40:37 by texel texel
I think so yes. Doesn't look great but that's because the content is not very nice (yet!)
added on the 2009-01-16 17:46:54 by Navis Navis
Quote:

float3 DirV =float3 (UV.x,UV.y,0.7);
DirV/=length (DirV);
UV.xy=UV.xy+(DirV.xy-UV.xy)*0.4;


job done


he HAS ! most likely he even quitted the browser for now....a coding navis is the best navis you can wish for :)
We live in a shader-safe world; it was only last year people stopped whining about other people using them because prod x wouldn't run on their geforce 4mx!
i should be able to code some " trollstop() " by now...let´s seee...
so navis what you were after was pretty much the old lens effect... ?
BB Image
added on the 2009-01-16 18:32:18 by BarZoule BarZoule
I guess so...
added on the 2009-01-16 18:41:02 by Navis Navis
seriously, how is lens fish effect done in media error???

i believe it was a simple pixelshader like cocoon posted, or maybe media error is tesselated enough to apply it directly to vertex ?
added on the 2009-01-16 19:16:12 by Tigrou Tigrou
have a look in the prods-page...
...6 renderings every frame...very expensive stuff so-to-say !

you should ask chaos about his entry to the intel-compo tho...as its a 360degree-fisheye all in shaders ;)
start using RT and the lens effect is for free! :)
added on the 2009-01-18 09:12:30 by toxie toxie
tigrou: render to cubemap and a pixel shader to generate fisheye.
cocoon: much the same there as for ours, just a different shader mapping on output.
added on the 2009-01-18 10:39:17 by smash smash
It's a pretty simple shader once you understand what should happen.
added on the 2009-01-18 22:14:13 by xernobyl xernobyl
navis: what has model tesselation to do with not using the vertex shader?
added on the 2009-01-18 22:19:38 by xernobyl xernobyl
Tiago: The vertex shader will not show curves on the edged of triangles. If the model is not tesselated enough, there won't be curve effect...
added on the 2009-01-18 22:59:12 by texel texel
clearly i'm just simple, but why not just tesselate the thing more? or is that too slow, somehow (assuming it must be done realtime)
added on the 2009-01-18 23:40:06 by skrebbel skrebbel
the tessellation could even be done in the geometry shader to save vertex bandwidth and perhaps do it all adaptive and shit.
added on the 2009-01-18 23:42:02 by kusma kusma
skrebbel : more tesselation = heavier vertex processing and more work for the artists because automatic tesselation often doesn't do a good job, it can tesselate too much at places and not enough at others.

Also, tesselation won't solve the issue if an object is too close to the camera, unless you have some kind of dynamic tesselation or LODs (= more work for the artists and possible popping)
added on the 2009-01-18 23:45:40 by keops keops
You don't need any of the fancy 3d modelling tesselations, all you need to get going is polygon subdivision.
(i.e: It will not be more work for the artist, but it means that the artist could have used more resources if he wished)
graga: well, yeah, but preferably a sub-division scheme that doesn't produce insane amount of polys for long and thin polys, and doesn't create t-junctions. It's not as easy as just saying the word :)
added on the 2009-01-19 00:33:23 by kusma kusma

login