Jump to content


Photo

Rim Lights?


67 replies to this topic

#51 peter_spy

peter_spy

    Uber member

  • Member
  • PipPipPipPip
  • 2052 posts

Posted 20 December 2018 - 03:33 PM

Btw. if we want this to work as a new frob someday, ambientRimColor needs to be a stage keyword, not a global keyword, so we can put it in curly brackets with if ( parm11 > 0 ) clause. Also, I see that the shader made into official 2.07 beta, that's great :)



#52 STiFU

STiFU

    Uber member

  • Development Role
  • PipPipPipPip
  • 3579 posts

Posted 20 December 2018 - 04:33 PM

Oh no, a new frob highlight should never be implemented in the mtr file again. This whole thing was just an errorprone hack to begin with. Stuff like that has to be moved to game code, now that we can freely access the renderer.

 

That's not supposed to mean, that I am against making it a stage keyword, though.


  • Springheel, peter_spy and duzenko like this

#53 peter_spy

peter_spy

    Uber member

  • Member
  • PipPipPipPip
  • 2052 posts

Posted 21 December 2018 - 02:58 AM

Yup, some kind of master frob shader would be much more convenient (but IMO that should be something that you can tweak, if you want to).



#54 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2321 posts

Posted 21 December 2018 - 11:51 AM

Having the back renderer to evaluate a couple of extra frob stages for every potentially frobable material in view is bad for performance.

It would be great to get rid of them at some point completely, along with the now unused ambient shader stage



#55 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1017 posts

Posted 03 April 2019 - 02:30 PM

I've just been playing around with this, exploring its potential for ghostly effects. I'll try this on an AI next:

 

darkmod_2019-04-03_20.20.25.jpg

 

(For anyone wanting to replicate the effect: it seems you need a light-interactive stage, so use translucent and diffusemap _black (translucency with no explicit diffuse stage also works if you have a bumpmap).)

 

Am I right in thinking it currently only accepts numeric literals as parameters? That is, I shouldn't expect anything like this to work?

ambientRimColor 0,1,parm3
ambientRimColor 0,1,pulseTable[time]

Edited by VanishedOne, 03 April 2019 - 03:30 PM.

  • STiFU, RPGista and Aosys like this

Some things I'm repeatedly thinking about...

- louder scream when you're dying


#56 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1672 posts

Posted 03 April 2019 - 10:43 PM

Thats a pretty cool effect!



#57 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2321 posts

Posted 04 April 2019 - 03:46 AM

 

Am I right in thinking it currently only accepts numeric literals as parameters? That is, I shouldn't expect anything like this to work?
ambientRimColor 0,1,parm3
ambientRimColor 0,1,pulseTable[time]

Probably not ATM but if you need that it should not be hard to add


  • VanishedOne likes this

#58 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1017 posts

Posted 04 April 2019 - 09:22 AM

Good to hear! If we had support for the same kind of expressions as in per-stage rgb, we'd be able to make the colour fade or pulsate as desired.


Some things I'm repeatedly thinking about...

- louder scream when you're dying


#59 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2321 posts

Posted 05 April 2019 - 04:01 AM

Good to hear! If we had support for the same kind of expressions as in per-stage rgb, we'd be able to make the colour fade or pulsate as desired.

Try this one

 

https://drive.google...iew?usp=sharing


  • VanishedOne likes this

#60 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1017 posts

Posted 05 April 2019 - 12:39 PM

Edit: sorry, false alarm. For some reason I had GLSL turned off; I must have forgotten to turn it back on after checking something yesterday. this seems to be a consequence of trying the regular .exe without having purged the new glprogs.

 

Anyway--after confirming GLSL is on, I'm afraid rimlights still appear broken in the new version. That is, I can't see them at all.


Edited by VanishedOne, 05 April 2019 - 12:53 PM.

Some things I'm repeatedly thinking about...

- louder scream when you're dying


#61 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2321 posts

Posted 05 April 2019 - 01:57 PM

Edit: sorry, false alarm. For some reason I had GLSL turned off; I must have forgotten to turn it back on after checking something yesterday. this seems to be a consequence of trying the regular .exe without having purged the new glprogs.

 

Anyway--after confirming GLSL is on, I'm afraid rimlights still appear broken in the new version. That is, I can't see them at all.

Did you try the "frestest" map?

Any errors in console after reloadglslprograms?



#62 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1017 posts

Posted 05 April 2019 - 02:21 PM

No console errors.

 

I don't know that map (some download links in the thread seem to have expired).


Some things I'm repeatedly thinking about...

- louder scream when you're dying


#63 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2321 posts

Posted 06 April 2019 - 12:41 AM

Please attach your test map then



#64 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1017 posts

Posted 06 April 2019 - 09:44 AM

This is getting odd. My test map has some unrelated junk in it, so I removed that and saved a new version, dmapped...
 
...and now it works! And yes, I can enter expressions in the material def. Then I wanted to test using shaderparms, and I realised the surface I'd been testing with was a worldspawn patch, so I converted to a func_static entity, dmapped again...
 
...and now rimlights turn out not to work on that. I'm attaching a version of the map wth worldspawn and func_static patches side by side. Here's the test material:

rimtest
{
	ambientRimColor 1,0,1
	//translucent
	
	diffusemap _black
	bumpmap textures/darkmod/metal/detailed/brass_plaque_electric_433_local
	
}

Edit: it does work on the func_static if I make the material translucent. :wacko:

Attached Files


Edited by VanishedOne, 06 April 2019 - 11:55 AM.

  • duzenko likes this

Some things I'm repeatedly thinking about...

- louder scream when you're dying


#65 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2321 posts

Posted 07 April 2019 - 03:28 AM

I'm attaching a version of the map wth worldspawn and func_static patches side by side.

It just works for me

Attached Thumbnails

  • Untitled.jpg


#66 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1017 posts

Posted 07 April 2019 - 10:45 AM

This is what I see:

 

darkmod_2019-04-07_16.41.57.jpg

 

(Also, your light gem looks weirdly dark compared to mine.)

 

Edit: hmm, it's not a worldspawn-versus-everything-else thing. Attached is the original version of my test map: here it's a worldspawn patch and still works for me only under 2.07.

 

Edit2: and in this version of the map, if I remove the idAFEntity_SteamPipe entity it starts to work under the new TDM version, but only from certain viewing angles:

 

darkmod_2019-04-07_17.15.23.jpg

 

Edit3: in the new TDM version, neither patch in rimtest.map has rimlights if I disable anti-aliasing in TDM's settings menu. In 2.07 I can see them with or without AA.

Attached Files


Edited by VanishedOne, 07 April 2019 - 11:55 AM.

Some things I'm repeatedly thinking about...

- louder scream when you're dying


#67 duzenko

duzenko

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2321 posts

Posted 08 April 2019 - 07:01 AM


 

Edit: hmm, it's not a worldspawn-versus-everything-else thing. Attached is the original version of my test map: here it's a worldspawn patch and still works for me only under 2.07.

What do you know - it was a mistake in my C++ code! -_-

Try now

https://drive.google...iew?usp=sharing


  • VanishedOne likes this

#68 VanishedOne

VanishedOne

    Advanced Member

  • Member
  • PipPipPip
  • 1017 posts

Posted 08 April 2019 - 10:46 AM

Great! Everything seems to work now. :D


  • HMart likes this

Some things I'm repeatedly thinking about...

- louder scream when you're dying




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users