Jump to content


Photo

Epi's Many Questions Thread


156 replies to this topic

#26 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1429 posts

Posted 09 January 2016 - 08:27 AM

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, 09 January 2016 - 08:27 AM.


#27 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 12 January 2016 - 08:51 PM

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, 12 January 2016 - 11:44 PM.

  • Anderson likes this

Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#28 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18748 posts

Posted 13 January 2016 - 06:25 AM

I dont know if this will help, but we have needle models with a red texture as part of the core mod.



#29 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36515 posts

Posted 13 January 2016 - 08:52 AM

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.


  • Anderson likes this

#30 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 740 posts

Posted 13 January 2016 - 10:45 AM

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.


  • Anderson likes this

Some things I'm repeatedly thinking about...

- louder scream when you're dying


#31 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36515 posts

Posted 17 January 2016 - 03:01 PM

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    
    }                            

}


  • Anderson likes this

#32 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 19 January 2016 - 12:34 AM

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, 19 January 2016 - 04:14 AM.

  • Springheel, Goldwell and Anderson like this

Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#33 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1429 posts

Posted 19 January 2016 - 08:07 AM

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



#34 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 19 January 2016 - 07:45 PM

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, 19 January 2016 - 07:54 PM.

Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#35 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36515 posts

Posted 19 January 2016 - 07:52 PM

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

}



#36 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 19 January 2016 - 11:52 PM

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.


  • Anderson likes this

Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#37 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36515 posts

Posted 20 January 2016 - 08:51 AM

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.


  • Epifire likes this

#38 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 28 January 2016 - 06:01 PM

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, 28 January 2016 - 06:02 PM.

Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#39 Goldwell

Goldwell

    Team Member

  • Active Developer
  • PipPipPipPip
  • 2164 posts

Posted 28 January 2016 - 08:01 PM

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

Edited by Goldwell, 28 January 2016 - 08:03 PM.

The Accountant Series
Part 1 (coming soon) | Part 2: New In town


Lord Edgar Trilogy
Lord Edgar's Bathhouse
 
Stand Alone Missions
Spring Cleaning


#40 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 28 January 2016 - 08:46 PM

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.


Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#41 rich_is_bored

rich_is_bored

    Advanced Member

  • Member
  • PipPipPip
  • 856 posts

Posted 29 January 2016 - 07:13 AM

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.



#42 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18748 posts

Posted 29 January 2016 - 02:56 PM

@RiB, could he not use image based particle effect? a lot of then (eg. dust etc) are just like this.



#43 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 29 January 2016 - 04:51 PM

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, 29 January 2016 - 05:34 PM.

Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#44 rich_is_bored

rich_is_bored

    Advanced Member

  • Member
  • PipPipPip
  • 856 posts

Posted 30 January 2016 - 07:41 PM

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



#45 Bikerdude

Bikerdude

    Mod hero

  • Member
  • PipPipPipPipPip
  • 18748 posts

Posted 31 January 2016 - 07:40 AM

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



#46 rich_is_bored

rich_is_bored

    Advanced Member

  • Member
  • PipPipPip
  • 856 posts

Posted 31 January 2016 - 11:52 PM

I don't see how that effect isn't also a disconnected collection of quads floating in space. The best you can do with our particle system is something like this...

 

 

However, that's not an arc.


  • Epifire likes this

#47 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 01 February 2016 - 12:06 AM

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, 01 February 2016 - 12:22 AM.

Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#48 Epifire

Epifire

    Member

  • Active Developer
  • PipPip
  • 428 posts

Posted 01 February 2016 - 12:56 AM

Came up with a 256x1024 card to scroll for starters. If I think it needs to be longer I can always change things up and probably scrunch more too...

 

arcBolt_card_zpsyobunv7b.png


Needing dem environment models?

 

Speak to the EPI!

 

Or rummage my online mesh repository instead...  https://www.mediafire.com/folder/7q1r8him1y63d/TDM%20Repository


#49 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 740 posts

Posted 01 February 2016 - 11:31 AM

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


#50 SteveL

SteveL

    Hero Coder

  • Active Developer
  • PipPipPipPip
  • 3669 posts

Posted 01 February 2016 - 01:32 PM

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

  • Epifire likes this



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users