Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

I recently played COS0 and I have to say I very impressed by the breadth of variation @Bienie got simply by mixing new materials into the prepackaged modules by writing new skin definitions for them using base materials. HitS used a lot of these modules as well, so you may find that is a good approach to get more variation for your project without having to dive into authoring lots of brand new materials.

  • Like 1

-=  IRIS  =-    ♦    = SLL =

Link to comment
Share on other sites

3 minutes ago, Wellingtoncrab said:

I recently played COS0 and I have to say I very impressed by the breadth of variation @Bienie got simply by mixing new materials into the prepackaged modules by writing new skin definitions for them using base materials. HitS used a lot of these modules as well, so you may find that is a good approach to get more variation for your project without having to dive into authoring lots of brand new materials.

Yes I'm doing this as well in HITS2 and my 'other' map.  My main gripe is the lack of options for interiors (wallpaper and plaster), so it would be nice to have a few more options there.

I read your other post, and indeed it sounds pretty complicated - I was hoping it wouldn't be 😞

Link to comment
Share on other sites

If you need some simple plaster diffuse and normal maps to mix into the mesh you might get away with just using some the material maps “as is” from here: https://ambientcg.com/ . You might be able to play with the roughness maps to get a working specular which gets some of the high frequency detail back in as well.

-=  IRIS  =-    ♦    = SLL =

Link to comment
Share on other sites

On 12/22/2021 at 4:32 PM, Wellingtoncrab said:

What is much more difficult when starting with a pre made image is then generating convincing specular and bump maps for it. [...] you basically need to convert your image into a pair of grey scale images - one that roughly reflects the height information of the image and another which which represents the reflective properties - in each case white being the highest value and black the lowest. [...] You can use programs like bitmap2material or quixel mixer which have tools designed to generate these maps semi automatically from 2d images.

Nice to hear about these tools, as well as Substance Painter. Like @Frost_Salamander, I looked at the old TDM Texture basic tutorial page and found it wanting. Definitely a fresher tutorial would be helpful. Though it did point me to njob, which while old and simple-minded, was just simple-minded enough for me to use with my photo (of laundry, for a hamper).

I still don't know what tool would be good if I ever needed to make a new 1D or 2D tiled texture.

Edited by Geep
typo
Link to comment
Share on other sites

1 hour ago, Geep said:

Nice to hear about these tools

https://store.steampowered.com/app/326050/Bitmap2Material_3_Professional_Upgrade/

I think the best tool for a beginner who needs to make legacy shaders from 2d images is actually a piece of legacy software called bitmap2material designed to do exactly this - it even has tools to convert non-titling textures into tiling ones - results will always vary depending on the input. This software has since been replaced by a piece of software I have not used called "substance alchemy"  which they locked behind a pricey adobe subscription.

I also personally recommend Quixel Mixer over substance painter - as it is free and in my opinion easier to use as result of being more constrained, though that may be a personal preference. I also prefer the scanned materials of quixel to the fully procedural ones of substance painter but that is kind of irrelevant in this use case as my interpretation of the licensing agreements would be basically you are not allowed to use the bundled materials to make and distribute new tiling materials - so you need to import your own from say https://ambientcg.com/.

I have made A LOT of materials for my mission with these tools, some of which I am very happy with and others not so much. Like all things TDM I have always put off trying things out of fear they were too complicated for my mortal brain to comprehend, only to find after diving in with a little practice and patience you get over the initial frustration and quickly arrive at the conclusion it's not as bad as you'd feared. 

  • Like 1

-=  IRIS  =-    ♦    = SLL =

Link to comment
Share on other sites

19 hours ago, Geep said:

i don't think you can actually acquire base bitmap2material through that link anymore.

That’s too bad. Since I already owned it I could not tell it was not for sale anymore - I only bought it last year!

While as I stated I really like quixel mixer, I don’t think it’s a completely suitable replacement for what bitmap2material does when it comes to specifically turning a single 2d image into a tiling material, which is what the original post is after. It does have an image to height filter which can work absolutely great with some images, and I would recommend it if your approach is going to be making brand new textures by combining existing materials.

If you are starting with just a 2d image something much closer to bitmap2material that I have also used is Materialize:

http://www.boundingboxsoftware.com/materialize/index.php

