home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Refraction in glass material?

by thojoh370 on 05/23/2010 17:01, 12 messages, last message: 07/10/2010 13:43, 1890 views, last view: 04/07/2024 13:05

Hi there people.

First of all, yes I'm back. I'm not going to surrender to you guys, not by a long shot...

Now to my question/topic/suggestion/whatever. While I know the water(falls) refracts and mirrors and all that... why doesn't the glass material also do that? As far as I know, that material is just transparent with some very weak coloring added to it.

Bottom line is:
Is it possible to manipulate the "glass" material so that it refracts/reflects just like the water material - in order to have it look more like real glass (and quite frankly, more like other games)?

   Board Index   

#1: ..

by Quin on 05/23/2010 17:46

Not in realtime, you can "reflect world" however by using envmaps.

http://sauerbraten.org/docs/editref.html#_envmap_

reply to this message

#2: ..

by thojoh370 on 05/23/2010 21:54

But.. aren't the water effects rendered in realtime?

reply to this message

#3: Re: ..

by Quin on 05/24/2010 00:15, refers to #2

You'll notice that water is used sparingly (only 1 or 2 reflection planes per level) and is only able to reflect along the z-axis.

The cost of real-time reflections along multiple planes and areas is too high for what Cube tries to achieve (scalability) and hence won't be added.

reply to this message

#4: ..

by Pieter on 05/24/2010 18:46

I think Thojoh's question has to do with refraction, not reflection.

reply to this message

#5: Re: ..

by Razgriz on 05/24/2010 19:23, refers to #4

there is no reason to add refraction to glass since glass material has no special shape for it to refract the environment.

reply to this message

#6: Re: ..

by |ice|sub-zero|L on 05/25/2010 00:10, refers to #5

unless of course someone made it possible to change the shape of glass..... but good luck.

reply to this message

#7: Re: ..

by Quin on 05/25/2010 02:10, refers to #6

Alpha blend material in SVN lets you do this to geometry, texture it like glass, then control its opacity.

reply to this message

#8: Re: ..

by Q009 on 05/25/2010 07:48, refers to #7

yep
and thats even better because you can combine bumpmap with envmap to make glass look more realistic

reply to this message

#9: ..

by thojoh370 on 07/10/2010 00:35

Yeah, well if you look at this screenshot..
http://www.freakygaming.com/gallery/action_games/f.e.a.r./creepy_little_girl.jpg

It isn\'t very clear, but what you see through the windows behind Alma is distorted, while what you see through the doorway isn\'t. That is the kind of effect I was thinking of, but semi-transparent textures might work aswell as long as it still looks like glass.

Also, is it possible to bend clip/glass/noclip etc. yet?

reply to this message

#10: Re: ..

by SheeEttin on 07/10/2010 00:56

> Also, is it possible to bend clip/glass/noclip etc. yet?

From Quin's post, just two above yours...

> Alpha blend material in SVN lets you do this to geometry, texture it like glass,
> then control its opacity.

As for distortion: I don't know. Probably possible with a custom shader.

reply to this message

#11: Re: ..

by |ice|sub-zero|L on 07/10/2010 05:38, refers to #10

to put it in English for those kinds that need to learn that google is a big help... this means that the "cube"/"material" with alpha blend allows you to make the "cube" to change more or less clear, meaning of course that you make your "clip" with (if i have it right) "cube" or "glass" with "cube" if you add envmapping.

reply to this message

#12: Re: ..

by Razgriz on 07/10/2010 13:43, refers to #11

not much sense in your reply sub-zero :P

Alpha material reduced the opacity of a cube, allowing to make glass-like shapes, and textures that use the *envworld* shader setup will be able to use envmap to reflect the world like a glass would.

now if you want to make invinsible cubes, there is pretty much no need for alpha, since using /skytexture 0 and covering your object on all sides with it will make it invisible to common view.

though alpha allows for something more, as you can use both normal skytexture and geometry that you make invinsible with a more detailed setup of alpha material.

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53865517 visitors requested 71640663 pages
page created in 0.035 seconds using 10 queries
hosted by Boost Digital