Jump to content
The Dark Mod Forums

** headdesk ** Ok.... glass....


CorwinWeber

Recommended Posts

Ok.... I've been trying to do windows. Unfortunately, they all look like ass. The default 'glass' textures not only don't look much like glass, they look pretty bad overall. I've gone into a few of the Doom 3 levels to see how id does it.... but I'm not enlightened by this. Somehow they seem to have the ability to have a surface with no texture at all?!?!?!?!?!?

 

What am I missing here?

Link to comment
Share on other sites

Maybe they set the texture scale to something that brings the surface out?

If you can see how the D3 levels did it, then not sure why you can't just copy it by rote. But for that matter, you could just save D3 glass you like as a prefab and then import it into your FM and resize it to your needs.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Are you talking about the warp effect or reflections?

 

Neither.... I'm just talking about regular boring windows. Actually at the moment I'm working on a security checkpoint. The glass textures I can find in the editor are all horribly cloudy and look awful. I checked through a few levels (like mars city underground) and found what I was looking for in the map.... but, for example, the first security checkpoint that you run into when you leave the elevator. It's got a nice curved window with patches set up as the window frame.... (which I tried to do on my own and didn't do very well at it, but that's a matter of practice, I think....) and when you click on it there's no texture, or at least no way to figure out what texture they used. I tried making an alpha texture in gimp to use but that didn't turn out at all.... :S

 

I also looked at the comm center and that's got external windows that don't seem to have a brush in the window at all, just a 'location separator' block. I'm getting the feeling that there is no single consistent way to make transparent surfaces in this engine....

Link to comment
Share on other sites

I can assure you, glass is in and working fine - tho we could really use some alternative materials.

I'm going to assume a few things : first of all you have a test map, a box with some lights and a player spawn. I'm also going to assume you have JUST opened that map.

  • First of all, go to the material tab and click the "textures" folder to highlight it. Hold down shift and press your right arrow key (->)
  • Type in "glass" to search for it, press the down arrow to skip through matches. Note that the preview image has very little to do with what it will look like in game\
  • Apply it to a brush. Yes, a thin-ish brush.
  • Do this for a few brushes using different glass materials.
  • Save, dmap and open the map.

 

Note, some of the distorted glass effects will need you to scale the texture before they look good in game. Try avoiding super slick glass that looks like its straight from the year 2415, tin/lead float glass isnt exactly around "yet". Once you have experimented and found suitable glass, try doing it with a patch(s).

 

However "Serpentine, you're a terrible bastard and didn't tell me something actually useful", I hear you say!

 