It even had some advantages over bitmap2material, like being able to use targeted color information to influence the height map, so in some circumstances it can generate much more accurate height maps and I think the tiling filters are a little better, but that is always a crapshoot based on the input image. It doesn’t have the feature to interpolate or combine multiple height maps like bitmap2material and at the time I was using it it was rigidly locked to exporting maps in a 1:1 ratio, and my favorite TDM materials are usually 2:1 so I couldn’t hang with it.

 

Edited by Wellingtoncrab
  • Like 1

-=  IRIS  =-    ♦    = SLL =

Link to comment
Share on other sites

  • 2 weeks later...
On 12/22/2021 at 10:41 PM, Frost_Salamander said:

Yes I'm doing this as well in HITS2 and my 'other' map.  My main gripe is the lack of options for interiors (wallpaper and plaster), so it would be nice to have a few more options there.

I read your other post, and indeed it sounds pretty complicated - I was hoping it wouldn't be 😞

One way to introduce more variability with only medium effort would be to create skins that allow for the use of the "color" spawnarg. I have already done that for a couple of Spingheel's modules, but unfortunately lost the files in a hard disk crash some time ago. Here is the thread about this topic:

 

  • Like 1
Link to comment
Share on other sites

I started learning some blender last week and made a little caracter and thought; why not try to get that working in TDM. With a lot of fiddling around I got a custom texture/material working, and also the character/rig/mesh and an animation.
But my little square beatle keeps floating above ground somehow, and I seem to be out of options. I tried changing the origin bone in blender for the mesh and the animation and also changing the aas_rat "size" in the .def file and some other things, but it keeps floating:
STRUNK_2022-01-06_13.22.29.jpg

Is there something I can put in the .def to change offset or something else you can think about?

  • Like 3
Link to comment
Share on other sites

Just posting in case it's useful:

I have been looking at a procedural PBR texture program:

https://www.materialmaker.org/   (this has a database of premade pbr's that you can load in and alter, if you wish)

Screenshot of a premade pbr stoneground in-game:

Spoiler

stone-floor.thumb.jpg.2dcd4de042aff4fec37098daba77645b.jpg

It is multiplatform (Mac, Linux, Win) . exports to normal, height, albedo, etc. (png format), but I don't see a way to make a specular map. With it you can also load in an existing texture and then create the normalmap of it. I did some test with a wooden floor texture, but it's difficult to see what the result should be and if I'm doing it right (maybe wood is not a good test because of it's specific complexity in the wood pattern). I mean it looks pretty good, but the effect of the bumpmap is so subtle, that I have a hard time seeing the difference with when I remove it from the material.

Wood texture in-game:

Spoiler

wood-floor.thumb.jpg.f8da93f90522964ecf5aadeb40f7aa89.jpg

Spoiler

bumpmap.jpg.3b676767e9fd9356141179169325a80b.jpg

Creating the material is pretty easy, nice to know how this works.

Spoiler

I use the exported albedo file as the defusemap, from that I create a smaller jpg image as the editor image and the exported normalmap becomes the bumpmap.

textures/wf6 {
    qer_editorimage textures/wf6_ed
    diffusemap      textures/wf6
    bumpmap         textures/wf6_local


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

 

}

I use tga files. Is it necessary to create dds from them? Is 1024x1024 still the recommended texture size?

Edited by datiswous
Link to comment
Share on other sites

So what is a recommended highres texture resolution? I mean there is a high limit right? I thought I read somewhere in the wiki about 1024 px, maybe this is outdated. Also I had a problem of the editor image of 256x256 px not showing correctly in DR, so I make them 512x512.

Edited by datiswous
Link to comment
Share on other sites

32 minutes ago, datiswous said:

 but I don't see a way to make a specular map.

Programs to create PBR materials do not create specular textures, those are old technique and only used in non PBR system, you will see these programs, create a roughness or metalness map, those replaced specular maps, look here on how to convert PBR materials, more or less, to non PBR engines like TDM.

Adapting_PBR_Textures_to_Source 

