Jump to content
The Dark Mod Forums

So, what are you working on right now?


Springheel

Recommended Posts

I was thinking about a monochrome FM, and now watching that, I bet it'd make a real impression with B&W because it'd make the whites really stand out & almost washout. It's not for everything, but if you want to make a stylized visual impression for a gimmick artistic FM it'd be interesting to play with.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

It was a little hard to fathom at first but it looks like you've got a basic distance occlusion working correct?

 

Pretty cool stuff.

 

Am I also seeing some changes to dynamic ambient lighting?

Lots of bloom on the light sources? Or is there Ambient Occlusion?

 

Difficult to see much because windowed TDM, dark scenes, and you move very quickly so it is hard to see any details.

 

Could you tell what exactly is different there?

This is the shader used.

!!ARBvp1.0
OPTION ARB_position_invariant;

END

!!ARBfp1.0
OPTION ARB_precision_hint_fastest;

TEMP curPos, curRend, bloom, avg, avg_;
TEMP des, des_;

# get current position on screen
MOV curPos, fragment.position;
MUL curPos, curPos, program.env[1];
MUL curPos, curPos, program.env[0];

# get current render and bloom image
TEX curRend, curPos, texture[0], 2D;
TEX bloom, curPos, texture[1], 2D;

#calculate brightness
ADD avg, curRend.r, curRend.g;
ADD avg, avg, curRend.b;
MUL avg, avg, 0.33;

SUB avg_, 1.0, avg;

#desaturate

SUB des, avg, 0.6;
MAX des, des, 0;
MUL des, des, 2.5;
SUB des_, 1.0, des;
MUL curRend, curRend, des_;
MAD curRend, avg, des, curRend;

MUL avg, avg, 1.0;
SUB avg_, 1.0, avg;

#bloom bright areas

MUL curRend, curRend, avg;
MAD curRend, bloom, avg_, curRend;

#modify brightness
SUB curRend, curRend, 0.2;
MUL curRend, curRend, 1.1;
ADD curRend, curRend, 0.25;

#reduce red and green values
SUB curRend.r, curRend.r, 0.03;
SUB curRend.g, curRend.g, 0.02;

#brighten bright areas
SUB des, curRend, 0.2;
MAX des, des, 0;
MUL des, des, 6;
MAD curRend, des, avg, curRend;



# store result
MOV result.color.xyz, curRend;
MOV result.color.w, 1.0;

END

The shader desaturates bright areas. Than it changes the brightness, by darkening dark areas and brightening bright areas. Bright areas get bloomed out a bit more and then brightened a bit more. Red and green color values get reduced during these steps.

 

In addition there are particle effects used on the lights which increases the bloomy effect.

 

To compensate the darkness, there is a non-shadowcasting light attached to the player using ambient_biground. It's a white light of brightness 30 which causes this distance occlusion like effect. In the mission the lightgem modifier would have to be adjusted to compansate this. I didn't do this here as it is just for testing.

I was thinking about a monochrome FM, and now watching that, I bet it'd make a real impression with B&W because it'd make the whites really stand out & almost washout. It's not for everything, but if you want to make a stylized visual impression for a gimmick artistic FM it'd be interesting to play with.

This is actually pretty easy.

 

For black and white the shader would look as following:

!!ARBvp1.0
OPTION ARB_position_invariant;

END

!!ARBfp1.0
OPTION ARB_precision_hint_fastest;

TEMP X;

# get current position on screen
MOV X, fragment.position;
MUL X, X, program.env[1];
MUL X, X, program.env[0];

# get current render image
TEX X, X, texture[0], 2D;

#compute brightness
ADD X.x, X.x, X.y;
ADD X.x, X.x, X.z;
MUL X.x, X.x, 0.33;

#store brightness as screen color
MOV result.color, X.x;

END

If the bright areas look too bright, you can manipulate the brightness, too.

 

For monochrome, you would have to get the color value from the brightness. If you want sepia for example, the RGB values relates to each other like 4-2-1;

MUL X.r, X.r, 4.0;
MUL X.g, X.g, 2.0;
MOV X.b, X.b;
MUL result.color.rgb, X.rgb, 0.14;

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Sepia looks like this:

post-11230-0-96150100-1393847287_thumb.jpg

post-11230-0-10202300-1393847312_thumb.jpg

  • Like 3

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Oh, and here I was thinking I'd have to manually edit textures like Thief Noir. That saves some time.

I should do this for some random FMs sometime.

Now all I need is a filter for old film scratches.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Yep, it's pretty easy. The only thing to keep in mind is that the shader only applies to the 3D scene. The gui (inventory, weapon icons, lightgem and readables etc..) are not affected by that. But that is relatively easy to do (but still a bit time-consuming).

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I disagree, there's not greater beauty than fun game-play!

 

