Jump to content
The Dark Mod Forums

How to create a light projection texture: HowTo Video


Bikerdude

Recommended Posts

You don't have to struggle like that, at least in Gimp there are two options for simplifying colors: Threshold and Posterize. You can use either of them to have black and white image, and then you can blur it a bit, for projection. And it will take you like 2 minutes instead of 12.

Link to comment
Share on other sites

You probably don't even need to use threshold or polarize; you can just increase the contrast to make the darks black and the brights white. It also has the benefit of maintaining imperfections in the shape of the wood that you lose when you manually paint over everything. That and adding a blur, as Judith said, will look good and be easier for the average user.

  • Like 2
Link to comment
Share on other sites

Thanks for the video Bikerdude making light textures is something that i don't think anyone made a video before but i could be wrong.

 

IMO there's no reason to always use high resolution projection textures, if you use a 256x256 projection texture it will give the projection a softer look almost simulating penumbra (blurry) shadows if you use a high resolution one the projection will be stronger and sharper but that could be the effect you want.

About jpgs, I don't know about TDM engine but i add fhDoom crash on me more than one time because i add a .jpg texture as a ingame texture, why i don't know. Also jpg is a lossy format, it removes quality from the original tga ( if the original texture is a good quality to start with) so if you want to retain high quality, tga is the best format, jpg also creates blocky artifacts that can specially be bad for normal maps. If you make a jpg from .dds like you did, you are removing even more quality .DDS (Direct Draw Surface) textures, specially dxt1 compression is a highly compressed and lossy format. But personally i don't recommend jpgs for game textures for a very important reason, jpg doesn't support mipmapping (texture LOD) so is not optimized for GPU rendering and games.

Edited by HMart
  • Like 1
Link to comment
Share on other sites

Apart from the gimp techniques, the crucial part for me was the how-to explaining the process of making it work in game and in DR, thats always the hardest part for beginners, thanks for that.

Link to comment
Share on other sites

You probably don't even need to use threshold or polarize; you can just increase the contrast to make the darks black and the brights white. It also has the benefit of maintaining imperfections in the shape of the wood that you lose when you manually paint over everything. That and adding a blur, as Judith said, will look good and be easier for the average user.

I might also add, that in this case, applying Otsu's binormal threshold on image would make a good premise for mask to cull non projected parts of image.

But generally, the best action would be preservation of source image file (.psd/.xcf/whatever) alongside with all layers because diffuse texture could have all possible window frame colors.

 

Edited by Boiler's_hiss
  • Like 1
Link to comment
Share on other sites

So got a PM from JoeBarnin in relation to his current beta for some help looking for a window protection texture, so rather than just do the work I thought I would make a little howto vid -

 

https://www.youtube.com/watch?v=UVest1d3jcg&feature=youtu.be

 

Thank you! This makes perfect sense.

 

Just thought I'd mention, there's one issue with the video. Around 8:47, you start doing work with the .mtr file - this all happens off screen (maybe a dual monitor issue?). I can't see exactly what you did, but I can figure it out based on the .mtr file you sent (and your audio commentary). Looks like you searched lights.mtr for an existing window light texture, eg:

 

lights/mansion01_window01
{
description "projection for mansion01 window01"
{
forceHighQuality
map lights/mansion01_window02
colored
zeroClamp
}
}
Copied this, and then modified it to match the new .tga file name:
lights/diamond_pattern01
{
description "projection for diamond_pattern01"
{
forceHighQuality
map lights/diamond_pattern01
colored
zeroClamp
}
}
Save this in a separate file in the materials folder.
Thanks again.
Link to comment
Share on other sites

You probably don't even need to use threshold or polarize; you can just increase the contrast to make the darks black and the brights white.

That was my first thought, and it does apply to alot of the windows textures. But the issue there was the parts if the glass texture got too dark too, as show in the video. I have fond that just grabbing the windows texture you want, removing the saturation to grayscale the image and then painting over the frame gave me the benefits of the textured glass and defined frame.

Link to comment
Share on other sites

About jpgs, I don't know about TDM engine but i add fhDoom crash on me more than one time because i add a .jpg texture as a ingame texture, why i don't know. Also jpg is a lossy format, it removes quality from the original tga ( if the original texture is a good quality to start with) so if you want to retain high quality, tga is the best format, jpg also creates blocky artifacts that can specially be bad for normal maps. If you make a jpg from .dds like you did, you are removing even more quality .DDS (Direct Draw Surface) textures, specially dxt1 compression is a highly compressed and lossy format. But personally i don't recommend jpgs for game textures for a very important reason, jpg doesn't support mipmapping (texture LOD) so is not optimized for GPU rendering and games.

 

Yup, definitely jpegs shouldn't be used as they cause a lot of problems due to their compression format. You should use either uncompressed .tga or .dds with proper compression mode. And you should always keep original files in your app native format, like .xcf for Gimp, so you can return to it later. If you save your file as .dds and then make changes to it, and save it as .dds again, you'll be stacking compression and lose detail with every such change.

 

Also using levels to get the texture output to pure white or something close to it is better, because then you can control it with light intensity in DarkRadiant. If you leave your white level at e.g. 128 and setting the light to RGB 256 will still be too dark, you'll have to make changes in the image again. At least maintaining some workflow consistency here will help you with more predictable lighting settings.

Link to comment
Share on other sites

There is no point in using separate jpegs for editor preview, it'a waste of time since Dark Radiant needs only a few seconds to load diffuse textures used for the same purpose. Even with 2048 textures it just takes a moment, and the editor handles them well during mapping, no slowdown or anything like that.

Link to comment
Share on other sites

One place it's useful is when the diffuse has color stages that change the way the texture looks in-game.

Link to comment
Share on other sites

There is no point in using separate jpegs for editor preview, it'a waste of time since Dark Radiant needs only a few seconds to load diffuse textures

But when you have a lot of textures those seconds all add up, to slower opening times when mappers are working on thier maps. I would be curious to see a .JPG versus .TGA use-case comparison though in relation to _ed files..

Link to comment
Share on other sites

They really don't, speaking from experience, 2k textures for everything. And they're not slowing down the editor as it uses quite aggressive mipmapping. +2 seconds to loading time is nothing in comparison to time and space wasted for separate preview textures.

Edited by Judith
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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...