With it you can also load in an existing texture and then create the normalmap of it. I did some test with a wooden floor texture, but it's difficult to see what the result should be and if I'm doing it right (maybe wood is not a good test because of it's specific complexity in the wood pattern). I mean it looks pretty good, but the effect of the bumpmap is so subtle, that I have a hard time seeing the difference with when I remove it from the material.

Normal maps alone don't sell the illusion, specially if the bumps are relatively small, it also needs a specular map to make the bumps more obvious.  Just don't exaggerate on the specular or the surface will look like glass or plastic.  

I use tga files. Is it necessary to create dds from them?

DDS is not required, those are just used to make the level RAM footprint small and try to make level/map/mission load faster, afaik if you have texture compression on, tga's are compressed/optimized in real time, at level load and that takes times, don't take my word for it, but in my own testing, if you have 16GB of RAM or more, disabling compression seems to make missions load a tad faster. 

Is 1024x1024 still the recommended texture size?

Really depends on what GPU's you want to support, most modern GPU's have 4GB or more of VRAM, mine has 8GB, so imo today 1024x is like 256x in the age of 1GB or 2GB GPU's, but please don't go putting 2k textures or more, into very small objects, you will just waste GPU power, resources and performance for something that is hardly visible. 

 

Edited by HMart
  • Thanks 1
Link to comment
Share on other sites

11 hours ago, STRUNK said:

I started learning some blender last week and made a little caracter and thought; why not try to get that working in TDM. With a lot of fiddling around I got a custom texture/material working, and also the character/rig/mesh and an animation.
But my little square beatle keeps floating above ground somehow, and I seem to be out of options. I tried changing the origin bone in blender for the mesh and the animation and also changing the aas_rat "size" in the .def file and some other things, but it keeps floating:
STRUNK_2022-01-06_13.22.29.jpg

Is there something I can put in the .def to change offset or something else you can think about?

Is the character mesh itself well positioned in blender? Meaning its feet touch the grid "ground", is the origin bone exported at (0, 0, 0), in line with the character feet?

If you don't already know it, see if this video helps you, is not for blender nor TDM but is for Doom 3 so it should help some.

https://www.youtube.com/watch?v=DGdv6a505qk

 

Link to comment
Share on other sites

If you're going to be making textures from scratch,  err on the side of too big. We can always resize them. This game should be around for another 20 years (hopefully) and in the future, even our integrated graphics will have access to dozens of gigabytes of RAM and be as powerful as the discreet GPUs of today.

EDIT 2: This is not debatable, look at the progress of APU's in the last 3-4 years already.
And the new AMD APU's are going to have what, 12 CU's of RDNA2, the same GPU that's in the Radeon 6000 graphics cads. (6700XT, 6800XT, 6900XT etc)..
And that's the same core config (kind of) as the RX6400 that was just announced.

Also, I would suggest that if you're making a texture that might get applied to a large surface, like a wall or floor or ceiling,  having a highres 2048px texture would be nice.

But if it's for something small, like a model of a bug for example,  that's not necessary.

My 2 cents.

 

EDIT: as for the editor image, we usually use jpeg for DarkRadiant editor images, which means it has to go into for example;

C:\Games\tdm_svn\textures\darkmod\wood\panels\mytexture_ed.jpg

if you put it in C:\Games\tdm_svn\dds\textures\darkmod\wood\panels\mytexture_ed.jpg it won't show up in game. Also, there was a bug for me where none power of 2 textures would show as black in the editor. Size doesn't matter but you want it to be legible without taking up DR memory, so usually 128px X 128px is a good enough size. Remember how small the textures are in the DarkRadiant texture browser.

  • Like 1

I always assumed I'd taste like boot leather.

 

Link to comment
Share on other sites

17 hours ago, HMart said:

Is the character mesh itself well positioned in blender?

unknown.png
I think this should be good. I still have to make a layer with control bones/armature for easy animation.
Only thing I'm still wondering is if the bones that are exported to DR should have IK bones or not .. ?
But I think that has no influence on the floating issue ..

Link to comment
Share on other sites

7 hours ago, AluminumHaste said:

if you put it in C:\Games\tdm_svn\dds\textures\darkmod\wood\panels\mytexture_ed.jpg

Well for a mission I just put it in my mission's texture folder and put the url to that in the material. That seems to work. But yeah I guess I can put it in a root texture folder if I want it in more missions.

Link to comment
Share on other sites

@datiswousit looks like you can also increase the multiplier on the bump map to get a more profound effect.

You also definitely want to combine the albedo map with the AO map to restore the fine shadow detail and make a more traditional looking “diffuse map” as mentioned in the article above.

IMO a lot of the perceivable fine surface detail from PBR textures is provided by the roughness map - you can get some of that back into your material by using it as a specular map with some adjustment which that article again provides some guidance on.

  • Like 1

-=  IRIS  =-    ♦    = SLL =

Link to comment
Share on other sites

10 hours ago, STRUNK said:

unknown.png
I think this should be good. I still have to make a layer with control bones/armature for easy animation.
Only thing I'm still wondering is if the bones that are exported to DR should have IK bones or not .. ?
But I think that has no influence on the floating issue ..

I'm far from a specialist on this but that also looks fine to me. I really don't know why your character is floating it could be a parenting problem, a naming problem or even a bug in the engine, the best imo is to import a character from TDM into Blender or other tool that can see MD5 skeletons and look how the bones are setup, you can also open the MD5 in a text editor and see if the origin bone values look reasonable, this is how a Doom 3 monster origin looks like inside MD5 mesh.

Quote

"origin"    -1 ( 0 0 0 ) ( -0.5 -0.5 -0.5 )

About IK idtech 4 does take it into consideration, for characters at lest, but I don't know if the IK info is exported from the 3D tool or created automatically by the engine, perhaps the video I posted has that info. 

  • Thanks 1
Link to comment
Share on other sites

24 minutes ago, HMart said:

About IK idtech 4 does take it into consideration, for characters at lest, but I don't know if the IK info is exported from the 3D tool or created automatically by the engine, perhaps the video I posted has that info. 

You need to add IK bones in the modelling app (see Youtube tutorials), then simply refer to them in the entity's .def in TDM.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Dragofer said:

You need to add IK bones in the modelling app (see Youtube tutorials), then simply refer to them in the entity's .def in TDM.

I've been messing around with IK today and it worked fine for the idle animation I made but I ran into problems with the walkcycle, for I had parented the IK bones to the origin, so I unparented them and was able to make sort of a walkcycle in Blender, but when I wanted to export to MD5anim I got a warning that there are too many rootbone.
So I have to look into it again .. also in the .def file, where I still have a lot to wrap my mind around anyway, for I have only some basics I found working for me:
 

Spoiler
model BlokTor
{
    mesh             models/md5/chars/cartoons/bloktor/BlokTor.md5mesh

    channel torso   ( *EyeR *EyeL *AntennaR *AntennaL)
    channel legs       ( origin Body *LegUpFR *LegUpMR *LegUpBR *LegUpFL *LegUpML *LegUpBL *LegUnFR *LegUnMR *LegUnBR *LegUnFL *LegUnML *LegUnBL *FootFR *FootMR *FootBR *FootFL *FootML *FootBL)

    anim idle         models/md5/animations/idle.md5anim 
    anim idle2        models/md5/animations/idle2.md5anim
        anim walk        models/md5/animations/walk.md5anim

    anim af_pose        models/md5/animations/idle.md5anim 
        //anim ik_pose        models/md5/animations/idle.md5anim
   }

 
entityDef atdm:ai_BlokTor
{
    "inherit"                "atdm:ai_base"
    "editor_displayFolder"     "AI"

        "model"                 "BlokTor"
        "ragdoll"               "BlokTor"

    "use_aas"               "aas_rat"
        "size"                  "7 7 7"

}

 

 

1 hour ago, HMart said:

"origin"    -1 ( 0 0 0 ) ( -0.5 -0.5 -0.5 )

I guess this goes in the .def file or the Entity Inspector?
Bookmarked the video. It's with a different 3D editor but might clarify some things.

Thanx for the replies, I'm too far into this now and want to make some stuffs, like bats_2.0, after I get this  to work.



 

Edited by STRUNK
Link to comment
Share on other sites

5 minutes ago, STRUNK said:
channel torso   ( *EyeR *EyeL *AntennaR *AntennaL)
    channel legs       ( origin Body *LegUpFR *LegUpMR *LegUpBR *LegUpFL *LegUpML *LegUpBL *LegUnFR *LegUnMR *LegUnBR *LegUnFL *LegUnML *LegUnBL *FootFR *FootMR *FootBR *FootFL *FootML *FootBL)

This looks problematic. The asterisk in front of the bone name means that you also include all bones that are beneath this bone in the hierarchy. For example, *origin is the same as listing all bones individually by name without asterisks, since all bones are lower in rank than the origin.

So "*LegUpBR" is the same as writing "LegUpBR LegUnBR FootBR".

10 minutes ago, STRUNK said:
1 hour ago, HMart said:

"origin"    -1 ( 0 0 0 ) ( -0.5 -0.5 -0.5 )

I guess this goes in the .def file or the Entity Inspector?
Bookmarked the video. It's with a different 3D editor but might clarify some things.

This is a line from an .md5mesh file specifying properties of the "origin" bone - I believe the 3 sets of numbers are its bone ID number, start and end of the bone.

The .def file is nothing else but a list of spawnargs, saved as a preset that represents an entity. Note that entities also get spawnargs from entities they inherit from.

Try looking at a human or a spider to see examples of IK spawnargs referencing IK bones.

  • Thanks 2
Link to comment
Share on other sites

9 hours ago, Dragofer said:

This looks problematic. The asterisk in front of the bone name means that you also include all bones that are beneath this bone in the hierarchy.

Ok, I "coppied" that from " steambot.def" and did'nt know wat the astrikses meant:
 

Spoiler

/**
 * Baddcog's Lantern Bot (c) 2007
 */
model tdm_ai_lantern_bot
{
    mesh            models/md5/chars/steambots/lant_bot.md5mesh

    channel torso   ( *upper_gear_link *low_gear_link *ear *smokestack *gauge *gear_bone)
    channel legs    ( origin waist *lf_upper_leg *lr_upper_leg *rr_upper_leg *rf_upper_leg *lf_mid_leg *lr_mid_leg *rr_mid_leg *rf_mid_leg *lf_low_leg *lr_low_leg *rr_low_leg *rf_low_leg *lf_foot *lr_foot *rf_foot *rr_foot )

    anim af_pose    models/md5/chars/steambots/lant_bot_af.md5anim
    anim ik_pose    models/md5/chars/steambots/lant_bot_af.md5anim

    anim idle       models/md5/chars/steambots/lant_bot_idle.md5anim
    {
        frame 1     triggerSmokeParticle smokestack
        frame 1     sound snd_steam_vent
    }

    anim walk       models/md5/chars/steambots/lant_bot_walk.md5anim
    {
        frame 12    footstep
        frame 31    footstep
        frame 31    sound snd_steam_vent
        frame 32    triggerSmokeParticle smokestack
    }

    anim run        models/md5/chars/steambots/lant_bot_walk.md5anim
    {
        frame 12    footstep
        frame 31    footstep
        frame 31    sound snd_steam_vent
        frame 32    triggerSmokeParticle smokestack
    }

    anim alerted        models/md5/chars/steambots/lant_bot_see_u.md5anim
    {
        frame 2     sound_voice snd_sight
    }
}

There is also a some IK setup in the steambot.def:
 

Spoiler
  // IK Setup
	"ik_numLegs"            "4"
	"ik_minWaistFloorDist"  "22"
	"ik_minWaistAnkleDist"  "8"
	"ik_footSize"           "4"
	"ik_waist"              "waist"

	"ik_hip1"               "lf_mid_leg"
	"ik_hip2"               "lr_mid_leg"
	"ik_hip3"               "rf_mid_leg"
	"ik_hip4"               "rr_mid_leg"

	"ik_knee1"              "lf_low_leg"
	"ik_knee2"              "lr_low_leg"
	"ik_knee3"              "rf_low_leg"
	"ik_knee4"              "rr_low_leg"

	"ik_ankle1"             "lf_foot"
	"ik_ankle2"             "lr_foot"
	"ik_ankle3"             "rf_foot"
	"ik_ankle4"             "rr_foot"

	"ik_dir1"               "lf_knee_ik"
	"ik_dir2"               "lr_knee_ik"
	"ik_dir3"               "rf_knee_ik"
	"ik_dir4"               "rr_knee_ik"

	"ik_foot1"              "lf_foot"
	"ik_foot2"              "lr_foot"
	"ik_foot3"              "rf_foot"
	"ik_foot4"              "rr_foot"

 

Could you shine some light on that?

Link to comment
Share on other sites

@STRUNKI'd open some .md5meshes in Notepad and look what kind of values you see for the "origin" bone and compare it with your own .md5mesh to get a clue on the floating.

6 minutes ago, STRUNK said:

Could you shine some light on that?

IK is what allows feet to step on uneven surfaces while keeping the body at a relatively constant height. You can see IK spawnargs specifying how high the waist should be above the floor and the ankles at minimum, as well as a spawnarg to designate which bone is the waist.

Definitely should look at a Blender Youtube tutorial to get an understanding of how IK bones work.

  • Thanks 1
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...