Jump to content
The Dark Mod Forums

Epi's Many Questions Thread


Epifire

Recommended Posts

Thats good! The shadow mesh doesnt need a material shader like custom meshes, it uses TDM stock defs, all you need to do, as you did, is to point the texture path to the game's own folders. Any UV will do, same with collision boxes.

Edited by RPGista
Link to comment
Share on other sites

Hey sorta random but it's for my gauge skins. What generic material can I call up for an unused plane? Like I have some "fake" illuminated gauge faces I want to toggle. The lit version, and then kill it with a transparent filler texture when not active. Still unsure of how to tell the engine what separate materials get swapped.

 

Also while I'm at it, does anyone know of a good example for a material glow? I was hoping to design a flicker (similar to the method used for the rotation materials) to match the pulse of the machinery. Just implementing a glow would be nice though in any case. I know there would still be a light source needed beyond the gauge for environmental effects but I'll look at that later.

 

Two edit's later...

 

Well I also have one more to throw into the mix. This rotating needle to go on top of it all. I have a proper working material when the rotate line is commented out but the moment I add it back in the whole material is broken. Something about these coordinates or the way they're listed. I tried removing comas or encasing each figure but with no success.

transformer_needle
{
   	nonsolid
    	noshadows

	bumpmap		models/darkmod/props/textures/transformer_needle_local
	specularmap	models/darkmod/props/textures/transformer_needle_s
	
      	{
    	blend diffusemap
    	map 	models/darkmod/props/textures/transformer_needle
    	alphaTest 0.5
 
	rotate (0, 0.2, -0.5, 0.3, -0.7, -0.3, -0.7, 0.2, -0.5, 0.3)
	clamp
    	}

    // TDM Ambient Method Related
    	{                            
        if (global5 == 1)        
        blend add                
        map                models/darkmod/props/textures/transformer_needle     
        scale            1, 1        
        red                global2    
        green            global3    
        blue            global4    
    	}                            

}
Edited by Epifire
  • Like 1

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

Also while I'm at it, does anyone know of a good example for a material glow?

 

 

Self-lit materials are created by adding a "blend add" stage. Most "lit" windows have this.

 

the whole material is broken.

 

 

What error message do you get?

 

