Jump to content
The Dark Mod Forums

Need moonbeams but not working


Fidcal

Recommended Posts

Func static with shaderparm7 0.5.

Fids I miht be wrong, but shaderparm has an upper case 'P'

 

so - "shaderParm7" not 'shaderparm7'

 

anyway I suggest you use the new moonbeams from the monestery mission as they look better and more like moon beams we see in TDS. In fact didn't I read somewhere that someone made a bunch of new ones..? ah now that I think of it it could be in Flanders map pack he gave me - drop me a PM.

Edited by Bikerdude
Link to comment
Share on other sites

Yeah, I saw a pic from St. Lucia on MODBB that was missing the moonbeams on the statue.

Link to comment
Share on other sites

Tried the trainer first. Exported as prefabs. Imported into my map. Dmap. Nothing. Can't think what else is needed. :wacko: Boosted gamma. Nothing. Dropped in a new model in case I'm dmapping the wrong map (done that before ;)) But nothing. Disabled new video enhancements. Nothing.

Link to comment
Share on other sites

Yeah, I saw a pic from St. Lucia on MODBB that was missing the moonbeams on the statue.

Ah! So it sounds like there has been a change that's broke these. Maybe St. Lucia never worked since it was converted from the original demo.

 

Biker, what was your monastery FM called? I can't find it. I think it was St.Albans but called something else.

 

I seem to recall Sotha had some moonbeams working in an FM in a kitchen I remember were quite good. I'll see if I can find that.

Link to comment
Share on other sites

Well I'm dmapping Sotha's but when I actually look, all of the ones I've tried are the same anyway. They are all textures/darkmod/sfx/moon_light_rays. Sotha's was shaderparm7 0.8 which is why they looked a bit better I thought.

 

No nothing in-game. All broke. Either the shader has been changed or the code that passes shaderparm7 I guess.

Link to comment
Share on other sites

flacksbridge I think..

 

And the spelling wasnt an issue then ..?

No, I tried a capital P but no difference - and all the others are p anyway.

 

I removed the global1 now they are all black.

 

I changed it to just red 0.5 etc but still all black. Before they were invisible. Now they are black! :laugh:

Link to comment
Share on other sites

You should be using

textures/darkmod/sfx/moon_light_rays

 

In 1.03 the material script is :

 

textures/darkmod/sfx/moon_light_rays
{
qer_editorimage textures/darkmod/sfx/light_rays_ed
twoSided
noshadows
nonsolid
noselfshadow

{
	blend gl_one, gl_one
	map textures/darkmod/sfx/light_rays
	scroll	time * 0.15 , time * 0

	red	0.08 * (parm7 + 1 - (parm7 || 0))
	green	0.08 * (parm7 + 1 - (parm7 || 0))
	blue	0.12 * (parm7 + 1 - (parm7 || 0))
}
}

 

 

If you're just looking to color them, there's one which supports _color too :)

Link to comment
Share on other sites

This is what I see in 1.03...

 

textures/darkmod/sfx/moon_light_rays
{


qer_editorimage textures/darkmod/sfx/light_rays_ed
twoSided
noshadows
nonsolid
noselfshadow
{
	blend gl_one,gl_one
	map textures/darkmod/sfx/light_rays
	scroll	time * 0.15 , time * 0

	red	0.08*(parm7 * global1)
	green	0.08*(parm7 * global1)
	blue	0.12*(parm7 * global1)
}


}

Link to comment
Share on other sites

  • 4 months later...

thread necro. I can't seem to get the beams of any color to appear brightly, even with shaderparm7 set at 1. tried using moon_light_rays and moon_light_rays dim, but in a dark room, they're just very faint. Trying for sunbeams here. Whats the deal?

 

 

 

btw, what does "red 0.05 * (parm7 + 1 - (parm7 || 0))" actually do? how can you use an 'or' operator in a math equation...?

Link to comment
Share on other sites

thread necro. I can't seem to get the beams of any color to appear brightly, even with shaderparm7 set at 1. tried using moon_light_rays and moon_light_rays dim, but in a dark room, they're just very faint. Trying for sunbeams here. Whats the deal?

