Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

On a sidenote, some more for the record:

crossFadeEntity($entity, '1 0 0', '0 1 0', 2);

- gradually changes the _color of a colorme textured object or a light from red to green within 2 seconds.

 

Where are you getting this from?

 

I can't find it.

Link to comment
Share on other sites

target_fadeEntity changes the coloring of an entity that uses the _color spawnarg.

 

It doesn't change the transparency of an object.

 

So, at this point, the only apparent way to do it is to create a set of increasingly transparent shaders for the object you want to fade, and cycle through them using a script.

 

Or use Obs' time-based transparency method on a new set of shaders skinned to the object.

Link to comment
Share on other sites

 


For the other, that the glowing patch needs to be slightly behind the ordinary-looking patch, so at the moment you can't really have the glow effect on models. Would there be a way to make the ordinary texture override the glow texture so they can be in the same space?

Should be possible. The material back in the day was just a proof-of-concept.

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

Where are you getting this from?

This was under scripts/tdm_util.script, next to a couple other _color fades which start or end at black.

 

 

target_fadeEntity changes the coloring of an entity that uses the _color spawnarg.

 

It doesn't change the transparency of an object.

Does the script only accept 3-figure vectors? The screen-fade entities use idVec4 vectors where the 4th number sets the transparency - that's just for an overlay and not a shader, but you did see earlier that the FadeEntity code deals with alpha in some way.

Link to comment
Share on other sites

It may only set the alpha value in the respective shaders, then. Applying an alpha value to an entity doesn't make it transparent, though. Transparent objects are handled differently then opaque ones in the engine. So if you want an entity to fade away, you really have to set it up for that purpose. This means you have to use custom shaders as well as some scripting.

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

Strange, I thought that fading out objects would be a common action, especially in shooting games like Doom where clutter like downed enemies needs to disappear to free up performance. So far it looks like Doom just abruptly deletes such things.

 

Would be most effective if the script could assign an alpha to a material at runtime, but as far as I'm aware scripts can't influence materials. No matter what, I'm more than pleased with the options that are already available.

Link to comment
Share on other sites

I'm not sure if this is the right place to ask, but what happened to the belchers? There's still an entry in the wiki, but after searching the forums for a while I found no further mentions of them for years. I remember seeing videos of them in game a long time ago. Are they still going to be included in the game at some point?

Link to comment
Share on other sites

I'm not sure if this is the right place to ask, but what happened to the belchers? There's still an entry in the wiki, but after searching the forums for a while I found no further mentions of them for years. I remember seeing videos of them in game a long time ago. Are they still going to be included in the game at some point?

 

No belchers at this point.

 

I don't know if there was some decision before I joined to exclude them, but any plan to include them in the future will require people to step up and model, skin, animate, provide code support, and provide sounds.

Link to comment
Share on other sites

There were kinda-sorta working fire elementals somewhere, no?

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Strange, I thought that fading out objects would be a common action, especially in shooting games like Doom where clutter like downed enemies needs to disappear to free up performance. So far it looks like Doom just abruptly deletes such things.

 

Would be most effective if the script could assign an alpha to a material at runtime, but as far as I'm aware scripts can't influence materials. No matter what, I'm more than pleased with the options that are already available.

There are script commands to alter shaderParms. The rest must be done by the shader.

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

Has anyone successfully used spectrum? I've taken a stock material and added the line spectrum 1 to it - the result was that it's pure black in normal light, so always visible. When you bring a spectrum 1 light it does light up properly.

 

textures/darkmod/wood/panels/panel_carved_round_worn_spectrum

 

 

{
wood
spectrum 1

qer_editorimage textures/darkmod/wood/panels/panel_carved_round_worn_ed
diffusemap textures/darkmod/wood/panels/panel_carved_round_worn
bumpmap textures/darkmod/wood/panels/panel_carved_round_worn_local

{
if ( parm11 > 0 )
blend gl_dst_color, gl_one
map _white
rgb 0.40 * parm11
}
{
if ( parm11 > 0 )
blend add
map textures/darkmod/wood/panels/panel_carved_round_worn
rgb 0.15 * parm11
}

// TDM Ambient Method Related
{
if (global5 == 1)
blend add
map textures/darkmod/wood/panels/panel_carved_round_worn
scale 1, 1
red global2
green global3
blue global4
}
{
if (global5 == 2)
blend add
program ambientEnvironment.vfp
vertexParm 0 1, 1, 1, 1 // UV Scales for Diffuse and Bump
vertexParm 1 1, 1, 1, 1 // (X,Y) UV Scale for specular
vertexParm 2 global2, global3, global4, 1

fragmentMap 0 cubeMap env/gen1
fragmentMap 1 textures/darkmod/wood/panels/panel_carved_round_worn_local // Bump


fragmentMap 2 textures/darkmod/wood/panels/panel_carved_round_worn // Diffuse


fragmentMap 3 _black // Specular
}
}

 

 

 

 

