Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
dave-0
Posts: 18 Joined: Thu Dec 31, 2009 9:39 pm
Post
by dave-0 » Tue Apr 20, 2010 9:07 pm
I followed Sock's tutorial on creating a phong shader, left it mapping a grey texture for now.
When I apply it to a brush, in this case a curved 1/4 cylinder the coords flip
at the half way point or something, and a hard edge is generated, and an artifact in the shadow map.
What I am doing wrong ?
Code: Select all
//-----------------------------------------------------
// phong shader for curved brushes in the map
textures/daveo/grey_phong
{
q3map_nonplanar
q3map_shadeangle 360 //--- I tried other shade angles also ...
qer_editorimage textures/daveo/grey_phong_REI.tga
{
map $lightmap
rgbGen identity
}
{
map textures/daveo/grey_phong.tga
blendFunc filter
}
}
phong.jpg
skinNCNmaster
Posts: 344 Joined: Wed Jan 29, 2003 8:00 am
Post
by skinNCNmaster » Tue Apr 20, 2010 9:12 pm
how is it applied in gtk in the patch surface properties dialog box?
fit natural set or cap?
Hipshot
Posts: 1547 Joined: Sun Jan 20, 2002 8:00 am
Post
by Hipshot » Tue Apr 20, 2010 9:28 pm
Group the patch and set the _lightmapscale to .25, .025 or something and see...
And, 360, won't that give strange results?
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
obsidian
Posts: 10970 Joined: Mon Feb 04, 2002 8:00 am
Post
by obsidian » Tue Apr 20, 2010 9:34 pm
Are you applying phong shading to a curve patch? FYI, curves are automatically "phonged".
Yes, shadeangle usually ranges between 0 and 180 (or 179 to prevent straight surfaces from being "phonged").
[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]
dave-0
Posts: 18 Joined: Thu Dec 31, 2009 9:39 pm
Post
by dave-0 » Tue Apr 20, 2010 9:37 pm
No, its just a brush, 1/4 of a cylinder. I was messing around with the shade angle
I think I started with 90. I will see how its mapped with the surface inspector.
dave-0
Posts: 18 Joined: Thu Dec 31, 2009 9:39 pm
Post
by dave-0 » Wed Apr 21, 2010 5:50 pm
thanks for the help, I just adjusted the mapping to axial and it looks fine now, at least in the test map I compiled