Jump to content
The Dark Mod Forums

Playing in-game Videos


Recommended Posts

On 4/1/2020 at 8:41 PM, grayman said:

@Strunk,

 

Yes, that blend change cured the transparency of the image against a sky background.

Thanks.

Yes opengl blend options are very cool, one way to make black silhouettes on surfaces, is to do a video where full white is background and black is the silhouette you want moving on the surface (a inverted alpha channel) then use blend modulate or blend filter (GL_DST_COLOR, GL_ZERO), it should work like photoshop blend multiply. 

  • Thanks 1
Link to post
Share on other sites
  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Silhouette mage: video

Not sure if TDM supports all Opengl blending options but I don't see why not, here are some links: https://learnopengl.com/Advanced-OpenGL/Blending Search for "Stage Keywords" in the link be

Does TDM still supports ROQ? If so is that performance loss also for ROQ files? I don't remember them being so heavy. 

14 hours ago, Geep said:

@HMart, TDM still supports ROQ, if for no other reason to not break the existing FMs that use it. I suspect the main reason ROQ seems lighter weight is that was deployed at a time when monitors were not so high rez. So if you create or downsize your .mp4 to, say, 800x600 or 640x480, you might not see the hickups. That would make sense particularly if not needing full-screen display (nor STRUNK's multiple-window approach). With full-screen, real low rez would look a lot poorer visually.

It is also worth trying r_cinematic_legacyRoq 1 --- that would enable original Doom 3 code for ROQ playback, instead of FFmpeg.

To be honest, I regret now that I finished FFmpeg playback. It was probably a better idea either to extend ROQ or to take some particular format like ogg+vorbis+theora and support them by using official libraries from Xiph.org instead of FFmpeg. Or mkv+webm+opus, which is another free combo.

Now the djinn is out of the bottle, and FFmpeg will stay with us forever.

  • Like 1
Link to post
Share on other sites

@refl3ks

Thanx to @HMart there is a silhouette option now:

STRUNK-2020-04-03-10-55-06.jpg

Add this to the material file:

Spoiler

video/video_silhouette
//Transparent video screen that plays and loops video_sihouette.mp4 from the video folder
{
    qer_editorimage textures/editor/video

    {
    blend GL_DST_COLOR, GL_ZERO                    //Make transparent, where white is fully transparent
    
    videoMap loop video/video_silhouette.mp4    //loop = loop video, video is without audio

    green    1//
    blue    1//Intensity of the colors, from 0 to 1, where zero is fully black
    red        1//
    }

}

Decreasing the resolution and bitrate seems to help a lot with preformance, also the video length matters.

Edited by STRUNK
Link to post
Share on other sites

@HMart

Maybe you know this: There is a texture named white_pure, and in DR it looks like just pure white, but in TDM it shows pure black?

The material is:

Spoiler

textures/darkmod/sfx/white_pure
{

    description "A pure white unreflective material that's solid but doesn't interact with light."
    // qer_editorimage not needed, it'll show up white in DR anyway
    forceOpaque
    solid
    sort 1          // Draw just after light interactions
    
    {
        blend add
        map _white
    }


}

How to make this, or a new texture that is pure white, without shadows and self lit, without casting shadows, to serve as a background for recording silhouettes in TDM (with OBS or some screen/gamecapture software)?

Link to post
Share on other sites
3 hours ago, STRUNK said:

@HMart

That sounds promessing. Is there a webside where I can find all these opengl blend options that work for TDM?

Not sure if TDM supports all Opengl blending options but I don't see why not, here are some links:

https://learnopengl.com/Advanced-OpenGL/Blending

Search for "Stage Keywords" in the link below

https://web.archive.org/web/20170610204134/https://www.iddevnet.com/doom3/materials.php

2 hours ago, STRUNK said:

@HMart

Maybe you know this: There is a texture named white_pure, and in DR it looks like just pure white, but in TDM it shows pure black?

The material is:

  Hide contents

textures/darkmod/sfx/white_pure
{

    description "A pure white unreflective material that's solid but doesn't interact with light."
    // qer_editorimage not needed, it'll show up white in DR anyway
    forceOpaque
    solid
    sort 1          // Draw just after light interactions
    
    {
        blend add
        map _white
    }


}

How to make this, or a new texture that is pure white, without shadows and self lit, without casting shadows, to serve as a background for recording silhouettes in TDM (with OBS or some screen/gamecapture software)?

That is strange, using photoshop as a example, add (GL_ONE, GL_ONE) in that case, seems to be behaving like photoshop "subtract", not photoshop Linear Dodge(add) or screen, in idtech 4 blend add behavior is like so, any color minus black, is added into the main surface color, this is mostly used to make glowing effects on characters and surfaces, so white in that case should show totally white ingame, perhaps TDM team should investigate, could be a render bug. 

Also experiment removing the keywords, forceOpaque, solid and sort.

Edited by HMart
  • Thanks 2
Link to post
Share on other sites

@refl3ks

What I did for the mage was using textures/darkmod/plaster/white_plaster01 as a background, and scale it down, so the graininess is almost gone, and lit that background up with the brightest white light. Then let the mage walk in front of it in the shadow, and (screen) record that with OBS studio (free opensource program).

 

Edited by STRUNK
Link to post
Share on other sites
1 hour ago, refl3ks said:

This is great! Even a simple clever loop would work wonders for immersion.

@HMart

@STRUNK

Would an animated .gif be possible?

 

 

A .gif itself no, but a static horizontal image strip with a special material yes. 

Something like this, tweak has necessary. 

table table32 { snap { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ,24, 25, 26, 27, 28, 29, 30, 31 } }

textures/particles/caustics
{
   qer_editorimage textures/particles/causticsstrip_ed.jpg

   translucent
   {
      blend add
      map textures/particles/caustics.tga
      scale 1 / 24 , 1    // strip has 24 frames
      scroll table32[ time * .2	] , 0
	  rgb 0.1
   }
}

 

Edited by HMart
Link to post
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.


×
×
  • Create New...