Happy to share the details and test map in another thread if people want them.

 

Yes please, or could it simply be a prefab? (Discounting the leaf connecting tubes for the lights-that-shall-be-avoided.)

 

My next map I'd not started on yet, as cloud shadows would be a key element.

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

You correctly identified the main thing that can't be prefabbed: glitch-free parallel lights across big exteriors. But if my "caulk tube" method proves robust, then the situation is quickly fixable in DR for anyone who can be bothered, which I guess includes all mappers. I'd not attempt to release a solution with that requirement at work!

 

The skybox can easily be prefabbed (stars/moon and cloud layers). But if people wanted to use a custom earth layer in the skybox like I have above, they'd have to re-render the stars layer too, as the only way to add a horizon glow to the scene without screwing up the alpha of the earth layer is to render the horizon glow in the starry backdrop. For a "normal" skybox without a visible horizon, it would be fine. Only thing is, it needs a custom entityDef and custom textures for the cloud layer at least, and about 20 lines of script. Can those be packaged in a prefab?

Edited by SteveL
Link to comment
Share on other sites

Can you pm me a link to a test map using this? I would like to take a look as this idea is really cool (I never thought about such a thing). Maybe the approach can be easened so it is packageable as a prefab. This is gold for any FM playing outdoor and adds a complete new dimension towards the things the player has to be aware of.

 

Good work btw. :)

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

If i see it correctly the whole map lights up if the moon is not blocked by a cloud. You can also try to use a cloud texture for the ambient light, with dark and lighter areas. Ive done this and it works pretty well except for that it is obvious on tall buildings that the projection is top down.

Link to comment
Share on other sites

With the ambient light method though (which I had in my first map), how do you coordinate the texture so the player can look up and see when the next change is coming?

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

If i see it correctly the whole map lights up if the moon is not blocked by a cloud. You can also try to use a cloud texture for the ambient light, with dark and lighter areas. I've done this and it works pretty well except for that it is obvious on tall buildings that the projection is top down.

 

That's right. There's no cloud shadows involved. A script checks the alpha value of the cloud layer over the moon every 2 seconds and adjusts the level of the main moonlight accordingly. I take it your ambient texture idea would fake the line of darkness crossing an open area too?

 

Can you pm me a link to a test map using this? I would like to take a look as this idea is really cool (I never thought about such a thing). Maybe the approach can be easened so it is packageable as a prefab. This is gold for any FM playing outdoor and adds a complete new dimension towards the things the player has to be aware of.

 

Good work btw. :)

 

Thanks! I'll share a map tomorrow. I've sketched out an idea that'll let me test and demo the single-moonlight-for-whole-map trick, plus this variable moonlight effect. I plan to put in test buttons that'll turn on and off individual visportals in the ceiling. But if I don't get that done in time, I'll let the people who've asked to see it have a stripped-down copy of the map above -- the reason I haven't just posted that map is that it's got loads of my custom textures and stuff embedded right through it plus spoilers for my WIP.

Link to comment
Share on other sites

With the ambient light method though (which I had in my first map), how do you coordinate the texture so the player can look up and see when the next change is coming?

 

I'll have a guess: The ambient texture would be made from your cloud layer, offset by the right amount for the angle of the moonlight. Then you give it the same translate (scroll) parameters as the cloud layer. I used a similar method in the varying moonlight example. The script knows what coords to check on the alpha map because it has the same formula for calculating cloud displacement as is used in the cloud shader itself: system time * a couple of constants. That means there's no need to keep them in sync. They resynchronise to the system clock every couple of seconds.

Edited by SteveL
Link to comment
Share on other sites

 

Ive just uploaded a replacement, but bloody youtube keep downgrading the qaulity of the video so it looks shit.

Sony vegas and adobe premier both has settings wich results in hd youtube clips-

First, theres project settings: hd 720/30fps. And second- output as hd 720 wmf-file. There tuturial on youtube wich explains it nicely.

What excuse do we have not to sculpt, and sculpt, and sculpt, until the job is done?

Link to comment
Share on other sites

Hey Shadowhide,

 

Looks really good! One small nitpick on the last picture is that the window in the center has a texture with a slat of wood running diagonally across it which looks weird running behind the window (probably better to just use a texture with wood around the edges).

  • Like 1

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

Nice work there, Shadowhide - looking forward to this! :)

Did you already make use of the mystic firefly script you once developed? I remember reading of it some year ago.

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

thanks everyone!

 

@Moonbo:yeah,thats a good suggestion,I'll change it

 

@SeriousToni:magic firefly was used in the both of my released fm's,its just a mover with particle effect bound to it thats moves alonge the spline path,so there is nothing special about it

Edited by Shadowhide

Proceed with caution!

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

    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
×
×
  • Create New...