Sounds like you're using the wrong material, try one of the other beam fx, you can brighten most of the ones that use the 'colored' keyword by using _color and increasing the lightness of it. ie : If you were to make them a dark yellow they would be fainter, a lighter yellow would be brighter. According to the thread try using textures/darkmod/sfx/moon_light_rays like this.

 

btw, what does "red 0.05 * (parm7 + 1 - (parm7 || 0))" actually do? how can you use an 'or' operator in a math equation...?

Materials can use boolean operators in the expressions, so you can do things like that. In this case, or will test if a variable is 0/null (False) or any other value (True), and subsequently return 1(True) or 0. The operators do act is some pretty strange ways, this was the simplest that I could think of which worked on all my tests.

It is my answer to the question that people kept asking "I added moonbeams/some effect and it doesnt show up", the reason for this was that people were not setting the relevant spawn arg on the entity. If there is no spawn arg, something like this will happen :

No spawnarg parm7? parm7 = 0
red = 0.05 * parm7
red = 0

Result : Nothing to see, since the same would generally be used for all of the other channels.

A lot of our materials also used 'global1', which was a setting used to brighten things if bloom was enabled, however since we removed bloom and subsequently global1 was null/0, that meant a lot of things didn't show up.

 

How do we fix this? we need a default value which can be overridden by the mapper!

default = parm7 (if valid(>0)) else 1.
parm7 is not specified : default is 0 or 1
default = 1
red = 0.05 * default
red = 0.05 * 1
red = 0.05

 

Result : We see something, if it's not right we can adjust it.

# Lets assume we use shaderparm7 = 0.5:        # Lets assume we use shaderparm7 is not set:
red = 0.05 * (parm7 + 1 - (parm7 || 0)        red = 0.05 * (parm7 + 1 - (parm7 || 0) 
red = 0.05 * (0.5 + 1 - (0.5 || 0))           red = 0.05 * (0 + 1 - (0 || 0))
red = 0.05 * (1.5 - 1)                        red = 0.05 * (1 - 0)
red = 0.05 * 0.5                              red = 0.05 * 1
red = 0.025                                   red = 0.05

 

While the value is now lower, the old code used the global1 variable, which would have dimmed it too. If I recall correctly all of the materials I updated to work like this, were matched to the old values (tho I havent checked the svn log, so I don't know if it was me). But if you can find that it doesn't, I'll happily go and make some changes :)

 

The same idea is used to give water a default flow speed, but also allow the mapper to change it as they see fit.

Link to comment
Share on other sites

Ah I thought that was just me, yeah since either 1.06 or 1.07 moon/lights beams aren't very bright at all.

 

Hmmm thats odd, I'll take a look into it then. iirc these changes were around 1.04 at the latest. Shouldn't be a problem to fix, just need to work out the old default values :)

Link to comment
Share on other sites

JC Denton (et al) took a cue from Melan's "desaturation" methods and actually made this part of the color calculation process. Less saturation will naturally lead to darker visuals. I imagine that this improved the appearance of some missions that looked "too bloomy" when post-processing was enabled but I believe it has had an adverse effect on missions where the lighting was already well tuned for bloom (or otherwise) and... may have exaggerated Melan's intended effect too much when used in conjunction with "desaturated lights".

 

http://wiki.thedarkmod.com/index.php?title=Advanced_TDM_Visuals_Tweaking

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

if the default value of shaderparm7 is null if not set by mapper, then doesn't that mean that

red = 0.05 * (parm7 + 1 - (parm7 || 0)

would still return some unpredictable value? 0.05 * (null + 1 - 0) = ??

 

Also I assumed that shaderparm7 was used to brighten the result, not make it darker. where the defaults are .08 .08 .12 for moon_light_rays, that seems a bit dark already. To alleviate the null value problem and allow mappers to brighten beams instead of darken them, would this make more sense?

 

if(shaderparm7)
{
red = 0.08 + shaderparm7
green = 0.08 + shaderparm7
blue = 0.12 + shaderparm7
}
else
{
red = 0.08
green = 0.08
blue = 0.12
}

 

and then just avoid using shaderparm7 with values above .88??

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

    • 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
    • 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
×
×
  • Create New...