Page 1 of 1
Problems with glass shaders
Posted: Mon Aug 08, 2016 2:47 pm
by kejR
Hi.
I'm trying to create curved window, using mostly simple patch meshes, so it would look like one solid piece of glass. I've created simple shader, using q3map_nonplanar and q3map_shadeangle 179, however it still has visible difference between two adjacent patches. Screenshots will help to understand this issue.

As you can see, there are two horizontal lines across window (that's where the two patches meet), and there is visible difference in texture alignment. What should I do? Recreating whole thing with brushes will take ages, and right now the window looks really awful. Should I change something in my shader file or even glass texture? I'm out of ideas, so I would be extremely grateful for any help.
Cheers.
Re: Problems with glass shaders
Posted: Mon Aug 08, 2016 4:10 pm
by sst13
I think q3map_nonplanar and q3map_shadeangle works only with brushes, not curves.
The solution to your problem is to build the entire glass from a single patch, not seperate ones.
But it looks atm more realistic, like glass would look in the real world with this shape...

Re: Problems with glass shaders
Posted: Mon Aug 08, 2016 4:23 pm
by kejR
I am not sure if it's possible to build that window as a single patch, mainly because it has straight edges (it is more like V shape with flat middle, instead of perfectly smooth curve), unless there is some method I am not aware of.
It shouldn't look realistic, because it's bloody Star Wars map. It must look cool and spacey!

Besides that, those horizontal lines are ruining view from the window, which is one of the most important features of this small map. Thanks for the info about shader keys working only with brushes - if it's true, then I must think of something else, some sort of alternative solution or shape. Maybe I'll try to recreate whole glass with brushes, but that might be last thing I'd try.
Re: Problems with glass shaders
Posted: Mon Aug 08, 2016 5:14 pm
by AndyW
Its not a problem, just use a ENDCAP and add 2 ROWS like this:
[lvlshot]http://i.imgur.com/gG4PAWB.jpg[/lvlshot]
Edit: Sorry, i didnt read the part with the V-Shape when i took the picture.
Re: Problems with glass shaders
Posted: Mon Aug 08, 2016 6:49 pm
by sst13
AndyW wrote:...just use a ENDCAP and add 2 ROWS...
Endcap with
3 rows and it will work!
Or Simple Patch Mesh width=5 height=7 is basically the same.

Re: Problems with glass shaders
Posted: Tue Aug 09, 2016 6:45 am
by Theftbot
Re: Problems with glass shaders
Posted: Tue Aug 09, 2016 10:00 pm
by kejR
Thank you for all your responses, I couldn't ask for more. I still have so much to learn about using patches, because I had no idea how to create straight edges with it. :P

Looks perfect, just how I wanted (window is more visible in-game, but I might change texture to something less transparent). Again, huge thanks to all of you for such quick and helpful answers.
Re: Problems with glass shaders
Posted: Wed Aug 10, 2016 4:23 am
by obsidian
Curious, what game is this for?
Re: Problems with glass shaders
Posted: Wed Aug 10, 2016 4:59 am
by Theftbot
most likely Jedi Academy