Decals don't seem to be affected by spectrum at all. For all those I've tested, even generic wall stains, inserting the spectrum 1 line makes no difference, they behave just like the originals.

 

textures/darkmod/decals/dirt/footprint01r_spectrum

 

{

DECAL_MACRO
noimpact
spectrum 1

{
blend gl_zero, gl_one_minus_src_color
map textures/decals/footprint01r_d.tga
clamp // we don't want it to tile if the projection extends past the bounds
rgb decalFade[(time - Parm3)/(parm4 - parm3)]
vertexColor // oblique projections will be slightly faded down
}
}

 

 

[spectrum 2 gets the same results as spectrum 1.]

 

 

Also, leaving spectrum aside for now, the footprint decals - textures/darkmod/decals/dirt/footprint01 and footprint 01r - behave very strangely. I've cloned a dense and regular pattern of footprint patches all over a room and only about every 8th footprint shows up, some are extremely faint. This still happens even when I use a monotonous floor texture, baize green.

Edited by Dragofer
Link to comment
Share on other sites

How can I use a variable in a displayed message? I have created a message entitiy to give the player a response on how many special loot he has found, yet, and want this message to give the current amount. The number is already defined in a script, but entering the variable only displays the message with varibale's name. So, how can the message know that it should display the value and not the name of a variable?

Also: How can I change the message not to be displayed on the parchment in the corner but rather in the design of a "Object competed" in white letters in the center of the screen?

Link to comment
Share on other sites

Has anyone successfully used spectrum? I've taken a stock material and added the line spectrum 1 to it - the result was that it's pure black in normal light, so always visible. When you bring a spectrum 1 light it does light up properly.

 

textures/darkmod/wood/panels/panel_carved_round_worn_spectrum

 

 

{

wood

spectrum 1

qer_editorimage textures/darkmod/wood/panels/panel_carved_round_worn_ed

diffusemap textures/darkmod/wood/panels/panel_carved_round_worn

bumpmap textures/darkmod/wood/panels/panel_carved_round_worn_local

{

if ( parm11 > 0 )

blend gl_dst_color, gl_one

map _white

rgb 0.40 * parm11

}

{

if ( parm11 > 0 )

blend add

map textures/darkmod/wood/panels/panel_carved_round_worn

rgb 0.15 * parm11

}

// TDM Ambient Method Related

{

if (global5 == 1)

blend add

map textures/darkmod/wood/panels/panel_carved_round_worn

scale 1, 1

red global2

green global3

blue global4

}

{

if (global5 == 2)

blend add

program ambientEnvironment.vfp

vertexParm 0 1, 1, 1, 1 // UV Scales for Diffuse and Bump

vertexParm 1 1, 1, 1, 1 // (X,Y) UV Scale for specular

vertexParm 2 global2, global3, global4, 1

 

fragmentMap 0 cubeMap env/gen1

fragmentMap 1 textures/darkmod/wood/panels/panel_carved_round_worn_local // Bump

 

fragmentMap 2 textures/darkmod/wood/panels/panel_carved_round_worn // Diffuse

 

fragmentMap 3 _black // Specular

}

}

 

 

 

 

Decals don't seem to be affected by spectrum at all. For all those I've tested, even generic wall stains, inserting the spectrum 1 line makes no difference, they behave just like the originals.

 

textures/darkmod/decals/dirt/footprint01r_spectrum

 

{

DECAL_MACRO

noimpact

spectrum 1

{

blend gl_zero, gl_one_minus_src_color

map textures/decals/footprint01r_d.tga

clamp // we don't want it to tile if the projection extends past the bounds

rgb decalFade[(time - Parm3)/(parm4 - parm3)]

vertexColor // oblique projections will be slightly faded down

}

}

 

 

[spectrum 2 gets the same results as spectrum 1.]

 

 

Also, leaving spectrum aside for now, the footprint decals - textures/darkmod/decals/dirt/footprint01 and footprint 01r - behave very strangely. I've cloned a dense and regular pattern of footprint patches all over a room and only about every 8th footprint shows up, some are extremely faint. This still happens even when I use a monotonous floor texture, baize green.

Spectrum alters how surfaces get rendered in dependence to light. If the light don't match the spectrum of the surface material, the interaction wont get drawn. Decals are processed in a different way in the engine, so this may cause the spectrum spawnarg not to apply there.

 

Regarding the footprints, depending on how the material is defined, you may have to place them slightly above the underneath surface to avoid z-fighting.

 

How can I use a variable in a displayed message? I have created a message entitiy to give the player a response on how many special loot he has found, yet, and want this message to give the current amount. The number is already defined in a script, but entering the variable only displays the message with varibale's name. So, how can the message know that it should display the value and not the name of a variable?

Also: How can I change the message not to be displayed on the parchment in the corner but rather in the design of a "Object competed" in white letters in the center of the screen?

You have to write your own gui file for that. The gui that get's used is set in a spawnarg on the messge entity. There are script commands to alter gui parms, which could then be shown in the message. So your gui file needs a float as well as the specific code to put the message together.

 

