Jump to content
The Dark Mod Forums

Troubles with transparent editor textures


Recommended Posts

As suggested by Obsttorte I've been trying to make the editor textures transparent myself. So I looked at the material file for most of them (tdm_internal_engine.mtr), and found a translucent one - overdrawtest.

 

translucent
{
 blend filter
 map  textures/common/overdraw.tga
}

 

I copied these definitions from there and pasted in all the others, and it worked, but not as I was hopping. I messed around with the blend modes and I couldn't get anything decent. I don't understand exactly what the blend modes do, so it's hard for me to find a balanced combination.

 

So I went looking for other textures that were already transparent. Rain_splashes don't have the translucent keyword, but they're still transparent. They have this:

 

   {  //needed to emit particles
  blend   filter
  map	  _white
  }

 

But this makes it too dark, in fact. And it turns out the keyword "translucent" seems to be irrelevant for the editor, I removed it from the others and they were still transparent.

 

RJFerret suggested Speakers, but it turns out their texture is only transparent when viewed in the speaker entity, not on brushes.

 

So, does anyone understand blend modes enough to suggest combinations that may give good results?

 

Some examples from the Hammer Editor. They can illustrate my goal. I'd like to get closer to that as I can.

Ex1, ex2, ex3, ex4, ex5

Edited by Skaruts

My FMs: By The Cookbook

Link to comment
Share on other sites

Blend add lightens whatever is behind it by the brightness of the texture.

 

Blend filter darkens whatever is behind it by the darkness of the texture (like dirt decals)

 

I've never had a good handle on what gl_dst color does.

Link to comment
Share on other sites

Add, Filter, Modulate and all those seem to be presets that combine two of those gl_ arguments. They are listed here (search for Stage Keywords), but they don't explain what these arguments mean beyond the self explanatory names. Obviously they are related to opengl, but...

 

...hmm!

Edited by Skaruts

My FMs: By The Cookbook

Link to comment
Share on other sites

It seems the blend modes are more or less the same as what photoshop does with layer blend modes. Except that you're actually imputing gl keywords to make them.

http://www.benmcdowe...odes-in-opengl/

 

I tried multiply, but it looks bad. I superimposed the same textures in photoshop just to double-check, and it looks exactly as bad. So a way to deal with the alpha directly is probably what I want instead of blend modes.

 

what about

blend blend

and make an alpha channel in your images. adjust untill corect transparency..

another idea is that you could have the texture letters more bold (more white) in alpha channel

you might be able to use 1 alpha image and add another stage to shader

 

And I was just now trying that, but it seems the alpha channel doesn't change anything. I must be missing other parameters in the material definitions for that end. (or I'm doing something wrong with the alpha)

 

As for having a separate alpha image, I don't yet know the parameters to use it either.

Edited by Skaruts

My FMs: By The Cookbook

Link to comment
Share on other sites

Didn't you want to make some textures transparent in the editor, or is this something else?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Ok I got the blend blend mode and the alpha channels working and it actually looks great, but there's a glitch that I can't get rid off... I solved it for NoDraw quite a while ago, but I can't remember what was the cause, and I just can't think of anything now. :(

You can see the vis portals on the back rendering in front.
(Alpha channel if full white just to make the glitch more noticeable.)
FK8sN3i.png



Any clues, anyone?

EDIT: Seems like I just solved it somehow. It's something to do with either the alpha channel or my tga saving settings. But still, the Wasser texture renders on top of the vis portal texture... I haven't messed around with the wasser. Damn...

EDIT2: Found the problem. It's a natural consequence from blending. I don't understand the math completely, but basically, with blend blend, the higher the opacity on the alpha the less visible the front texture becomes and the more visible the back texture becomes. So basically what's on the picture is the front image becoming fully transparent and the back one becoming fully opaque due to the equations involved, when being drawn to the buffer. Lowering the alpha (less opacity) solved it.

In some other cases the problem was that the other textures didn't have alpha yet, but had blend modes in the materials. So the "problem" is "solved". :)

I'll share this for whoever is interested in using it when it's ready. I'm doing a personalized version of the textures for a cleaner and clearer look, but I'll make transparency for the original ones too.

Thank you all for the help.

Edited by Skaruts
  • Like 2

My FMs: By The Cookbook

Link to comment
Share on other sites

I was about to ask you what your blend options were but I'll wait for your final post. Thanks for sharing. NB you probably have fixed this bit already but if blend filter/add are having too much of an effect you can modulate that stage by adding rgb 0.5 or whatever value to the stage.

 

I don't know anything more about open gl blending btw, but I did spend one evening studying it last week when I wanted to get windows to look right both from the lit side and the dark side. The rgb and blend src/dest were the options I twiddled till I got the effect I wanted :-)

Link to comment
Share on other sites

I've been using translucent all along. I noticed later that it is actually necessary. When I said it wasn't I had probably forgotten to place the file back in the pk4. Sometime later I just unpacked it and worked from there, it's much easier and I don't make that sort of mistakes.

My FMs: By The Cookbook

Link to comment
Share on other sites

Huh. That green thing is a the sword's clipmodel, and the belt has a nodraw texture in the basic skin.

Link to comment
Share on other sites

Is there a difference between the material shader for the in-game texture and the material shader for the editor image?

Link to comment
Share on other sites

No clue. As far as I know there's only one material shader for each texture.

 

textures/common/collision
{
description  "on a model : surface will be used for collision detection instead of the visual surfaces. Used for simplifying physics with complex objects"
qer_editorimage textures/common/collision.tga
noshadows
collision
// translucent
// {
//	 blend  blend
//	 map  textures/common/collision.tga
// }
}

 

Commenting that part solved it, but this screws my plans.

Edited by Skaruts

My FMs: By The Cookbook

Link to comment
Share on other sites

The qer_editorimage is the one used by DR. Not sure if you can add stages to it or not.

Link to comment
Share on other sites

With and without the translucency settings. (the black ones on the top are the default Shader Not Found - but those are as they should be)

 

The only ones that don't show up are those that I didn't place any translucency in, like caulk and shadows and some others. I have no clue what to do about this...

 

EDIT: It's really weird though, that in actual maps from FMs, only two or three of these textures show. Collision, nodraw and entityGUI. All others are invisible...

Edited by Skaruts

My FMs: By The Cookbook

Link to comment
Share on other sites

It seems qer_trans and qer_alphafunc don't work with DR. I found some old posts from Greebo saying this isn't supported by Doom. :(

 

So it seems my plans are really screwed. If only I could understand why it's just those 3 textures that show up in game in FM maps as opposed to my test map where they all show up, then maybe...

 

I'm not too hopeful though.

Edited by Skaruts

My FMs: By The Cookbook

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