Jump to content
The Dark Mod Forums

Attaching particles to models


Springheel

Recommended Posts

I can dig through some examples and figure this out myself, but hopefully someone could save me some time by pointing me in the right direction.

 

Specifically, I'd like to see how it looks putting flames inside lanterns that use transparent glass. I tried it with a streetlamp using the default D3 flame, and while it doesn't look too bad, the flame bounces around too much for something that would be protected by the wind. Our candle flames don't flicker much at all, so they might be more appropriate.

 

The D3 flame is just a sprite, however, so it can be set as a surface material for a polygon like any other texture. Our flame is a particle. Is there an easy way of attaching particles to models, or can that only be done as a prefab or separate entity of some kind?

Link to comment
Share on other sites

I'd suggest creating a func_emitter, which has the particle as "model". Then bind the func_emitter to the lantern.

 

This would technically be a prefab. I think the "def_attach" system could also allow setting this up as entityDef.

Link to comment
Share on other sites

You can do it as a prefab as Greebo suggests, or if you particularly want a single model (and/or you want multiple emitters or precise particle placement), you can use an "emitter polygon" within the model. This is a submesh (possibly a single triangle) which is textured with a material than includes the "deform particle" or "deform particle2" global keywords, which causes a mesh surface to emit particles instead of normal rendering.

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

      Finally got round to publishing a tutorial on baking normal maps in Blender, since most of the ones we have are inaccessible or years out of date.
      · 0 replies
    • 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
×
×
  • Create New...