Jump to content
The Dark Mod Forums

Models and z-fighting


Springheel

Recommended Posts

Is there a way we can use a png (which can save with a transparent background) and maybe also use that as the alpha blend?

 

Or can we use that for diffuse and another black/white tex for alpha?

 

Is there another format that allows transparent background besides gif or png, and also allows alpha?

 

I think the problem here is that I am using tga for alpha channel, but something is gonna be where that white is on the diffuse portion. We could try black or just the metal tex.

 

I added that white instead of the metal so people could see the hinge shapew in editor to know which door they were choosing.

 

 

 

 

 

 

Read below blabbering if you want.

----------------------

OK, I skipped the last 5-10 posts here...

 

 

 

Watched the vid, yeah that's bad. This is a shader thing i believe. I kindof copy/paste them as I am not that good with putting them together from scratch.

 

Been along time so I forgot how they were done.

 

Basically it is a tga (with alpha hinge shape) + a normal map + a diffuse which is just one of our stock metals.

 

[size="2"]

//////////HINGES/////////////

//Baddcog

bc_hinge01

{

metal

translucent

clamp

bumpmap models/darkmod/props/textures/bc_hinge01_local

specularmap models/darkmod/props/textures/lampmetal_s

{ 

blend diffusemap 

map models/darkmod/props/textures/bc_hinge01

alphatest 0.5 

}



// TDM Ambient Method Related

{

blend add

map models/darkmod/props/textures/bc_hinge01

red global2

green global3

blue global4

}

}

[/size]

 

Something is wrong with that texture though. I don't know when that happened. Look at hinge02, that is not black and white, it has a metal for the hinge. Hinge01 is NOT supposed to be black and white.

 

But it looks like I did leave white behind the metal on hinge02.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

I updated the textures, actually reverted '01' so it's back to metal tex instead of black/white. changed the back from white to black but sounds like someone tested that. Seems like that was better. I tried to look in game but it locked up.

 

I will edit the meshes tommorrow. I will move the hinges a little further away, right now they are very close. Hopefully that will solve it.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

OK, I SVN'ed

 

door96x48_3hinge_test.ase

 

could you test it out alongside the old one?

 

I got quite a ways away and the hinge itself starts to fade. But it's really too complex for polys, with three of them it would be thousands instead of 12

 

Bums me that the hinge fades.

 

Maybe in the long run it's best just to have door tex and maybe not as many varieties :(

 

But they could look better.

 

I just had the idea to do it this way to save on resources.

 

But still, we could have 3 door sizes (just boxes) then paint like 10-20 skins.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Here's the result of the test door next to original. At this distance at least, it doesn't seem to be an issue. But I'm not sure what you meant about polys... is the hinge shape itself modeled? :blink:

 

http://72.8.59.188/TheDarkMod/temp/zfight2.wmv

 

I will try the added diffuse method, and translucent too, though I dread going into this mysterious territory again. :unsure:

Link to comment
Share on other sites

Sneaksie,

Sorry if my post was a little confusing.

 

I meant if we modeled the hinges onto doors instead of this. I think they would render better at all distances but would have a huge amount of polys.

 

I can mess with the shaders a bit more but i think I did and removing those keywords is gonna bugger them I think.

 

I think the main issue was that I just put the polys as close as possible to the door (literally microns away) as I didn't know the z-buffer would be an issue.

 

Now the hinges is hundreds of microns away, not just 1 or 2. I really don't forsee the same thing happening again. I think the video probably shows about the maximum distance we will see in most FM's anyway.

It's easy to get by with it in a blank room, but once alot of details,lights,AI are added huge distances probably just won't happen.

 

Anyway, as much as I moved them away I think we'd have 10x the distance to go before the z buffer becomes a problem again.

 

And still right up close you can't tell there is a gap.

 

Thanks for posting that vid.

 

-----------

I am glad that it is working better now. I haven't looked at them that far away, that is a pretty good distance.

 

If everyone is good with that I will do the same to the other 2 doors Wed. and we can call it good.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Oh. :) Cool. So then we do have a choice:

 

1. changed models, like this test one, which worked well with a big distance (confirmed up to 2400 units, and at that point, the door getting too small to see anyway)

2. continue forward with added diffuses, if that works (it should, but so far there have been problems I believe)

 

I guess #1 requires two new models, no big deal. #2 requires some figuring out, testing, and then if it works, new materials to be produced. Oh, and possibly(?) changes to the models so they can properly use the new materials.

 

Sounds like #1 is the easier of the two. ^_^

post-58-1222110238_thumb.jpg

Link to comment
Share on other sites

Oh. :) Cool. So then we do have a choice:

 

1. changed models, like this test one, which worked well with a big distance (confirmed up to 2400 units, and at that point, the door getting too small to see anyway)

2. continue forward with added diffuses, if that works (it should, but so far there have been problems I believe)

 

I guess #1 requires two new models, no big deal. #2 requires some figuring out, testing, and then if it works, new materials to be produced. Oh, and possibly(?) changes to the models so they can properly use the new materials.

 

Sounds like #1 is the easier of the two. ^_^

 

As far as I understand, #1 is just moving the already existing hinges a few sub-units away from the door. So just update the door models and be set :)

"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

Yeah, I'll be back home on Wed and do the 2 remaining doors then.

 

I just was too tired to do all three last night then find out it didn't work anyway.

 

Obviously I got the material order mixed up on that test one too (hence the wood lock plate)

Dark is the sway that mows like a harvest

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

    • 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
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...