PDA

View Full Version : inverse cubemap?


Neox
05-28-2009, 02:45 PM
Hiho guys i'm currently playing around alot with shaders and for a pretty specific effect i was searching for something that acts like an inverted cubemap.
To make it clear, a cubemap acts like a reflections to show stuff that is around and therefore outside the object, what id love to do is using a map that acts as if there is something inside an Object.
And to make it even easier, i can't use custom code, only what unreal tournament gives me ^^

ok here is an example of what i want to do

i just added a subsurface scattering Fake to one of our shaders, however in the case of the whale, i want him to have stuff in his belly, the current texture are just cubes that are reflected nothing too fancy but if i could actually make it look like there is something inside, this would be awesome

http://nonpublic.airborn-game.com/wip/neox/shaders/sss_fake_02.jpg

:edit:

ok i guess this is as close as i can get with a cubemap, but that could be tweaked for sure to work a bit ebtter with the mode

http://nonpublic.airborn-game.com/wip/neox/shaders/sss_fake_03.jpg
of course everything but the belly will be masked out

TSM
05-28-2009, 09:46 PM
Why don't you just make a cube map of the whales interior? You may need to clone the whale, 1 part scale it up, and apply that cubemap to the smaller piece, while keeping a translucent SSS on the outer piece, so you can see inside.

Just some thoughts.

Tumerboy
05-28-2009, 10:38 PM
Neox, do you mean you want it to look like it's illuminated, and there are shadows and such of the interior bits? (finger over a flashlight type of thing?) Or do you want it to look semi-transparent, so you can actually see what's in there?

I'm confused.

Mark Dygert
05-28-2009, 11:17 PM
humm... do you want it to slide around like a cube map or look like something is stationary inside. I'm not a shader wiz by any stretch so who knows what is possible. But I think it might be easier to model a simple silhouette to place inside?

Neox
05-29-2009, 12:33 AM
no because i cannot use any half transparancies for that so it has to be faked within the shader

@tsm thats what im doing now, but a reflection is nt the same like looking throiugh something an see whats in it, but i guess this is as close as i can get it

arrangemonk
05-29-2009, 05:05 AM
http://www.humus.name/index.php?page=News&ID=209

Xoliul
05-29-2009, 05:30 AM
I think you might need to use refraction-like cubemap sampling ? ShaderFX has a node and examples for that I think. I've never used it since refracting only a cubemap and not the objects behind 8(like glass) is totally useless, so I don't know the code off the top of my head, but could be what you want ?