Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

Im working on some bush and grass models and was intrigued by this: http://wiki.thedarkmod.com/index.php?title=Alpha-fading

 

It says "So there is no way to make models to appear fading-in, or fading-out, except by varying the alpha threshold. Together with a good alpha map with ramps, this can make things appear to burn-away (an effect used by D3 f.i. for the imps "burning" away after you killed them), or to "grow thinner" with distance." This part seems very ambiguous to me. Can you have gradual transparency (fading) for a texture image with an alpha channel?

 

PS: Anyone remember the shader code to make foliage materials move around a little (to simulate wind)?

Edited by RPGista
Link to comment
Share on other sites

Opacity in D3 is either 0% or 100% (barring special blend modes). But the value you put on the alphatest stage can modify how the texture determines which part of the alphamap should be 100%.

 

Imagine the image below is a transparent mask. If you add alphatest 1 to the material, everything not pure white will appear transparent. If you add alphatest 0.5, anything not white or grey will appear transparent. That essentially changes the amount of grass showing by what alphatest value you use, so it can look like fading with distance, even though any individual blade of grass is either 100% visible or 0% visible.

 

PS: Anyone remember the shader code to make foliage materials move around a little (to simulate wind)?

 

 

 

 

Something like this:

 

translate 0.01 * sintable [ time * 0.1], 0.03 * sintable [ time * 0.03]

post-9-0-08104300-1535833807.jpg

  • Like 1
Link to comment
Share on other sites

Well, thats a shame, that article got my hopes high there for a second... Thanks a lot for all this info, Springheel. Im making a few of those low poly bush models wth transparent images, to help with grassy areas.

Link to comment
Share on other sites

Im working on some bush and grass models and was intrigued by this: http://wiki.thedarkmod.com/index.php?title=Alpha-fading

 

It says "So there is no way to make models to appear fading-in, or fading-out, except by varying the alpha threshold. Together with a good alpha map with ramps, this can make things appear to burn-away (an effect used by D3 f.i. for the imps "burning" away after you killed them), or to "grow thinner" with distance." This part seems very ambiguous to me. Can you have gradual transparency (fading) for a texture image with an alpha channel?

 

PS: Anyone remember the shader code to make foliage materials move around a little (to simulate wind)?

http://forums.thedarkmod.com/topic/14394-apples-and-peaches-obsttortes-mapping-and-scripting-thread/?p=318798

 

Regarding P.S.: https://www.iddevnet.com/doom3/materials.php

(Read through the chapter "Deforms")

  • Like 1

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

How big a distance unit is? What is the height of an average human model in units? Are there any limits of the map size in units?

Theres a very useful article on this, all your questions are answered there:

http://wiki.thedarkmod.com/index.php?title=Limits,_Max,_Min,_Stats,_etc

 

Ps: I keep forgetting to check your tutorials Obs, they full of interesting stuff!

Edited by RPGista
Link to comment
Share on other sites

Okay, this one's driving me crazy. s.urfer found this during beta testing. My patrolling guard won't notice an unconscious guard unless he is right in the way of the path. Here's an example of an unconscious guard being ignored, dude walks right past him:

 

 

The patrolling guard only reacts if I put the unconscious guard right in his path, so he actually bumps into him.

 

I checked the spawnargs on the guards, everything looks good. I'll keep experimenting, but if anyone knows what's going on here, I'd really appreciate it.

 

Jeff

 

 

Link to comment
Share on other sites

Not enough light on the body. To show it's the lighting, put a temporary bright light over that spot and drop the body under it. If the patrolling guard still can't see the body, something else is wrong.

Remember that what you see on the screen in terms of brightness isn't what the AI see.

Link to comment
Share on other sites

It certainly looks deceiving if it's a light issue, since there's enough light hitting to cause a visible shadow.

Link to comment
Share on other sites

Yep, the downed guard is in clear view, right under a light... It would be fine if the other guard was walking around on the other side of the room, pretty far away, maybe he wouldnt notice it. But he walks right next to him. If its a matter of AI simply being not able to see it at this light level, I think some adjustments should probably be made. Any player would expect the AI to be able to see roughly the same as himself. But maybe joebarnin is playing on the "near blind" settings?

Link to comment
Share on other sites

Yep, the downed guard is in clear view, right under a light... It would be fine if the other guard was walking around on the other side of the room, pretty far away, maybe he wouldnt notice it. But he walks right next to him. If its a matter of AI simply being not able to see it at this light level, I think some adjustments should probably be made. Any player would expect the AI to be able to see roughly the same as himself. But maybe joebarnin is playing on the "near blind" settings?

I had completely forgotten about those settings. My AI Vision is set to Forgiving (which I think is the default?). I'll try variations of that and see what happens.

 

I've been experimenting with different types of lights, and different brightness settings. No luck yet figuring out why this behavior is happening. One thing I noticed is that the desk light was originally a light created with the "Create Light" command (as opposed to an light entity created with "Create Entity..."). I thought that might be the issue, but I'm not sure. Even switching to a light_lamp_desk, the patrolling guard is pretty oblivious. Anyway, I'll keep experimenting.

Link to comment
Share on other sites

Okay, now I understand why it is happening. I've got a func_static lamp on the desk (models/darkmod/lights/non-extinguishable/lamp_desk_01). I put a light near this lamp - the issue is the exact placement of the light. If I put the light 'within' the lamp (under the lamp shade), that's when the problem happens. In DarkRadiant, here's the 'bad' positioning of the light (the light is selected):

 

post-2024-0-32116700-1536535423_thumb.jpg

 

With the light in that position, guard pretty much don't see an unconscious guard at all.

 

But when I move the light so that it is just above the lamp:

 

post-2024-0-02121000-1536534592_thumb.jpg

 

things work as expected (unconscious guards are spotted).

 

To the player, it looks more-or-less the same (slightly different shadow positions). But to the AI, it's as if the light isn't there (in the former example).

 

Maybe by putting the light entity 'within' the lamp, it was inside the model or something? Anyway, I've got a solution so I'm happy. Let me know if I'm doing something totally wrong, or if there is additional experimentation I can do.

 

Link to comment
Share on other sites

  • 2 weeks later...

Question: when a trigger_once ambiance (a non-looping speaker that gets triggered once) is played during my testing, pausing the game and then unpausing it will stop the ambiance from playing. Which I obviously don't want that to happen as the music sets the tone of the starting area where it's played. So how would I do to prevent the ambiance from cutting off when I pause and unpause the game? Remove the menu music entirely?

Link to comment
Share on other sites

I've noticed this happening with in game conversations either. I am not sure whether it is realated to the menu music, as I have it disabled iirc and it still occours. Still a bug, though.

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

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  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • 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
×
×
  • Create New...