View Issue Details

IDProjectCategoryView StatusLast Update
0004041The Dark ModCodingpublic20.08.2016 11:20
Reporteruser81Assigned ToSteveL  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
PlatformWin32OSWindowsOS Version7 sp1
Product VersionTDM 2.02 
Target VersionTDM 2.04Fixed in VersionTDM 2.04 
Summary0004041: Cubemap/EnvShot function broken:
DescriptionI have had a look but am having trouble following the wiki article - http://wiki.thedarkmod.com/index.php?title=Cube_maps and the article on the waybackmachine

The issue is getting the images in the correct orientation, for example the WBM says the foreward image is basename_pz, but you look at the envshot image and its clearly not the forward facing image.

What I am looking to do is place the player directly outside a window and then take an EnvShot, it would be great is if darkmod.exe took envshot in the correct orientation so the mapper dosent have to muck about trying to get them facing the right way, rotate or flip them.

There dosent even seem to be any tools out there what will import your images to give me a preview, as I am convinced that TDM isnt taking EnvShots correctly.
Steps To ReproduceIn-game bring down the console and type envshot <name of loction, eg garden> <size of image shots , eg 1024>

Then browse to \\darkmod\env\ and you find the 6 images.
TagsNo tags attached.

Relationships

related to 0004084 new Rendercrop -> viewport isn't right 
related to 0004085 resolvedduzenko Figure out a way to make envshot capture the skybox 
related to 0003881 resolvednbohr1more Create a new Light type "cubicLight" 

Activities

SteveL

SteveL

08.02.2015 04:15

reporter   ~0007412

The info given by Angua in the wiki article [ http://wiki.thedarkmod.com/index.php?title=Cube_maps ] is correct. Envshot only works right if you have your screen set to 640x480. It's not enough to be using 3/4 aspect ratio: any bigger screen size results in the partial images that don't fit together.

If you're using 640x480, the flips/rotations that she lists are correct.

One thing that does work well is the system of tiling to produce high-res images. I took a cubemap at 4096x4096 resolution from my little 640x480 window, and the images are perfect. At that high res, you can see the scene being rendered in 100s of passes tile by tile in the 640x480 window.

The skybox isn't rendered right at any resolution. The images are flipped and rotated, but the skybox is the same way up and facing the same way in all of them.
SteveL

SteveL

08.02.2015 05:11

reporter   ~0007413

Last edited: 08.02.2015 05:12

View 2 revisions

The skybox is messed up because it doesn't get drawn at all during the envshot. It appeared in my pics because I was using PortalSky, which uses the last _currentRender capture as a texture, and I had no water or anything else using _currentRender in my scene, so the skybox was left in there from the last normal frame that got drawn. Adding a bit of water to tyhe map messes it up nicely.

So envshot is not compatible with portalSky either. I expect caulk sky would just come out black.

SteveL

SteveL

08.02.2015 06:52

reporter   ~0007414

The view axes hard-coded in R_EnvShot_f were incorrect, which is why some images were coming out backwards or rotated. I've fixed them, and also changed the names so that the images can be used right away with no amendments.

Envshot still requires you to be using 640x480 resolution when making cubemaps. But you can make them as high-quality as you like by specifying the size parameter.

The reason you have to use 640x480 is a separate problem that also affects the skybox when the player is underwater and not using a 4x3 aspect ratio. I'll open a separate tracker for that.
SteveL

SteveL

08.02.2015 07:09

reporter   ~0007415

Last edited: 08.02.2015 07:09

View 2 revisions

Committed at rev 6471

/trunk/renderer/RenderSystem_init.cpp

SteveL

SteveL

08.02.2015 09:00

reporter   ~0007416

Asked in the forum if we need to fix skybox in envshots. It would mean moving or somehow linking in the envshot implementation with game code so that it can use the logic in idPlayerView to draw the skybox correctly. The engine doesn't know anything about skyportals that mopve with the player's eyes, for example. That'll be a separate tracker if it's needed.
nbohr1more

nbohr1more

20.08.2016 06:49

developer   ~0008276

Added envshotGL at rev 6613.

Restores the old functionality for cubicLight setup or other ARB\GL shaders that use traditional OpenGL cubemap orientations.

user81

20.08.2016 11:20

  ~0008278

Thanks for sorting this one one fella!

Issue History

Date Modified Username Field Change
17.01.2015 11:28 user81 New Issue
17.01.2015 15:09 SteveL Assigned To => SteveL
17.01.2015 15:09 SteveL Status new => assigned
08.02.2015 04:15 SteveL Note Added: 0007412
08.02.2015 05:11 SteveL Note Added: 0007413
08.02.2015 05:12 SteveL Note Edited: 0007413 View Revisions
08.02.2015 06:52 SteveL Note Added: 0007414
08.02.2015 07:09 SteveL Note Added: 0007415
08.02.2015 07:09 SteveL Note Edited: 0007415 View Revisions
08.02.2015 07:18 SteveL Relationship added related to 0004084
08.02.2015 09:00 SteveL Note Added: 0007416
08.02.2015 09:00 SteveL Status assigned => resolved
08.02.2015 09:00 SteveL Fixed in Version => TDM 2.04
08.02.2015 09:00 SteveL Resolution open => fixed
08.02.2015 09:00 SteveL Target Version => TDM 2.04
08.02.2015 09:10 SteveL Relationship added related to 0004085
09.08.2016 03:00 nbohr1more Relationship added related to 0003881
20.08.2016 06:49 nbohr1more Note Added: 0008276
20.08.2016 11:20 user81 Note Added: 0008278