edit: I don't have any materials to look at here and the last time I did this was years ago, but I'm not sure you can put all the values into the material like that. I think the "rotate" keyword is only designed to take one value (it's used to turn textures once so you can paint them sideways). To have it move constantly I think you have to define a table and then point the stage to that.

 

A table is a single line that looks like this:

 

table <name> {0, 0.2, -0.5, 0.3, -0.7, -0.3, -0.7, 0.2, -0.5, 0.3}

 

it can go inside any material file (there are some examples in the candle materials)

 

Then in your material you would include the line:

 

rotate <name>

 

 

This is all from memory, of course, so I've probably got something wrong, but you can look for similar examples.

  • Like 1
Link to comment
Share on other sites

textures/darkmod/decals/gauge_indicator_short has this line:

rotate fol1Table [ time * 2 ]

Tables, or at least some expression involving time, can also be used for pulsing/flickering--see e.g. textures/darkmod/decals/symbols/pagan_pulsating_symbols01 (use it on a func_static with "shaderParm7" "1" set to see it in action).

 

There's also this from id's documentation, on using sound instead of time (I've only seen it on flickering light shaders but it might be worth trying on regular materials if your model is set up to be used by an entity that makes a sound):

 

 

sound: The current sound amplitude of the entity using this material. This is used to create light materials that pulse with the sound.

 

As for 'generic material for an unused plane', maybe textures/common/nodraw or textures/common/nodrawsolid is what you want.

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

It looks like one of the gauge indicators I made years ago made it onto SVN after all. It's textures/darkmod/decals/gauge_indicator_short

Here's what the material looks like:

 

textures/darkmod/decals/gauge_indicator_short // moves back and forth
{

nonsolid
noshadows

{
blend diffusemap
map textures/darkmod/decals/clock_hand_01_small
alphaTest 0.5
rotate fol1Table [ time * 2 ]

clamp

}

// TDM Ambient Method Related
{
if (global5 == 1)
blend add
map textures/darkmod/decals/clock_hand_01_small
scale 1, 1
red global2
green global3
blue global4
}

}

  • Like 1
Link to comment
Share on other sites

Awesome Springheel! That's exactly what I needed. Works fine in-game to add for some noticeable needle twitch. The only thing I wish I could do is figure out some method of throttling the intensity by audio levels (similar to what Vanished was talking about). I have a friend that's gonna try and knock out some sounds specifically for this object, (the only thing missing will be visual electrical particles).

 

So things on the list after this that I need to do are...

 

- Work on two more skins derelict and affluent.

 

- Figure out how to toggle the various skins and have them accessible with a skin file in DR.

 

- Get the sounds added and working for activation startup and active loop.

Edited by Epifire
  • Like 3

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

As far as activating the skin selection in DR, its no trouble at all, we can easily set it up once you get there, its simply a matter of listing the other texture's paths in a def file (I believe I have sent you a mockup skin file already).

 

And in terms of texturing, the more textures the better of course, and if its the training you are after, go for it for sure, but rest assured this one youve created works pretty well in any scenario as far as Im concerned, so only this skin would already work in probably any map situation. ;)

Link to comment
Share on other sites

As far as activating the skin selection in DR, its no trouble at all, we can easily set it up once you get there, its simply a matter of listing the other texture's paths in a def file (I believe I have sent you a mockup skin file already).

 

I've been looking through that a couple times over already. The thing that's confusing me is how you swap several materials within the model? Like how to tell it which material is getting replaced with what? For instance I have three main materials defining the transformer. There is the primary material (covering the whole mesh) and the other two are for the lit gauge and needle. It's an odd gamble but I have the unlit gauge on the base diffuse and want to nodraw the needle and lit gauge for the non-active skin. What I'm having difficulty with is how to re-direct several materials within the same mesh.

//-----------------------
// arc_transformer skins - Epi
//-----------------------

// arc_transformer_001 

// name of the alternative skin (included in the material file)

skin arc_transformer_001_alternative

{
model models/darkmod/custom/arc_transformer_001.ase

// default skin
textures/custom/arc_transformer_001
// alternative skin
textures/custom/arc_transformer_001_alternative
}

I have two more materials (minus the utility shadow and collision) transformer_needle and transformer_gauge that are being used in this mesh. I want one version for each skin variant to support on and off modes for the same mesh. Off mode would just nodraw out needle and gauge. I'm just not quite grasping how to tell the material something like, replace transformer_needle with nodraw? Because in this skin example it's only defining one material to switch rather than three.

 

The only thing that's making sense to me is some kind of line that calls up the actual cluster on the mesh first. Such as the name I've given it within my modeling app and then listing the actual replacement material afterward...

//arc_transformer_001_off

{
transformer_needle textures/common/nodraw
transformer_gauge textures/common/nodraw
arc_transformer_001
}

​//arc_transformer_001_on

//Additional lines are absent, since the target material bears the same name as the mesh's cluster

{
transformer_needle
transformer_gauge
arc_transformer_001
}

That's kinda the example as it goes in my head anyway. I need to specifically target certain parts of the mesh.

Edited by Epifire

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

You can switch as many textures as you want with a single skin

 

skin arc_transformer_001_alternative
{
model models/darkmod/custom/arc_transformer_001.ase

[old texture] [new texture]

[old texture1] [new texture1]

[old texture2] [new texture2]

etc..

}

Link to comment
Share on other sites

Oh coolio. Looks like I actually guesstimated alright after all. Skin file works and I think my three main skins are done. Debating a overdone rich looking version but I may wait on that.

  • Like 1

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

One thing I would highly recommend is adding dirt decals to your model, especially to large surfaces. It's very hard for mappers to add them and have them conform to the mesh, but rather easy for modelers to do it. For the cone of the transmitter, for example--you just copy the visible mesh of the cone, retexture it with one of the appropriate dirt decal models (adjust the uv to match your choice) and then paste it back into the main layer.

 

Then you create a skin that just swaps the decal for a nodraw texture, and you've got a clean and dirty version for mappers to choose from, without any new textures to create.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Alright. Pretty sure you guys know where I'm going with this but I'm curious as to what I have to work with for particle creation. Never EVER done this before and I don't even know what tool is used for that in the id4. Been needing a certain electrical arc and within UE4 terms this video sums up perfectly what I'm trying to do...

 

 

But I kinda wanna do that for this engine instead of Unreal (and not be pink :laugh:) . I don't know of anyone here who personally makes particles so this is me winging it.

Edited by Epifire

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

Inside darkradiant there is a particle editor. I've used it myself plenty of times and its fairly easy to use.

 

What makes it simple for me is the ability to find an already existing particle from TDM core, make a copy of it and tweak the sliders in the editor. I'll usually pick a particle close to the one I want and go from there.

 

To get it into your map you just create a func_emitter entity and select your custom particle and that's it. If you want to tweak things its simple too as you just have to adjust the sliders in DR and then in TDM just use the console command "reloaddecls" and it updates your particle in game without having to reload the map all the time.

 

So play around with it and see what you come up with :)

 

Edit: and for further reading http://wiki.thedarkmod.com/index.php?title=Particle_Editor

Edited by Goldwell
Link to comment
Share on other sites

Hmm I'm looking over this and not seeing any interpolation options, maybe I'm missing a translation option? Trying to think of how else I could accomplish that short of somehow arranging like ten/twenty separate arc frames to play in sequence (which sounds like a pain). The video I posted shows a way of basically warping a line along a single plane and then multiplying the planes and setting random facing directions, with a noise deformer.

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

The particle system in TDM is as basic as they come. It's best suited for effects represented as collection of points in space like smoke, mist, fire, dust, and debris.

 

An electrical arc is tricky. You don't want to draw a disconnected set of quads floating in space. Instead you want to form a connected chain from one point to the next. The engine doesn't currently support that.

 

