Shadowmaps being weird with 3D weapon models

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Shadowmaps being weird with 3D weapon models

Re: Shadowmaps being weird with 3D weapon models

by dpJudas » Sun Nov 05, 2017 11:06 am

No, it clears the zbuffer before drawing it.

Before my fix it was drawing the weapon with coordinates in view space (eye's perspective) with the camera pointing straight ahead at (0,0,0). Now it is drawing it in world space with the camera positioned correctly in the world. Visually you can't tell the difference, but it meant that pixelpos wasn't getting the proper values it needed to project into light shadowmap space.

Re: Shadowmaps being weird with 3D weapon models

by Nash » Sun Nov 05, 2017 10:57 am

Quick question (not being able to check myself at the moment): by "positioning it in the world", does that mean the HUD weapon model will clip into level geometry (as seen in almost every amateur Unreal Engine 4 game)?

Re: Shadowmaps being weird with 3D weapon models

by Graf Zahl » Sun Nov 05, 2017 9:04 am

Good to see that this positioning hack is gone. I never liked how this was implemented because it was nearly inevitable that it'd cause problems down the line.

Re: Shadowmaps being weird with 3D weapon models

by dpJudas » Sun Nov 05, 2017 8:41 am

Thank you, glad you like the shadowmaps. :)

I managed to fix it, but it meant I had to repair some old code first. It should be working in the next nightly build.

Re: Shadowmaps being weird with 3D weapon models

by skornedemon » Sun Nov 05, 2017 7:26 am

dpJudas wrote:Ah, crap. Because the weapon sprite isn't drawn in its true world position the shadowmap lookup fails. :(
I take it that isn't exactly easy to correct? That's really too bad, gzdoom is pretty gorgeous right now. Once shadowmaps came out I began
to make one of the best looking mods out there, and I was looking forward to it. Besides this, bump mapping on 3d models(yes I'm aware
dynamic lights only would affect it) and shadowmaps only being used on one-sided linedefs I really cant complain at all for this port now.

Hope something can be done!

Re: Shadowmaps being weird with 3D weapon models

by dpJudas » Sun Nov 05, 2017 6:37 am

Ah, crap. Because the weapon sprite isn't drawn in its true world position the shadowmap lookup fails. :(

Shadowmaps being weird with 3D weapon models

by skornedemon » Sun Nov 05, 2017 1:22 am

See Topic name. The Shadowmap hitting the model has all sorts of lighting issues, like the game
doesn't know exactly where the model is originating maybe?

I have an example wad all set up along with screenshots.

https://cdn.discordapp.com/attachments/ ... nknown.png

https://www.mediafire.com/file/si0q9k7d ... ponBug.pk3



AlsoIReallyLoveShadowmapsSoIfYouCouldEnableThemOnTwoSidedLinedefsThat'dBeJustGre-

Top