Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

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
Posted

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
Posted

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.

Posted

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

Posted (edited)

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
Posted

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

 

 

Posted

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.

Posted

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?

Posted

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.

Posted

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.

 

Posted

If you use the light that comes with its own desk lamp, it should work fine, because the code that checks whether light is falling on the body will skip the lamp model.

  • 2 weeks later...
Posted

How can I replace the music in the main menu?

 

I don't get it; I have checked the structure of both Volta 1 & 2 and NHAT but was not even able to find the folder with the relevant ogg file.

Posted

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?

Posted

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

Posted

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.

 

 

Darn :/

Posted

btw anyone know how the grass edge textures works? Do I apply fund_static on world spawn with edge textures then lay directly ontop of the grass/nongrass textures or?

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...