If you happen to spot some nice glass in a map/fm for TDM or even doom3, you can do the following to find out what material it is using:

  • Open the map file in DR (if you don't know how to extract the maps from a pk4... use winrar or something, work it out)
  • Find the patch/brush, if it doesn't have a blue/black shader not found texture you can continue, if it does it might be using custom materials and you will have to load those.
  • Select a face that you know is glass (not all faces of a brush will be glass, the hidden parts will be no-draw) using shift+left click.
  • Once selected, hit "S" to bring up the surface inspector.
  • Holy shader inspecting Batman! right there in the "shader" textbox will be its name, if you click the folder icon it will show you its location in the materials tree.
  • (for added ease of use you can just copy the full name out of the shader textbox and swap over to your map, select the surfaces you want, hit "S" and paste it into the shader textbox)

 

Yes, its 4am and those instructions most likely don't make sense, deal with it ;/

Link to comment
Share on other sites

I can assure you, glass is in and working fine - tho we could really use some alternative materials.

I'm going to assume a few things : first of all you have a test map, a box with some lights and a player spawn. I'm also going to assume you have JUST opened that map.

  • First of all, go to the material tab and click the "textures" folder to highlight it. Hold down shift and press your right arrow key (->)
  • Type in "glass" to search for it, press the down arrow to skip through matches. Note that the preview image has very little to do with what it will look like in game\
  • Apply it to a brush. Yes, a thin-ish brush.
  • Do this for a few brushes using different glass materials.
  • Save, dmap and open the map.

 

Note, some of the distorted glass effects will need you to scale the texture before they look good in game. Try avoiding super slick glass that looks like its straight from the year 2415, tin/lead float glass isnt exactly around "yet". Once you have experimented and found suitable glass, try doing it with a patch(s).

 

However "Serpentine, you're a terrible bastard and didn't tell me something actually useful", I hear you say!

 

If you happen to spot some nice glass in a map/fm for TDM or even doom3, you can do the following to find out what material it is using:

  • Open the map file in DR (if you don't know how to extract the maps from a pk4... use winrar or something, work it out)
  • Find the patch/brush, if it doesn't have a blue/black shader not found texture you can continue, if it does it might be using custom materials and you will have to load those.
  • Select a face that you know is glass (not all faces of a brush will be glass, the hidden parts will be no-draw) using shift+left click.
  • Once selected, hit "S" to bring up the surface inspector.
  • Holy shader inspecting Batman! right there in the "shader" textbox will be its name, if you click the folder icon it will show you its location in the materials tree.
  • (for added ease of use you can just copy the full name out of the shader textbox and swap over to your map, select the surfaces you want, hit "S" and paste it into the shader textbox)

 

Yes, its 4am and those instructions most likely don't make sense, deal with it ;/

 

Actually I really do appreciate the effort. I did find out what texture the window I like is using, but when I use the exact same texture in my map.... well.... screenshots enclosed. First is the security checkpoint in mc_underground, second is in my map.

 

The basic problem is that when I use the glass textures, they come out looking like some medieval glazier took molten glass and poured it into a wooden mold and let it cool.... then used it as a window. Wavy, mostly opaque and just looks bad. This is the same texture as in the mc_underground map, so clearly id did something different.... something that I'm missing.

post-3745-127414775607_thumb.jpg

post-3745-127414777086_thumb.jpg

Link to comment
Share on other sites

There are different lighting over the window texture in these pics. That's why it looks ugly to you. Don't light the window that much, instead light the enviroment, but if there's ambient lighting you should be careful on it. Besides, the texture's scale seems wrong to me in second pic.

Link to comment
Share on other sites

We do have a glass testmap, I can upload it to bloodgate.com if you want to open it in the editor. It contains some test-window panes and crystals for a cave.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

There are different lighting over the window texture in these pics. That's why it looks ugly to you. Don't light the window that much, instead light the enviroment, but if there's ambient lighting you should be careful on it. Besides, the texture's scale seems wrong to me in second pic.

 

Ok, I'm not seeing any ambient lighting at all in the game map.... (now that I know what I'm looking for.... I only just found out about parallel lighting this afternoon.... :S) I've tinkered a bit, is it the color of the light? Type? I've tried with just ambient light, tried lighting it directly, small radius lights, big radius lights..... should I dim it by making it a darker color?

Link to comment
Share on other sites

Well I don't have the actual material definition you're using, but if it's based on the Doom 3 glass I suspect there will be a material stage (a block enclosed in "{" ... "}" symbols) which contains a line like "cubeMap texture/something/somethingelse". If you remove this entire { } block, the cubemap stage will not render.

Link to comment
Share on other sites

This was originally a lot prettier.... then I got frustrated and inventive and started experimenting.... found out about things like parallel lighting and chamfered corners since I started too... :S

 

Ok, I can't attach a map or zip file.... I'll message it....

 

** edit **

 

Ok, can't attach it, can't send it in a PM..... this could be an issue....

Edited by CorwinWeber
Link to comment
Share on other sites

Looking at those screenshots, at the actual visual differences, it's pretty apparent (in my experience, anyway) that it's the texture scaling that's the issue. The vertical scaling is stretched quite a bit out of proportion to the horizontal, and the whole thing generally is set to much too small a scale and it needs to be larger. I don't have DR in front of me, but can you find the option to set the texture scaling? You can play with the numbers, but you might also look at the scaling put on the D3 windows to get the look you like. You can't underestimate how big an impact changes in the scaling can completely transform the look of a texture, glass and water included.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

the glass in the mars_city1 map is either textures/glass/glass1 or textures/glass/glass2 on a onesided patch thats been converted to a func_static. the textures on the 1x1 patch has been fit at a scale of 1x1 then flipped horizontally and vertically.

 

while in the editor the texture will never look like a glass, and just look like the texture the editor texture its been asigned to, after dmap the texture in game will look totaly different.

Link to comment
Share on other sites

The material shader used is correct(glass_outside or whatever its called is the one used on the windows in mars underground) in your map, Corwin.

 

Are you loading the map from normal Doom3? I havent tried - but it did look a bit odd when I loaded it in TDM, I have a feeling the params might have been re-purposed.

Link to comment
Share on other sites

The material shader used is correct(glass_outside or whatever its called is the one used on the windows in mars underground) in your map, Corwin.

 

Are you loading the map from normal Doom3? I havent tried - but it did look a bit odd when I loaded it in TDM, I have a feeling the params might have been re-purposed.

 

Yes, I am. Just regular old doom3. The screenshots are both from in game.

 

Ok, if you lot are scratching your heads over this I don't feel quite so dumb about it. :)

 

** edit **

 

Ok, just tried commenting out the cubemap entry in the mtr file for that texture. No change. Yes it's outdoor_glass1, by the way. I've also tried rescaling it from 1x1.... also no change.

Edited by CorwinWeber
Link to comment
Share on other sites

Ah figured it out:

 

Select the window brush, right click on it in the ortho-view and select 'convert to func_static'

Add a new property named "_color" with the value "0.282353 0.305882 0.278431" - both name and value should not have quotes.

 

Save, dmap and test it out... should be what you expected :)

