🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Anyone here who is really familiar with id software's Id Tech 3 engine?

Started by
2 comments, last by Hermetix 6 years, 4 months ago

I am modding this game (Return To Castle Wolfenstein), particularly by adding another renderer to it (Direct3D 11). I'm doing this to gain experience in large scale game development. So far I was able to replace all the setup code, the shader parser, texture loading etc, but I am only able to render part of the main menu and the models, without the map geometry.  What I would like to know is where in the code is the camera orientation matrix?

To render the models I set the world matrix to:

SetWorldMatrix(backEnd.or.modelMatrix); inside RB_RenderDrawSurfList()

Which works fine in game but in the main menu things are off.

I know though that backEnd.viewParms.world.viewOrigin represents the camera's eye position. 

I'm including screenshots of the menu and of in-game cinematic.

Thanks.

 

WolfSP 2018-01-09 02-22-48-60.png

WolfSP 2018-01-09 02-22-19-43.png

Advertisement

AFAIK the view matrix and projection matrix are constructed in tr_main.c (R_RotateForViewer and R_SetupProjection). If I'm not mistaken the actual matrix used during world rendering was just backEnd.viewParms.world.modelMatrix. I haven't looked at the code in a long while though... if I remember more I'll come back and post an update.

On 2/23/2018 at 7:09 PM, Styves said:

AFAIK the view matrix and projection matrix are constructed in tr_main.c (R_RotateForViewer and R_SetupProjection). If I'm not mistaken the actual matrix used during world rendering was just backEnd.viewParms.world.modelMatrix. I haven't looked at the code in a long while though... if I remember more I'll come back and post an update.

Thanks tr.viewParms.world.modelMatrix was the one! The backEnd.viewParms.world.modelMatrix didn't work properly.

This topic is closed to new replies.

Advertisement