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

    • 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.
      · 2 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...