mkultra333
4 постов
Карма: 0
#1 23 ноября 2008 в 04:43
Greetings.&nbsp; Sorry for the english, I&#39;m Australian.&nbsp; I&#39;m reading your pages via http://translate.google.com/translate_t#<br /><br />I hope my message doesn&#39;t come out scrambled in translation. :)<br /><br />I&#39;d like to say Berserker Quake 2 is really great.&nbsp; I&#39;m an amateur programmer who&#39;s been looking at a lot of open source quake based engines:&nbsp; XreaL, Q2Evolved, DarkPlaces, Nexiuz, Alien Arena.&nbsp; I&#39;ve been looking for an engine that handles real time per pixel shadows and bump mapping.<br /><br />Berserker Quake 2 is the best out of all of them I&#39;ve seen so far.&nbsp; And I really like that it has displacement mapping too.&nbsp; Runs at a good frame rate on my AMD 2.01 GHz dual core, nvidia 7950GT.<br /><br />I also play stereoscopic 3D (s3d) using shutter glasses:&nbsp; I use eDimensional 3D glasses.<br /><br /><br />They work with D3, Q4 and a few other games.&nbsp; But often they don&#39;t work with any of these open source engines.<br /><br />I found that they don&#39;t work with Berserker Q2, in s3d mode I would get big black glitches appearing all of the screen.&nbsp; Although I didn&#39;t think I&#39;d have much hope, I wondered if I could fix this.&nbsp; I didn&#39;t like my chances, but just in case I decided to experiment with the code.&nbsp; <br /><br />And by luck, I found a fix.&nbsp; <br /><br />The change is made in: <br /><br />void R_RenderView (refdef_t *fd, bool mirror)<br /><br />I go down to the following piece of code and change it as marked:<br /><br />for (i=0; i&lt;numUsedShadowLights; i++)<br /> {<br /> //find a lights that still fits on our current screen plane<br /> //using the first fit method.<br /> //Other methods may give better results (exhaustive for example)<br /> //but i&#39;m convinced you can&#39;t save more clears than those that you<br /> //save with this.<br /> bool foundone = false;<br /> for (j=0; j&lt;numUsedShadowLights; j++)<br /> {<br /> if (!usedshadowlights[j]-&gt;visible)<br /> continue;<br /><br /> currentshadowlight = usedshadowlights[j];<br /> if (true)//R_CheckRectList(&amp;currentshadowlight-&gt;scizz)) //MKULTRA333 making this always true reduces stereoscopic glitching.<br /> {<br /> foundone = true;<br /> break;<br /> }<br /> }<br /><br /><br />And a bit further down, a similar change:<br /><br />la: // ïðîâåðèì, åñòü ëè ïîâåðõíîñòè, êîòîðûå â äàííîì êàäðå ä.á. îñâåùåíû?<br /> CheckWorldInteraction();<br /> if (!cl_numlightvisedicts &amp;&amp; !currentshadowlight-&gt;has_lightedsurfs &amp;&amp; !currentshadowlight-&gt;volumeCmds)<br /> {<br /> currentshadowlight-&gt;visible = false;<br /> continue;<br /> }<br /><br /> glEnable(GL_STENCIL_TEST);<br /> glDepthMask(0);<br /> bool dbt = R_SetDepthBounds();<br /><br /> if (false)//R_CheckRectList(&amp;currentshadowlight-&gt;scizz))&nbsp; //MKULTRA333 making this always false reduces stereoscopic glitching.<br /> //we can have another go without clearing<br /> R_AddRectList(&amp;currentshadowlight-&gt;scizz);<br /> else<br /> {<br /> //Only clear dirty part<br /> glScissor(totalRect.coords[0], totalRect.coords[1], totalRect.coords[2]-totalRect.coords[0], totalRect.coords[3]-totalRect.coords[1]);<br /> glClear(GL_STENCIL_BUFFER_BIT);<br /> recList = NULL;<br /> R_AddRectList(&amp;currentshadowlight-&gt;scizz);<br /> }<br /><br /> R_MarkBrushSurfaces();<br /><br />So all it does is change two tests, making one always true and the other always false.&nbsp; This doesn&#39;t seem to have impacted the frame rate and magically gets rid of the black glitches in stereoscopic mode.<br /><br />I realize this glitch would only turn up for a very small number of users, since not many people play games using stereoscopic glasses.&nbsp; I just thought I&#39;d mention it.&nbsp; Perhaps a cvar could be used to optionally modify these tests for such stereoscopic players.<br /><br />Anyhow, just thought I&#39;d mention it.&nbsp; Again, great game.&nbsp; I&#39;m thinking of trying to put your renderer into Quake 3 Arena, I don&#39;t know how difficult that would be.<br /><br />(Здесь я автоматического перевода, образующихся на Google, извинения, если это звучит странно.)<br /><br />Поздравления. Извините за английский, я австралиец. Я чтение ваших страниц с помощью http://translate.google.com/translate_t #<br /><br />Я надеюсь, что мое сообщение не вышли зашифрованная в переводе. :)<br /><br />Я хочу сказать, Берсерк Quake 2 действительно велик. Я любитель программист, кто искал на много открытых источников дрожать основан двигателей: XreaL, Q2Evolved, DarkPlaces, Nexiuz, чужеродные Арена. Я ищу двигатель, который обрабатывает в реальном времени на пиксель тени картографирование и угождать.<br /><br />Берсерк Quake 2 является лучшим из всех из них я видел до сих пор. И мне очень нравится, что она слишком перемещения карт. Работает на хороших кадров на моем AMD 2,01 ГГц с двойным ядром, NVIDIA 7950GT.<br /><br />Я также воспроизводить стереоскопическое 3D (s3d) с помощью затвора очки: Я использую eDimensional 3D очки.<br /><br />Они работают с D3, Q4 и несколько других игр. Но зачастую они не работают с любым из этих двигателей открытым исходным кодом.<br /><br />Я обнаружил, что они не работают с Берсерк Q2, в s3d режиме я хотел бы получить большой черный сбои появляется все на экране. Хотя я не думаю, я бы иметь большие надежды, я спрашивает, если бы я могла это исправить. Мне не нравятся мои шансы, но на всякий случай я решил экспериментировать с кодом.<br /><br />И удача, я нашел координаты.<br /><br />Изменения, сделанные в:<br />void R_RenderView (refdef_t *fd, bool mirror)<br /><br />Я иду вниз на следующий фрагмент кода и изменять его, как отмечено:<br /><br />... код здесь ...<br /><br />И немного дальше вниз, аналогичное изменение:<br /><br />... код здесь ...<br /><br />И все это является изменением два испытания, в результате чего один всегда верно, а другой всегда ложно. Это, как представляется, не имеют повлияли на частоту кадров и волшебным образом получает избавиться от черно сбои в стереоскопический режим.<br /><br />Я понимаю, этот сбой лишь свою очередь, для очень небольшого числа пользователей, поскольку не так много людей играть в игры, используя стереоскопические очки. Я просто подумала, я бы об этом. Возможно cvar может быть использован для желанию изменять эти испытания для таких стереоскопическое игроков.<br /><br />Во всяком случае, просто подумала, я бы об этом. Опять же, большую игру. Я думаю о попытке поставить вашу видеообработки в Quake 3 Арена, я не знаю, как трудно, что будет.
KRIGSSVIN
930 постов
Карма: 53
#2 23 ноября 2008 в 09:59
I&#39;m thinking of trying to put your renderer into Quake 3 Arena, I don&#39;t know how difficult that would be.
<br />Ha-ha-ha, Berserker is already coding per-pixel lighting into Q3Bers.&nbsp; ;D
Берсеркер
2318 постов
Карма: 216
#3 23 ноября 2008 в 12:40
mkultra333<br />Thanks&nbsp; ;) I will try your code-changes...<br />For enable your code-path for stereo glasses, I&#39;ll to create new cvar:&nbsp; r_stereo_glasses&nbsp; (good cvar name?)
Машина несла меня через неведомые районы Галактики сквозь пространство математической реальности быстрее скорости света. (C) Фред Саберхаген.
mkultra333
4 постов
Карма: 0
#4 23 ноября 2008 в 13:17
For enable your code-path for stereo glasses, I&#39;ll to create new cvar:&nbsp; r_stereo_glasses&nbsp; (good cvar name?)<br /><br />Sounds good.&nbsp; I don&#39;t know that it will be a fix for all s3d users, might just affect my particular video drivers since I have an old system.&nbsp; But it would certainly be handy in my case.<br /><br />Nvidia stopped support for stereo glasses, and now you have to have a polarized Zalman computer monitor instead.&nbsp; Which is why I&#39;m using an older system.<br /><br />So you are working on a Berserk Quake 3? Excellent.<br />____________________________________________________________________<br /><br />Звучит хорошо. Я не знаю, что она будет установить для всех пользователей s3d, может только влиять на мои частности, видео-драйверов, поскольку я уже старая система. Но это, разумеется, будет удобно в моем случае.<br /><br />Nvidia прекратила поддержку стерео очки, и теперь вы должны иметь поляризованный Залман монитор компьютера вместо. Вот почему я использую старую систему.<br /><br />Так вы работаете на Berserk Quake 3? Отлично.
willow
570 постов
Карма: 56
#5 23 ноября 2008 в 21:58
dear mkultra333<br />We are proficient enough to understand the plane English. Thank you a lot for testing the Google translator, seems it works fine ;). I do still wonder are you really installed the russian codepage for your OS? I tried to install the chinese chat once under chinese guy&#39;s instructions who barely speak English and that was a real mess i tell you ;D. Never mind, feel yourself at home.<br /><br />Берсеркер<br />r_stereo_glasses is not the correct name for a subject. Better think on r_stereo_fix instead. It&#39;s a descriptive name for such kind of hack so let it sounds alike.
mkultra333
4 постов
Карма: 0
#6 24 ноября 2008 в 02:40
Ha, ok, I&#39;ll skip Google translate from now on.&nbsp; I just noticed that the rest of the forum is entirely Russian so I thought it would be rude to just post English. <br /><br />r_stereo_fix is probably better.&nbsp; There&#39;s another glitch I&#39;m trying to find at the moment.&nbsp; Since you can&#39;t use the normal crosshairs in shooters (it looks like there are two of them when you wear the glasses) the nvidia stereo drivers generate one.&nbsp; For some reason it is coming up as a solid white square instead of a circle with transparency.&nbsp; Oddly it becomes correctly transparent whenever text is written to the top of the screen. <br /><br />I&#39;ve traced the problem to <br /><br />void SCR_ExecuteLayoutString (char *s, bool is_hud)<br /><br />In that function, I remove the <br /><br />if (!strcmp(token, &quot;pic&quot;)<br /><br />and the same for the &quot;client&quot; and &quot;pici&quot; comparisons.&nbsp; So it doesn&#39;t draw the player model in the hud anymore.&nbsp; Then the nvidia crosshairs work again.&nbsp; Maybe it is some OpenGL state change or such that is set up when the model gets draw that is left hanging by the time the automatic nvidia crosshairs get drawn by the video drivers, I don&#39;t know.&nbsp; <br /><br />I&#39;ll try to isolate it more.&nbsp; I just played through Q2 for the first time, and without any crosshairs.&nbsp; That game was so much fun!<br />
<br />I do still wonder are you really installed the russian codepage for your OS? I tried to install the chinese chat once under chinese guy&#39;s instructions who barely speak English and that was a real mess i tell you
<br /><br />Seems I have Russian characters on my old internet computer.&nbsp; My other gaming computer is not online, and doesn&#39;t seem to have russian characters since the code for Berserker Q2 comes up with scrambled characters instead of russian code comments.&nbsp; :) <br />
Берсеркер
2318 постов
Карма: 216
#7 24 ноября 2008 в 04:48
mkultra333<br />After New Year holidays I&#39;ll write stereo glasses support. I need to contact you for my code changes test on your stereo glasses. Tell me your ICQ.
Машина несла меня через неведомые районы Галактики сквозь пространство математической реальности быстрее скорости света. (C) Фред Саберхаген.
mkultra333
4 постов
Карма: 0
#8 24 ноября 2008 в 05:20
I don&#39;t have an ICQ account but I&#39;ll set one up and get back to you.<br /><br />Since you are going to the effort, I should tell you a bit about the state of s3d at the moment.&nbsp; Nvidia discontinued shutterglass support for the cards beyond the 7xxx series and changed over to support for Zalman polarized monitors.&nbsp; I think ATI has done the same, as well as for some other brands.&nbsp; It is all a bit of a mess.<br /><br />And worst of all, currently these new methods don&#39;t support stereoscopic for OpenGL, only DirectX.&nbsp; <br /><br />So it probably isn&#39;t worth too much of your time, since you&#39;ll only be helping people using the older methods and using older nVidia cards.&nbsp; But if it only takes a few tiny changes it would ok.&nbsp; I&#39;ll try and find the parts causing problems so you don&#39;t have to do much.&nbsp; I just need to find the crosshair glitch now.
Берсеркер
2318 постов
Карма: 216
#9 24 ноября 2008 в 05:31
I just need to find the crosshair glitch now
<br />I don&#39;t think that is difficult. Just try to set&nbsp; some GL states before crosshair draw.&nbsp; :)<br />For source synchronization tell me about your code changes.
Машина несла меня через неведомые районы Галактики сквозь пространство математической реальности быстрее скорости света. (C) Фред Саберхаген.
mkultra
9 постов
Карма: 2
#10 01 декабря 2008 в 03:25
For some reason I can&#39;t log in as mkultra333, it won&#39;t accept my passwords and claims not to recognize my email either so I can&#39;t get a replacement.&nbsp; So I&#39;m back as mkultra.&nbsp; Or I&#39;m an imposter. ;)<br /><br />Either way... I tried to find the crosshair error but the 3D hud paths lead back into RenderView so I wouldn&#39;t know where to start.&nbsp; I don&#39;t want to just start putting random state changes into RenderView in case it causes problems elsewhere.<br /><br />But there is an easy enough solution.&nbsp; I just set scr_3dhud 0 and then the crosshair is fine.<br /><br />What I&#39;ll do is give you a txt file to maybe be included with Berzerker Q2, README_stereoscopic.txt, that tells players what they need to change to get it working in s3d mode. (There are a couple of other things that need to be changed, like setting r_distort 0)