Jump to content
The Dark Mod Forums

Cube maps howto?


Bikerdude

Recommended Posts

I 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.

Link to comment
Share on other sites

Yeah, I looked into that a few weeks ago, because I noticed when making some new windows that the envshot we use for glass is incorrect--the images don't line up properly. But I couldn't get very far in the wiki about how to properly set them up either.

Link to comment
Share on other sites

I think the complication with that TDM wiki entry might have something to do with how texgen reflect works, since the example is a pseudo-reflective pool of water. In the example image of TDM's output, _pz appears to be the ceiling, which makes sense ('positive z-axis').

 

I recently ended up altering water01 for my w.i.p. to make it look right as a reflection of skybox_darkland_ne. (The 'reflected' moon was opposite the one in the sky in X and Y as well as Z, though if you open water_01_pz.tga and darkland_NE_up.tga in an image editor they don't look flipped relative to each other.) What I had to do was along the lines of the instructions like 'Flip it horizontally and rotate it 90° counter clock wise'.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

I'll fix this after I finish with 2.03, if someone wants to open a tracker issue and assign it to me. It can't be too hard. The functionality works -- I used it for that dynamic moonlight skybox last year -- it's just that the images need renaming and possibly flipping and rotating. It's ringing a bell, I think I had a written page at some point of the list of transformations for TDM and Terragen. I probably lost that but I can do it again.

Link to comment
Share on other sites

I'll fix this after I finish with 2.03, if someone wants to open a tracker issue and assign it to me. It can't be too hard. The functionality works -- I used it for that dynamic moonlight skybox last year -- it's just that the images need renaming and possibly flipping and rotating. It's ringing a bell, I think I had a written page at some point of the list of transformations for TDM and Terragen. I probably lost that but I can do it again.

Is it also possible to increase the resolution possible with the cube maps as well? Or is that a whole other ball of wax?

Link to comment
Share on other sites

I'll fix this after I finish with 2.03, if someone wants to open a tracker issue and assign it to me. It can't be too hard.

I will do this.

Is it also possible to increase the resolution possible with the cube maps as well? Or is that a whole other ball of wax?

Well for a laugh I was able to take EnvShots @ 2048*2048, but wasn't able to test what they may have looked like in-game.

Link to comment
Share on other sites

Is it also possible to increase the resolution possible with the cube maps as well? Or is that a whole other ball of wax?

I'd be talking out of my hat if I said I knew it'd be straightforward because I haven't checked it out, but hopefully yes :)

 

@Biker: thanks

Link to comment
Share on other sites

  • 3 weeks later...

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.

 

I've fixed this in svn and committed a new engine so svn users can now use envshot without having to rename, rotate, or flip anything. The generated images can be used immediately. It'll be in 2.04 but for anyone else who wants to use the fix in the meantime, I'll link a version of the 2.03 engine including the envshot fix in this thread as soon as 2.03 is out.

 

You have to have 640x480 game screen resolution to make proper cubemap that lines up (at least in original Doom 3). Any other resolution would result in broken cubemap.

 

Correct, any other screensize will screw it up. I've opened a separate tracker for that because it's caused by a wider issue.

 

Is it also possible to increase the resolution possible with the cube maps as well? Or is that a whole other ball of wax?

 

Yes, it turns out this already worked. You need to be using 640x480 when you take your envshot, but you can make it as big as you like. I generated a 4096x4096 envshot using my tiny 640x480 window, and it was perfect -- beautifully detailed. You specify the size as a 3rd parameter after the image name, e.g:

 

envshot imagename 1024

 

Last note: skybox is not compatible with envshot, so it's good only for indoor scenes.

 

Do people think that that needs fixing? The skybox is controlled by game code not the engine, so enabling skyboxes in envshots would mean moving the facility from the engine to game code. Not a massive job, but I don't know whether it's needed or not.

Link to comment
Share on other sites

 

I've fixed this in svn and committed a new engine so svn users can now use envshot without having to rename, rotate, or flip anything. The generated images can be used immediately. It'll be in 2.04 but for anyone else who wants to use the fix in the meantime, I'll link a version of the 2.03 engine including the envshot fix in this thread as soon as 2.03 is out.

 

 

Correct, any other screensize will screw it up. I've opened a separate tracker for that because it's caused by a wider issue.

 

 

Yes, it turns out this already worked. You need to be using 640x480 when you take your envshot, but you can make it as big as you like. I generated a 4096x4096 envshot using my tiny 640x480 window, and it was perfect -- beautifully detailed. You specify the size as a 3rd parameter after the image name, e.g:

 

envshot imagename 1024

 

Last note: skybox is not compatible with envshot, so it's good only for indoor scenes.

 

Do people think that that needs fixing? The skybox is controlled by game code not the engine, so enabling skyboxes in envshots would mean moving the facility from the engine to game code. Not a massive job, but I don't know whether it's needed or not.

 

Well damn that's quite interesting.. I should give that a try next time I need a cube map.

 

In terms of the skybox thing that would be very handy to have it working in the envshots because when I did the cubemap for the accountant 1 it was a nightmare to try and photoshop the sky into the shot so that it fit across all images properly.

 

After that it sort of turned me off using them because I usually want to place them inside reflecting the outside world (looks great through a tinted window and doesn't kill the fps)

Link to comment
Share on other sites

 

In terms of the skybox thing that would be very handy to have it working in the envshots because when I did the cubemap for the accountant 1 it was a nightmare to try and photoshop the sky into the shot so that it fit across all images properly.

 

After that it sort of turned me off using them because I usually want to place them inside reflecting the outside world (looks great through a tinted window and doesn't kill the fps)

 

Ok, I'll see what I can do. New tracker for skybox in envshots #4085

Link to comment
Share on other sites

Do people think that that needs fixing? The skybox is controlled by game code not the engine, so enabling skyboxes in envshots would mean moving the facility from the engine to game code. Not a massive job, but I don't know whether it's needed or not.

Yes please, as several FM's would have benefited from being able to have 'fake outside and inside' textures for simulating a transparent window without the perf penalty.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...