Link to comment
Share on other sites

Ah figured it out:

 

Select the window brush, right click on it in the ortho-view and select 'convert to func_static'

Add a new property named "_color" with the value "0.282353 0.305882 0.278431" - both name and value should not have quotes.

 

Save, dmap and test it out... should be what you expected :)

 

Ok, I'll try that, I also tried setting it to .05x.05 instead of 1x1 and got decent results..... lemme try your way as well.....

 

** edit **

 

Ok, no go. It won't change from worldspawn. I've run into this before. I go into the entity page and try to change classname from worldspawn to func_static and it just doesn't do anything at all.

Edited by CorwinWeber
Link to comment
Share on other sites

  • Select the window brush
  • Right click on the brush in the ortho-view (the one with lines, not the 3d render)
  • Select "Convert to func_static"
  • Go to the entity tab now, it should no longer say worldspawn as the type.
  • In the two text fields under the one that lists attributes put :
  • "_color" in the top field
  • "0.282353 0.305882 0.278431" in the bottom one
  • Hit enter

 

If you follow that exactly, it will work. You don't manually try type in a different class - use the convert option as its much faster/easier.

  • Like 1
Link to comment
Share on other sites

  • Select the window brush
  • Right click on the brush in the ortho-view (the one with lines, not the 3d render)
  • Select "Convert to func_static"
  • Go to the entity tab now, it should no longer say worldspawn as the type.
  • In the two text fields under the one that lists attributes put :
  • "_color" in the top field
  • "0.282353 0.305882 0.278431" in the bottom one
  • Hit enter

 

If you follow that exactly, it will work. You don't manually try type in a different class - use the convert option as its much faster/easier.

 

Ok, that worked! Thanks! :)

 

I'm curious as to where you got the numbers from.... although I suppose it's just a slight dark color from the color picker. Also, if I might.... since you've already loaded the level.... when you leave the start location, out the door and turn right..... do you get invisible walls?

Link to comment
Share on other sites

I got the numbers by looking at the glass entities in Mars Underground.

The darker the colour the more transparent the 'dirt' on the glass becomes, white will make it opaque - dark orange will give it a slight orange tint for example.

 

I cant really remember.

However since you're working on a Doom3 specific map its most likely a better idea to ask questions over on the doom3world forums :)

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

    • 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.
      · 4 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
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
    • OrbWeaver

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 2 replies
    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
×
×
  • Create New...