infinite far

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Cleric
Posts: 17
Joined: Thu Jan 19, 2012 2:41 pm

infinite far

Post by Cleric »

Is it possible to write a shader that will make a surface appear infinitely far. Like skies look infinitely far.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: infinite far

Post by obsidian »

[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Cleric
Posts: 17
Joined: Thu Jan 19, 2012 2:41 pm

Re: infinite far

Post by Cleric »

obsidian wrote:http://q3map2.robotrenegade.com/docs/shader_manual/general-directives.html#sort
I knew it's going to be something i saw a hundred times and never payed attention to it.
Thanks Obsidian.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: infinite far

Post by obsidian »

Do you have an example of what you want to accomplish? Sort will allow the surface to render behind everything else, but it won't scale objects as if it were infinitely far, so it may or may not be what you are looking for.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Cleric
Posts: 17
Joined: Thu Jan 19, 2012 2:41 pm

Re: infinite far

Post by Cleric »

I wanted to create like a fake skybox. Something i can put on the outer side of a window and make the image look far like it has some actual depth.
But without using surfaceparm sky for it.
TruthfulLiar
Posts: 351
Joined: Sun Dec 11, 2005 9:05 am

Re: infinite far

Post by TruthfulLiar »

Sorry, been way too long (read +5 years) since I last used GTK, but I vaguely remember being able to make a translucent surface (like a teleporter) that shows you a live-image feed from a GTK "camera" that you setup pointing in the direction of a sky or whatever.

Sigh... Is this making sense, can someone translate what I mean? I know, I used to do this.

Then you make a separate not-in-the-level box of sky or whatever surrounding the said directional camera. You have to connect two points together, from the first one in the window to the second (the camera) in your target area.

I believe that the surface required a special shader, that I forget which it was called but it is fairly quick to find a teleporter shader and read the code I suppose.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: infinite far

Post by obsidian »

You can either use a portal camera entity or a q3map2 _skybox entity.

Portals are used to make the Q3 teleported and mirrors, so you can see the destination or reflection on the surface.

Skybox entity projects a 360-degree capture of a mini skybox onto your sky. This is most likely what you want and works with best results.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: infinite far

Post by Eraser »

obsidian wrote:Do you have an example of what you want to accomplish? Sort will allow the surface to render behind everything else, but it won't scale objects as if it were infinitely far, so it may or may not be what you are looking for.
lol, sorry to be pendantic, but how do you scale something to make it look infinitely far away? :smirk:
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: infinite far

Post by obsidian »

Well, NOT scale... So that if you move closer to the object, it still keeps its relative size on screen.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
User avatar
CZghost
Posts: 1943
Joined: Wed Jun 22, 2011 1:45 pm
Location: Czechia
Contact:

Re: infinite far

Post by CZghost »

obsidian wrote:Portals are used to make the Q3 teleported and mirrors, so you can see the destination or reflection on the surface.
While we're on portals, I have question: Is it possible to make portal from mirror surface?
[ Linktree | Twitch | YouTube | Instagram | Websites ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: infinite far

Post by obsidian »

They are the same thing. The only difference with a portal is that it has a destination camera set for the surface.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Post Reply