Jump to content
The Dark Mod Forums

Texturing Models (new or existing textures)


RPGista

Recommended Posts

Might sound a bit stupid, but Ive trying for a couple of days now, while working on UV tutorials, and I seem to be having difficulties making the jump from the textured model inside the editor to actually being able to put it into TDM.

 

The cave model (http://forums.thedarkmod.com/topic/10003-so-what-are-you-working-on-right-now/page__view__findpost__p__288456) was simple because all I did was to make a box uv for it with an existing TDM texture and then I did the ase file hack (editting the texture path inside the text) to be able to put it in a map - it was all distorted and ugly but it worked. This method is basicly what is available in the wiki.

 

The problems are:

 

1- If I want to model something with new textures (not really even unwrapping and painting, say just applying a box or surface map), what exactly must be done - should I first make a "material" of all the new textures, and then use the same method above (and if so, what about textures that are just a diffuse image, without bump maps, etc)?

 

post-8474-0-55690700-1340099094_thumb.jpg

 

2- What about unwrapped and painted models, should I unwrap each section and then save each of the editted texture maps as individual materials, repeating the procedure above too?

 

post-8474-0-67507400-1340098975_thumb.jpg

Link to comment
Share on other sites

You've got two kinds of textures; the reusable kind (seamless) and single use textures (usually created for a specific model). The difference between them is how you go about handling seams. With a seamless texture you can adjust the UVs until it matches up. With a single use texture you alter the texture to get rid of seams.

 

In the first example you're clearly dealing with something that has 3 identifiable types of surfaces. The sides are flat and rectangular -- like an image. It's not an organic shape. You can use seamless textures here. You need one material shader for the floor, another for the ceiling, and a third for the walls.

 

In what order you go about creating assets is a matter of personal taste. You can use existing material shaders as placeholders or you can create your own before importing the model. You don't need a model to test seamless textures. And you don't need a bump or specular map to create a functional material shader.

 

Your second example looks like a model that should utilize a single use texture. There are no "sections". The shape is bumpy and organic. The edges are rounded. Each "side" flows into the next smoothly. The texture should be painted to cover up seams in this case.

Link to comment
Share on other sites

Thanks for the heads up. Im still not quite sure about how to make materials, spent a good time today trying but I still cant make the new textures show in DR.

 

The stone step is indeed a painted texture. This means I'll have to make a different "material" for each of these uv unwraps and refer to them in the model's ASE file manually?

 

I guess I have to really nail the material creation thing, I dont know where I am going wrong here...

Link to comment
Share on other sites

Renz was going to do a model texturing tutorial on our wiki. Not sure if he's still planning it or postponing it or what (or maybe he already did it for all I know).

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

Writing a material shader is fairly simple. Let's run through an example where you have a single diffuse map. For the purposes of this example...

 

C:\DOOM3\darkmod (where TDM is installed)

mydiffuse.tga (the name of the image)

 

First you create a "textures" folder inside C:\DOOM3\darkmod. Then you create a subfolder for your image files. We'll call it "mystuff". Then we copy mydiffuse.tga into C:\DOOM3\darkmod\textures\mystuff.

 

Second you need a material shader declaration. So you start by creating a "materials" folder inside C:\DOOM3\darkmod. Then you create a text file within C:\DOOM3\darkmod\materials called "mystuff.mtr".

 

Third you type this template into mystuff.mtr and save it...

 

textures/darkmod/mystuff
{
bumpmap		_flat	// change this to the normal map you intend to use or leave it be
specularmap	_black	// change this to the specular map you intend to use or leave it be
diffusemap	_white	// change this to the diffuse map you intend to use or leave it be
}

 

The only thing you have to do here is change the diffusemap line to point to the image you placed in C:\DOOM3\darkmod\textures\mystuff. In other words that line should read...

 

    diffusemap	textures/mystuff/mydiffuse	// change this to the diffuse map you intend to use or leave it be

 

Now I'm intentionally leaving some important bits out here. This won't work with TDM's ambient light system or frob highlighting. Someone more familiar with the details behind that can help you get that working. This will at the very least get you a working texture in game.

Edited by rich_is_bored
  • Like 1
Link to comment
Share on other sites

for texture to appear in darkradiant you need this

 

qer_editorimage textures/darkmod/ordersyms/watsymbol_ed

 

in the material file, with your own texture_ed.jpg file in the texture directory.

 

eg. material definition

 

textures/darkmod/ordersyms/watersym

{

metal

 

qer_editorimage textures/darkmod/ordersyms/watsymbol_ed

diffusemap textures/darkmod/ordersyms/watsymbol

{

if ( parm11 > 0 )

blend gl_dst_color,gl_one

map _white

rgb 0.30*parm11

}

{

if ( parm11 > 0 )

blend add

map textures/darkmod/ordersyms/watsymbol

rgb 0.15*parm11

}

{

blend add

map textures/darkmod/ordersyms/watsymbol

red global2

green global3

blue global4

}

}

 

if the object needs to be pickup and put down in game then it will need a collision file <name of object>.cm file, you can create that in darkradiant.

Edited by stumpy
Link to comment
Share on other sites

Rich, thanks a lot, from your step by step I was able to spot where I made the mistake and was able to test another simple model in there with a full texture material (diffuse, normal, specular) this time.

 

post-8474-0-21356800-1340199219_thumb.jpg

 

I didnt create the texture, it looks kind of strange with the specular on (and the normals are also a bit weird), but I was relieved to get it to work, thanks again.

 

Stumpy - will look more into the full materials as I would indeed like to start with a small model you can pick up and interact with.

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

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...