Jump to content


Photo

Making cube-maps


  • Please log in to reply
16 replies to this topic

#1 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36638 posts

Posted 07 April 2013 - 02:57 PM

One of the missing assets we have to replace is a tiny 64x64 cubemap of D3 hallways. I think it's just used in some of our reflective textures to simulate reflecting a generic indoor environment.

Obviously, since it's using D3 environments and no one noticed, the replacement doesn't have to be very complex, but I don't really remember how to take cubemap shots. Does anyone have one they've already made for water reflections in their map I could use? Or is there someone who could volunteer to make one?

Here's one part of the existing one, blown up:

Attached Files

  • Attached File  gen2.jpg   3.77KB   17 downloads

  • Veldinela likes this

#2 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8178 posts

Posted 07 April 2013 - 03:23 PM

Here's the wiki:

http://wiki.thedarkm...title=Cube_maps

Just stand around in a typical TDM environment and invoke

envshot <name> 256

(I think sizes over 256 are distorted but that might be fixed in the 1.3.1 patch ?)

I can make one possibly by next weekend... I think...
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#3 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19021 posts

Posted 07 April 2013 - 03:59 PM

I can make one possibly by next weekend... I think...

I have a bunch of work to do on nhat... so feel free to do the cube map for springs if he dosent get around to doing it himself.

#4 demagogue

demagogue

    Mod hero

  • Active Developer
  • PipPipPipPipPip
  • 5255 posts

Posted 07 April 2013 - 04:25 PM

I actually remember noticing those lights in reflections and finding them annoying & hoping they'd get taken out.
And now they are.
Posted Image

#5 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8178 posts

Posted 07 April 2013 - 04:52 PM

Ideally, the cubemaps used in reflections would be based on location. So you would not have one universal cubemap
but instead many set-up per location. This is what HL2 does. The problem there is that a cubemap is also static, meaning
if the lighting in a room changes the cubemap wont reflect that change. Still... having multiple cubemaps would look
better than only one.

As for the cubemap in this topic, I think it is also used as a source for the ambient light textures. It may be best to have a close
approximate handy so that the whole brightness calibration is not thrown-off by the new version.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#6 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36638 posts

Posted 07 April 2013 - 05:13 PM

How would it relate to ambient light?

#7 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8178 posts

Posted 07 April 2013 - 05:43 PM

The shading of the normal maps comes from a cubemap:



// TDM Ambient Method Related
{
if (global5 == 1)
blend add
map textures/darkmod/yourname // Diffuse
scale 1, 1
red global2
green global3
blue global4
}
{
if (global5 == 2)
blend add
program ambientEnvironment.vfp
vertexParm 0 1, 1, 1, 1 // UV Scales for Diffuse and Bump
vertexParm 1 1, 1, 1, 1 // (X,Y) UV Scale for specular
vertexParm 2 global2, global3, global4, 1

fragmentMap 0 cubeMap env/gen1
fragmentMap 1 textures/darkmod/yourname_local // Bump
fragmentMap 2 textures/darkmod/yourname // Diffuse
fragmentMap 3 textures/darkmod/yourname_s // Specular


That said, it looks like I'm wrong unless env/gen2 is derivative of gen1... :blush:
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#8 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8178 posts

Posted 08 April 2013 - 09:00 PM

I'm gonna need to install an older TDM build to get this to work.

envshot is broken in TheDarkMod.exe

See tracker 3368
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#9 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36638 posts

Posted 08 April 2013 - 09:14 PM

The shading of the normal maps comes from a cubemap:


Not anymore. The "2" option has been removed as of 1.08, I believe.

#10 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8178 posts

Posted 10 April 2013 - 09:31 PM

TDM 1.06 the envshot command works like a charm.

I captured the images, brightened them, desaturated them and blurred them

These should be reasonably generic reflections.

https://dl.dropboxus.../env_images.zip


https://dl.dropboxusercontent.com/u/17706561/env_images.zip


I will work on material defs tomorrow.
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#11 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36638 posts

Posted 10 April 2013 - 09:36 PM

Great, thanks! :)

#12 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8178 posts

Posted 11 April 2013 - 09:27 PM

I couldn't find the base material for env/gen2 in pak000.pk4 ?

It looks like you'd just need to rename these files from test_nx.tga to gen2_nx.tga .

The only materials that reference these files are located in glass.mtr and sfx.mtr.

I made a combined material and replaced env/gen2 in the shaders with env/genTDM

Just rename all the images from text_nx.tga to genTDM.tga (etc) then this should be clear of
any copyright issue with Doom 3 as I imagine. Or if the glass and sfx materials have already been
altered then just rename to gen2 as above and forget about this material.

Attached Files


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#13 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36638 posts

Posted 12 April 2013 - 05:25 PM

Thanks, all working!

#14 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8178 posts

Posted 11 June 2013 - 12:06 PM

Tested envshot in TDM 2.0 and it's working. Thanks Taaaki! :)

Edited by nbohr1more, 11 June 2013 - 12:07 PM.

  • RPGista likes this
Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#15 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19021 posts

Posted 03 March 2014 - 12:42 PM

One of the missing assets we have to replace is a tiny 64x64 cubemap of D3 hallways. I think it's just used in some of our reflective textures to simulate reflecting a generic indoor environment.

Did you get around to doing this springs..?

#16 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36638 posts

Posted 03 March 2014 - 01:14 PM

Everything was replaced, but I don't remember if I did it or someone else did.

#17 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 19021 posts

Posted 03 March 2014 - 02:51 PM

Grand.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users