Cockpit Shadows

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.

Re: Cockpit Shadows

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Jul 24, 2020 11:33 pm

Ronin65 wrote:
Fri Jul 24, 2020 6:19 pm
... even with the global mat file, some craft still look like and to coin a phrase used by Forceflow, they look like polystyrene. Sorry I don't mean to be rude, but they do, you must have noticed it your self :)
LOL. Well, I don't feel it looks like polysterene, but that seems to be the general consensus and people even have opened bugs about that. So, in 1.1.4, the global mat file will have that effect toned down.

Only the X-Wing needs to have the z-axis flipped. I haven't noticed this effect on any other cockpits, so that's why I didn't include more mat files.
In future will you be providing more *.Mat files for other craft along with the Shadow OBJ files, you've included some OBJ files but no *.mat files it just seems a little counter productive if you don't included them for all craft, just thought there should be standard mat files for each opt :)
Yes, I'll provide MAT files for any OBJ files I create in the future. I think the real solution would be to include MAT files and Shadow Map files on the individual craft installers, but it'll be a while before we get there.

@Trevor: Technically, the way this works is by side-loading the Shadow Map OBJ, placing it on top of the current cockpit -- including the current camera position and view -- and then apply regular shadow mapping techniques (put the camera on every light source, compute a depth map, compare the shadow map with the z-buffer, apply a filter to remove hard edges). Incidentally, this is how I noticed that the 3D reconstruction was skewed, which led me to a detour that ultimately fixed the SteamVR reconstruction and made it 100% metric. Which is why it took so long to finish the cockpit shadows -- but now we have distortion-free VR.

The "wandering shadows" problem may be happening because the lights are probably not rotating around the same center as the cockpit camera... which makes no sense. So that's something I still need to check.

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Sat Jul 25, 2020 11:06 am

Right, and the Objs are needed because XWA does culling which you cannot control (when you move the camera to the light source)

Also, this is the very limitation from doing Full-Scene shadows?

But if the camera shifting could also shift the culling frustum then wouldn't that a) make objs obsolete and b) allow full-scene shadows (since that ISD above you would be back in the frustum of the shadowmap camera)

Trev

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Jul 30, 2020 5:26 pm

You are correct on all accounts Trevor: I need to side-load shadow map OBJs to work around the culling and clipping that the game applies. If we ever figure out how to move the in-game camera, then yes, this would make OBJs obsolete and enable full-scene shadow mapping.

UPDATE:

I've made a small tutorial on how to create cockpit shadow map OBJs here:

https://www.xwaupgrade.com/phpBB3/viewt ... =9&t=12908

Post Reply