Jump to content
The Dark Mod Forums

Skins and nodraw materials


R Soul

Recommended Posts

I'm currently making a custom button, in the style of the one we see in "the other game", but I've hit a snag. I want to provide the option of using a skin to give the button a label (e.g. floor number for a lift).

 

The metal housing and the button are in one texture, with one material, so it seemed logical to create a plane over the button with the material textures/common/nodraw.

 

I've already made a few skin files so I know how they work. My intention was to allow the nodraw material to be replaced, but when I try that I can't see the replacement. In DR the plane is solid white, and in game it's invisible. I could only get the skin to work when the default material was a conventional one (e.g. a brick wall), which defeats the purpose - I'd like the button to be blank by default, and I don't want the user replacing the entire button texture because it's 1024 x 512.

 

Can a plane be genuinely unrendered unless a skin changes its material?

Link to comment
Share on other sites

A button texture of 1024 x 512 really sounds like overkill.

 

But why not just texture the model with the first label, and then use skins to switch to the other labels?

Link to comment
Share on other sites

Yes, a plane can remain invisible for effects such as you propose. I've done it when I had on/off effects for transformers and engines. Can you post your skin file so I can compare it with my working version? It just sounds like a typo or something but yeah it definitely works so as long as the skin file isn't doing anything strange.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

Maybe the texture scale is wrong. Did you fit the nodraw texture to the plane?

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

I can confirm this bug, I was looking to provide 2 different seat textures with different uv-maps on my stagecoach by making 1 start visible and the other 1 start as nodraw, then swap them around by skin. It worked ok in the editor but the faces which started nodraw never showed up ingame.

 

I've simplified the setup by making a nodraw box model and skinning it with a regular wall texture. Same result: works in editor, invisible ingame. Making a small test package of this for the bugtracker was on my todo list.

Link to comment
Share on other sites

A button texture of 1024 x 512 really sounds like overkill.

 

But why not just texture the model with the first label, and then use skins to switch to the other labels?

The metal housing is 512x512, with another 512x512 for the button itself. I've reduced the total size to 512x256 and scaled down the two models to 0.75. It's still big enough to look chunky, but shrinking the model more or less cancels out the loss of texture resolution.

 

It's not my intention to release a reskinable labelled button. It's a plain button with support for an optional label.

 

 

Maybe the texture scale is wrong. Did you fit the nodraw texture to the plane?

The texture scale is correct (fits the nodraw plane perfectly)

 

 

I can confirm this bug.

Thanks, although I would have preferred the opposite :D

 

Skin example:

skin tdm_button1_test
{
	model models/darkmod/mechanical/switches/button1_press.lwo
	textures/common/nodraw textures/darkmod/stone/brick/old_worn_blocks_003
}
Link to comment
Share on other sites

I can confirm this bug, I was looking to provide 2 different seat textures with different uv-maps on my stagecoach by making 1 start visible and the other 1 start as nodraw, then swap them around by skin. It worked ok in the editor but the faces which started nodraw never showed up ingame.

 

I've simplified the setup by making a nodraw box model and skinning it with a regular wall texture. Same result: works in editor, invisible ingame. Making a small test package of this for the bugtracker was on my todo list.

 

Yes, afaik id4 wont process more than a single UV map to a model. However in the instance of a sign like this (on a separate material) it should all be able to be on the same UV map since it sounds like he's just matching to boundaries with the sign.

//-----------------------
// Steam Engine Mk.III - Epi
//-----------------------

steam_engine_003_off

{
model models/darkmod/super_secret/steam_engine_003.lwo

steam_engine_003 steam_engine_003
steam_engine_grate textures/common/nodraw
steam_engine_heatwarp textures/common/nodraw
transformer_needle_a transformer_needle_a2
transformer_needle_b transformer_needle_b2
steam_engine_glassReadout steam_engine_glassReadout
} 

steam_engine_003_on

{
model models/darkmod/super_secret/steam_engine_003.lwo

steam_engine_003 steam_engine_003
steam_engine_grate steam_engine_grate
steam_engine_heatwarp steam_engine_heatwarp
steam_engine_glassReadout steam_engine_glassReadoutOn
}

You don't have to double list the non-interchanging materials like I did. Steam_engine_003 is listed there for my own use of keeping track of the materials. You can see various material definitions either be replaced outright or just remain unlisted if the primary material applied was an ON effect to start with. However, I've been able to slot in the nodraw material for OFF mode usage when heatwarp or grating glow isn't applied. Hope this helps but I can guarantee you it does work as long as it's all on the same UV.

Modeler galore & co-authors literally everything

 

 

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  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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
×
×
  • Create New...