I imagine the best solution here is to sidestep the particle system altogether. Maybe use a torus shaped mesh with some deformations applied. Have it rotate in game and use a scrolling texture so only an arc is visible.

Link to comment
Share on other sites

Does the id4 support any kind of animated frame based shader source? Basically like a gif image, I did something similar for a server bank light panel I made in Double Action: Boogaloo. If so I thought of a method I could do to simulate a geometrical solution in Softimage and bake it out in frames (which hadn't occurred to me before). Then if I could run that in game, I could build it into a particle and give it some extra, random falling sparks off the pylons.

 

The trick would be the animated frames shader and of course baking them out in Soft. Otherwise the rest should be a piece of cake. In theory anyway.

 

EDIT: THEORY 2

 

If all else fails I can bake out a single long texture (for scrolling) and just have a very long arc bolt across it. I could then have it run across two deformed frames that get very small near the pylons (to get rid of the height jump at the edge). After that I could turn it into a texture and give it some glow, along with the sparse falling sparks to change it up a bit.

 

Also on that note, is there a method I could use (in a material shader line) to add a bloom effect? I can get additive stuff to work and try to compensate the rest with a flickering light, but bloom is definitely the icing on the cake.

Edited by Epifire

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

@Epifire:

 

The engine supports animated textures in the form of an image strip, image sequence, or ROQ movie file.

 

You might have noticed while creating the material shader for the moving needle gauge of your electric generator, many of the shader keywords accept expressions. This is how you cycle through an image strip (use the 'scroll' keyword) or image sequence (use the 'if' keyword).

 

@bikerdude:

 

Would the dust you're referring to be those fake volumetric light shafts? That works well because the particles all travel along the same vector. Making a straight line of particles is not an issue.

Link to comment
Share on other sites

@bikerdude:
Would the dust you're referring to be those fake volumetric light shafts? That works well because the particles all travel along the same vector. Making a straight line of particles is not an issue.

Nope, once example is tdm_dustfrog_1, which use the image/textures - textures/particles/smokepuff etc.

Link to comment
Share on other sites

Hmm very interesting, I really appreciate the in depth discussion on this. So far I'm sticking with the scrolling since I thought about it more and realized it should completely nail what I'm going for.

 

Two things I'm wondering are...

 

1: how to get some realistic sparks to toss in randomly during the effect's runtime (although not too many sparks)? On that note I also need to figure out how to control the sparks enough so that they don't clip through the model. They should be sparse and have a very short life span. Shortest being in the center of the effect, as to not go through the top of the transformer. And longest lifetime off the sides of the unit.

 

2: how to create two glow (but rather sharp) start/end flares to help mask the convergence point for the arc to pylon. It would be fantastic if I could give the material a flicker from audio level (as I heard we could do that) since I still have a arc loop snd in the works.

 

I'm not out of ideas on how to create the materials for this, that's honestly the really fun part. I just need to know how to implement them in terms of materials and effects for the particle. I get some of it, but I'm rather vague on exactly how to arrange an effect. I'm assuming you can toggle and control different groups with stages?

 

Then the end result should be several bolts racing between the pylons erratically as they converge into two points of light, with some sparks falling randomly.

 

EDIT: I feel kinda like a derp. One thing that also is sorta important is how I flag/use a mesh in a particle effect? I see stuff for shaders to use but what if I have something rather specific like these planes I want to define the arc path with? That's the mesh I need to define, the rest I should be able to add within the editor I would think.

Edited by Epifire

Modeler galore & co-authors literally everything

 

 

Link to comment
Share on other sites

1) There are some spark particle effects already defined, so maybe you could adapt those.

 

2) I don't know whether particles can get the sound of the entity that spawned them; under the assumption that they can't, maybe giving the model extra quads using a deform sprite material (to make them always face the camera) would work: something along the lines of textures/darkmod/sfx/fake_haze_02. (Then you'd just skin them as nodraw when the generator's turned off.)

 

There is a deform flare but it seems to be designed around rectangular lights for Doom 3.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

  • It would be fantastic if I could give the material a flicker from audio level (as I heard we could do that) since I still have a arc loop snd in the works.
  • I'm assuming you can toggle and control different groups with stages?
  • One thing that also is sorta important is how I flag/use a mesh in a particle effect? I see stuff for shaders to use but what if I have something rather specific like these planes I want to define the arc path with? That's the mesh I need to define, the rest I should be able to add within the editor I would think.

  • I know you can do that with lights, but can it be done with normal materials? Whether or not it can, you could play around with a small light tuned in to your sound. You could put it on a different spectrum if needed, so that it only illuminates your particles, but it might be better to use a normal light. Particles don't shed any light of their own, and you probably want your arc to cast a bit of light over short distances. If you want your particle to be lit by the light, make sure you add a bumpmap stage to the material def (the built-in bumpmap _flat will do).
  • Yes, that's right
  • You can't deploy a mesh in particle effects. Like VanishedOne said, the way to fake 3d volumes is to use view-aligned quads (which can include rectangles) and an image.
  • Like 1
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...