Viewport with transparent background? blending viewports how

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
toglia
Gnome
Posts: 336
Joined: Sat Dec 08, 2007 4:28 am
Location: Canada
x 7

Viewport with transparent background? blending viewports how

Post by toglia »

Hello Ogres :D,

Last week I was trying to do 3d overlays that wouldn't deform with the camera's perspective. Pretty much because these objects are symmetric and they have to be positioned in the corners of the camera (where they stretch the most and look very weird).

Then I imagined this could be possible if only viewports had the ability of using a transparent background or maybe have a blending mode. I know viewports can overlay one another, they even have a zOrder, it all made a lot of sense, people could even use viewports like layers in photoshop, imagine that!

I ran to my house just to try two vps, one on top of the other, and assigning a background color value of, 1,1,1,0! (alpha to 0) to the one on top, Didn't happen... :( Then I searched hours (lol not that long) for something to do with the viewport's blending mode, nothing...

Has anybody ever wanted to do this? Is it possible by any chance?

Thanks for any help.

Have fun!
User avatar
toglia
Gnome
Posts: 336
Joined: Sat Dec 08, 2007 4:28 am
Location: Canada
x 7

Post by toglia »

This is probably not possible, but isn't this a good idea? maybe this could be possible in the future... (Bump :roll:)
User avatar
gerds
Goblin
Posts: 260
Joined: Mon Sep 01, 2003 3:59 am
Location: London, United Kingdom
x 1

Post by gerds »

I believe you could achieve the desired result by "rendering the overlapping image to a texture" and then blending the texture over the top of the viewport, either as a static plane mesh, or as a compositor.

Chances are you would have to write a shader to be able to perform the exact blending you require unless you could initialise the texture with alpha = 0 for every pixel at the start of each frame.

This does seem like an overly complicated way of achieving your result though.
User avatar
toglia
Gnome
Posts: 336
Joined: Sat Dec 08, 2007 4:28 am
Location: Canada
x 7

Re: Viewport with transparent background? blending viewports how

Post by toglia »

Post Reply