If it should look like the objectives complete message, I would suggest starting with that gui file (rename it ;) ) and alter it to gain the desired effect.

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

Would be most effective if the script could assign an alpha to a material at runtime, but as far as I'm aware scripts can't influence materials. No matter what, I'm more than pleased with the options that are already available.

Scripts can use setShaderParm() to do this, and the material can set alpha using parm3 (or whichever). It'd also need the translucent keyword, and I don't think it would cast shadows unless your model has a shadow mesh.

 

Edit: I don't think this will work, on second thoughts. Translucent materials are drawn as an additive blend and they ignore the alpha channel. You could do it as a custom blend material, but it wouldn't be lit it'd be fullbright.

Link to comment
Share on other sites

So, how can the message know that it should display the value and not the name of a variable?

Since you're already using a script, try using $messageEntityName.setKey() to put your variable's value into the spawnarg that holds the text to be displayed.

Link to comment
Share on other sites

You have to write your own gui file for that. The gui that get's used is set in a spawnarg on the messge entity. There are script commands to alter gui parms, which could then be shown in the message. So your gui file needs a float as well as the specific code to put the message together.

 

If it should look like the objectives complete message, I would suggest starting with that gui file (rename it ;) ) and alter it to gain the desired effect.

 

I saw the "gui" spawnarg, but have not worked with them, yet. Well, a first for everything... Thanks!

 

Since you're already using a script, try using $messageEntityName.setKey() to put your variable's value into the spawnarg that holds the text to be displayed.

 

Right, I knew that it is possible to set spawnargs via script, but did not think of changing the whole displayed message. I will try that. Thank you!

Link to comment
Share on other sites

Speaking of alpha matters, I'm playing with a custom lightgem. Making the thing is easy, well the 32 things. And just dropping them in the right folder with the same file names works fine to supercede them. The problem is I've used 2 dds converters (and the game won't recognize tga's or png's), checking the box to keep the alpha transparency, and the first one shows up in game with the transparent parts still white, in the 2nd they show up in game entirely white. I'm thinking something more basic may be wrong, but I don't know what else I can do. I have to convert them, and there's just the one checkbox for transparency. I don't know what else I can even do.

  • Like 1

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

Speaking of alpha matters, I'm playing with a custom lightgem. Making the thing is easy, well the 32 things. And just dropping them in the right folder with the same file names works fine to supercede them. The problem is I've used 2 dds converters (and the game won't recognize tga's or png's), checking the box to keep the alpha transparency, and the first one shows up in game with the transparent parts still white, in the 2nd they show up in game entirely white. I'm thinking something more basic may be wrong, but I don't know what else I can do. I have to convert them, and there's just the one checkbox for transparency. I don't know what else I can even do.

 

Use ATI Compressonator for Doom 3. Make sure that your DDS is DXT5.

 

http://darkmod.taaaki.za.net/tools/ati_compressonator_v1.21.zip

 

Feel free to supply me with a source image and I can happily supply a working conversion.

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

There is a gui explicitly for what I wanted called "tdm_message_no_art.gui", so this was very easy, as soon as you know what to do :-)

 

The script also worked, although I had a few hiccups due to my very little scripting experience. For example I did not know that the spawnarg you want to change has to be set in quotation marks. And for the text to be displayed, it also took some time to get, where to put quotation marks and where not, but it works right now and that is all that matters :-) Thanks again for the help.

Link to comment
Share on other sites

And for the text to be displayed, it also took some time to get, where to put quotation marks and where not, but it works right now and that is all that matters :-) Thanks again for the help.

Cool. Feel free to post a line of code if you want any help. You can't use quotation marks in the text to be displayed, but it'd look something like this:

 

$messageEnt.setKey("spawnargName", "You have " + myFloatVariable + " widgets");

  • Like 1
Link to comment
Share on other sites

Spectrum alters how surfaces get rendered in dependence to light. If the light don't match the spectrum of the surface material, the interaction wont get drawn.

Spectrum light does interact properly with spectrum materials, but when the spectrum light goes away the material becomes pitch black - I was expecting that it'd become invisible.

 

I was wondering whether I need to change something else in the material definition, i.e. add an alpha. Unfortunately Katsbits has nothing at all on spectrum.

 

Decals are processed in a different way in the engine, so this may cause the spectrum spawnarg not to apply there.

There simply must be spectrum decals, that's the best part! Nothing like ghostly writings or runes to lead you to obscure locations or give story clues. Besides, the example material the Wiki points to is a pentagram decal.

 

Regarding the footprints, depending on how the material is defined, you may have to place them slightly above the underneath surface to avoid z-fighting.

It's not z-fighting - my test setup had footprints both on and over the floor. Most were invisible, the few visible ones ranged from almost invisible yellow to bright red to dark purple; the height didn't make a difference. Probably belongs into the bug tracker.
Link to comment
Share on other sites

Remove the rgb line from the material of the ffotprints.

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

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