Jump to content
The Dark Mod Forums

New 3d modeller wants to help


janexx

Recommended Posts

I've got the statue loaded in Lightwave. Looks great, although 18000 tris is really too high for a single game model. Even half that much is pushing it.

Link to comment
Share on other sites

I didn't get a chance to check the size last night...will do a comparison when I get home.

Link to comment
Share on other sites

The size is extremely small right now. It fits under the boot of a typical guard.

 

 

post-9-0-53524100-1447374011_thumb.jpg

  • Like 1
Link to comment
Share on other sites

In blender, you need to set the grid to 8 units, this will tell you what one doom unit looks like. By knowing a doomunit equals about an inch in the game world, you can scale the model to fit the game from there.

  • Like 1
Link to comment
Share on other sites

You can decimate it a bit, or retopo dense areas, but a lot can be achieved also by making a duplicate of your model but really make it low poly. If you fit it slightly inside your original mesh, this is now your shadowmesh. In game, we can set the original to be non-shadow casting, so the engine will use the hidden shadowmesh instead to calculate dynamic lighting. This helps tremendously. It will be awesome to see your model ingame!

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

The latest version I have looks pretty good, but it's missing a shadowmesh, and it has some missing polys in the face. I can fix those things if it comes to it, but I have my hands full at the moment.

 

I also don't have a marble normalmap for the fabric, just the fabric version.

post-9-0-66790700-1453932951_thumb.jpg

  • Like 1
Link to comment
Share on other sites

  • 3 years later...

Hi there, sorry that I didn't answered for so long. I finally could install darkradiant and the statue has now a quite good size. I can import it in DarkRadiant and Darkmod. Now I struggle again. The textures (or material?) are not displayed. In DR it shows the standard "no shader" texture, in DarkMod it is completely black. Although I read the wiki about textures, I don't understand where to put them for testing. Would be nice if someone could give me instructions for noobs...

Link to comment
Share on other sites

Hi there, sorry that I didn't answered for so long. I finally could install darkradiant and the statue has now a quite good size. I can import it in DarkRadiant and Darkmod. Now I struggle again. The textures (or material?) are not displayed. In DR it shows the standard "no shader" texture, in DarkMod it is completely black. Although I read the wiki about textures, I don't understand where to put them for testing. Would be nice if someone could give me instructions for noobs...

 

You need to make a material, a material is a simple text file but instead of its file extension ending with .txt it ends with .mtr, you do that just by renaming the file.

 

Here is a simple material definition for you, put it inside a folder called "materials". A single .mtr file can have multiple material definitions inside.

 

Textures go inside the "textures" folder.

lines starting with // are comments and not necessary for the material to work


textures/folder_name/material_name // this is the full name of the material, this is what you copy to the material name in blender for example
{
	metal // this is a GLOBAL material key that tells the engine this material is metal, for sounds and other effects
	
	qer_editorimage textures/folder_name/texture_name.jpg //this is the texture preview for the editor, recommended to be jpg, 256x256 and have the normal map blended into it
	// Never use jpg or png for any other texture but the editor preview, jpg used on normal textures can crash the game

	diffusemap textures/folder_name/texture_name_d.tga // this is the color map or diffuse. (optional) ends with _d
	bumpmap textures/folder_name/texture_name_local.tga // despite the name this is the normal map. (optional) ends with _local
	specularmap textures/folder_name/texture_name_s.tga  // the specular map. (optional) ends with _s
}

If you omit the .tga extension it still works, in this case the engine will search in the dds folder first for a texture, then if none exist it will search for a TGA and so on.

 

like so -> .dds .tga .jpg, if it doesn't find any texture than it will show a black material.

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

Thank you HMart so far. Where is the materials folder or where should I create it?

 

I installed darkmod in /usr/share/games/darkmod/ where all pk4 files are. Now I put my ase model in tdm_models01.pk4 to /models/darkmod/decorative/statues/

 

Is that right so far?

 

My textures I placed in tdm_textures_stone_sculpted01.pk4 (diffuse map in /dds/textures/darkmod/stone/sculpted/ and bump map in /textures/darkmod/stone/sculpted/ )

 

My material file loos like this:

lines starting with // are comments and not necessary for the material to worktextures/cube_lp // this is the full name of the material, this is what you copy to the material name in blender for example{	stone // this is a GLOBAL material key that tells the engine this material is metal, for sounds and other effects		qer_editorimage textures/greekstatue_marble_preview.jpg //this is the texture preview for the editor, recommended to be jpg, 256x256 and have the normal map blended into it	// Never use jpg or png for any other texture but the editor preview, jpg used on normal textures can crash the game	diffusemap dds/textures/darkmod/stone/sculpted/cube_marble_d.tga // this is the color map or diffuse. (optional) ends with _d	bumpmap /textures/darkmod/stone/sculpted/cube_local.tga // despite the name this is the normal map. (optional) ends with _local	// specularmap textures/folder_name/texture_name_s.tga  // the specular map. (optional) ends with _s}
Link to comment
Share on other sites

It looks as though you have a TGA file inside the dds/ hierarchy; if it doesn't work try diffusemap textures/darkmod/stone/sculpted/cube_marble_d.tga (assuming the file is in the matching location).

 

I thought we had a working material def. for the main statue, and it was only the base that was missing one. Here's the tracker entry: http://bugs.thedarkmod.com/view.php?id=4429

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Remove the first line or put // before the "lines" word, if not the engine will not read the material file, if you open the console you should see a warning saying the material failed to load. You can also remove the comments, everything after //, I put them there just to help you but they are not needed.

textures/cube_lp{	stone 	qer_editorimage textures/greekstatue_marble_preview.jpg	diffusemap dds/textures/darkmod/stone/sculpted/cube_marble_d.tga 	bumpmap /textures/darkmod/stone/sculpted/cube_local.tga 	// specularmap textures/folder_name/texture_name_s.tga}

The material folder should be inside the folder of your mission, in this way you don't change the original TDM materials and break other missions.

 

Don't put the textures inside the original TDM textures folder, that will break other missions, if they happen to have materials with the same name as yours.

For custom materials made by you, you should always create separate .pk4s, inside your mission folder, you put that folder inside the, fms, folder, if it doesn't exist for whatever reason then create one, it should be like so - darkmod -> fms -> your mission folder.

 

Don't mess with the original TDM .pk4's if you need to change a original TDM material than just create a copy of the .mtr inside your mission folder materials folder and edit the material definition that you want to change.

 

You don't need to work directly on a pk4 file, it is just a renamed .zip file btw, first work on your mission folders as separate folders, than when you think your mission is ready, put all the folders (the ones inside you mission folder) inside a zip file and then just rename the .zip extension to .pk4 . A good way to see how it works is to go to the fms folder open the training_mission folder and see how they did it.

 

Never put .tga's, jpg's, etc inside the DDS folder that is for your compressed .dds textures only, dds are optional and should mirror the textures folder set up, dds are used mostly to save space and make the mission load slightly faster but they are lossy compressed, that means it makes the textures small by removing quality from them.

 

Always save your original art has .tga because is a non lossy texture format.

 

Hope this helps

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

@VanishedOne, I just try to get the statue for myself in DarkRadiant to see if it works, independent from the one I gave Springheel. I test it at the moment with just a diffuse and a bump map for the podest.

@HMart, thank you, that makes thing clearer to me. Now I have sorted the textures in a "textures" folder within the "fms" folder and editet the material file like this:


textures/cube_lp
{
	stone 
	
	qer_editorimage textures/darkmod/stone/sculpted/greekstatue_marble_preview
	

	diffusemap textures/darkmod/stone/sculpted/cube_marble_d 
	bumpmap textures/darkmod/stone/sculpted/cube_local
	// specularmap textures/folder_name/texture_name_s.tga
}

I placed the textures accordingly to the path in the material file.

But in DarkRadiant I still see no textures:

 

Bildschirmfoto-2019-05-19-22-59-58.png

 

What could be still wrong here?

Link to comment
Share on other sites

Hum i think the material name is wrong, in DR it should show as "textures/cube_lp" because that is what you named your material not only "cube_lp" something must be wrong with your paths, but i'm not sure. Also if you changed the model in any way in blender then you need to edit the .ase file in a text editor, I don't work with .ase files (work with .lwo instead), so I don't remember exactly what you need to change but it should be where the material name is defined.

 

Also based on what you show your mission folder should be more or less something like this:

 

darkmod

fms folder

your mission folder

materials folder

( Inside here put the .mtr file, name it something obvious like "statues.mtr" inside this .mtr write all the material definitions of your various statues models)

textures folder

darkmod folder

stone folder

sculpted folder

(your textures go here)

models folder

 

 

Is that right?

  • Like 1
Link to comment
Share on other sites

dds are used mostly to save space and make the mission load slightly faster

While they do save space and they are loaded faster, the most important aspect of using .dds format is to save video memory.

 

This might not be a problem on modern cards with 6 gigs of vram, but on older hardware going over your video memory limit slows any game down to a crawl. That's why you should always compress to .dds once you have finalized your textures, while keeping the originals in your .psd or .xcf files. Only normalmaps are the exception here, as compression destroys important information stored in them.

 

As for saving space, PK4s are just renamed zip files, and as such they offer much worse compression ratio for .tgas in comparison to what .dds format has (4x for .dds, 2x for .tga compressed with zip, IIRC).

 

 

As for the model, it seems you have 3 materials here, and since they don't show up in the model viewer, the problem must be with paths in .ase file. You need to provide full path from your material file (textures/...) Also remember to add //base/ to your paths, otherwise you'll see material in model browser, but not in the game.

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

 

While they do save space and they are loaded faster, the most important aspect of using .dds format is to save video memory.

 

This might not be a problem on modern cards with 6 gigs of vram, but on older hardware going over your video memory limit slows any game down to a crawl. That's why you should always compress to .dds once you have finalized your textures, while keeping the originals in your .psd or .xcf files. Only normalmaps are the exception here, as compression destroys important information stored in them.

 

As for saving space, PK4s are just renamed zip files, and as such they offer much worse compression ratio for .tgas in comparison to what .dds format has (4x for .dds, 2x for .tga compressed with zip, IIRC).

 

 

As for the model, it seems you have 3 materials here, and since they don't show up in the model viewer, the problem must be with paths in .ase file. You need to provide full path from your material file (textures/...) Also remember to add //base/ to your paths, otherwise you'll see material in model browser, but not in the game.

 

Yes I forgot about the video memory part, my GPU has 8GB of VRAM so i'm just a "spoiled kid" :P:D

 

Btw i'm not against dds if I passed that idea it was not intentional. Also i'm sure you know that saving dds in dxt5 option removes much less information from the texture, so if I was compressing normal maps textures to .dds (that i'm currently not but I may at the end) I would chose dxt5 for them.

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

Mine is 6 GB, so I'm not complaining either ;) But I did notice a huge performance increase on an older laptop, when I compressed most of the tgas I had into dds. I guess it's because of VRAM being several times faster than system RAM. When you run out of GPU memory, the engine starts using system RAM and that's when trouble begins.

 

Yup, it's true that higher dxt compression methods destroy less information. Haven't tried that on normalmaps though. I thought dxt5 was often used for gradients. I think there is something like a dedicated dxt and ati method for normalmaps with n at the end, but it never worked for me (it added a pink hue to textures). Will have to dig deeper into that at some point.

 

 

While we're at it, it's also worth mentioning that there is an in-game on-the-fly compression as well, and it's controlled by two cvars:

image_useNormalCompression "1"
image_useCompression "1"
While you're working on your textures and materials, I'd recommend to turn them off, because you may see compression artifacts on normalmaps, poor quality of gradients or poor-looking noise patterns on diffuse/specular. This compression method ignores .dds, so if you have only .dds textures in your scene materials, there will be no difference in VRAM use when you toggle that option on and off. The .dds image quality will also be better, as e.g. Gimp uses better mipmapping options and it seems to do a better job with image quality.
That said, keep both of these ON in any other case.
Edited by peter_spy
Link to comment
Share on other sites

Hum i think the material name is wrong, in DR it should show as "textures/cube_lp" because that is what you named your material not only "cube_lp" something must be wrong with your paths, but i'm not sure. Also if you changed the model in any way in blender then you need to edit the .ase file in a text editor, I don't work with .ase files (work with .lwo instead), so I don't remember exactly what you need to change but it should be where the material name is defined.

It's the BITMAP field: http://wiki.thedarkmod.com/index.php?title=ASE_to_TDM

 

N.B. It's possible for DR to be misleading about ASE material names, so if things still don't work, investigate with a text editor: http://bugs.thedarkmod.com/view.php?id=4644

  • Like 1

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

 

um i think the material name is wrong, in DR it should show as "textures/cube_lp" because that is what you named your material

 

Ah yes that was the mistake. I changed the first line in "cube_lp" and now it works, thank you!

  • Like 1
Link to comment
Share on other sites

While they do save space and they are loaded faster, the most important aspect of using .dds format is to save video memory.

 

The video memory savings could be achieved by dynamically compressing to DDS format after loading TGAs from disk (which the engine will do if you don't have the "use precompressed DDS" cvar set). I believe the main motivation for using DDS files on disk is to reduce mission size and loading times.

 

Also i'm sure you know that saving dds in dxt5 option removes much less information from the texture, so if I was compressing normal maps textures to .dds (that i'm currently not but I may at the end) I would chose dxt5 for them.

 

The only difference between DXT1 and DXT5 is the way they handle alpha information — the RGB color information is encoded in exactly the same way. Since normal maps do not make use of alpha (unless there have been some changes to the rendering since the Doom 3 days), using DXT5 for normal maps is unlikely to provide any benefit.

  • Like 1
Link to comment
Share on other sites

The video memory savings could be achieved by dynamically compressing to DDS format after loading TGAs from disk (which the engine will do if you don't have the "use precompressed DDS" cvar set). I believe the main motivation for using DDS files on disk is to reduce mission size and loading times.

 

I thought that's what the engine does if you have the above cvars enabled. But it seems that the old hardware takes it quite hard when you only have tgas and you use on-the-fly compression only. In my case, the framerate went from 25 to 55 FPS in the same environment, when I compressed tgas to dds.

 

The only difference between DXT1 and DXT5 is the way they handle alpha information — the RGB color information is encoded in exactly the same way. Since normal maps do not make use of alpha (unless there have been some changes to the rendering since the Doom 3 days), using DXT5 for normal maps is unlikely to provide any benefit.

 

 

There is DXT5nm option in Gimp which was designed for normalmaps, but I always get a pink/purple output, and the compression ratio is around 50% so basically the same as with zip/pk4 package.

Edited by peter_spy
Link to comment
Share on other sites

 

...

 

The only difference between DXT1 and DXT5 is the way they handle alpha information — the RGB color information is encoded in exactly the same way. Since normal maps do not make use of alpha (unless there have been some changes to the rendering since the Doom 3 days), using DXT5 for normal maps is unlikely to provide any benefit.

 

Hum that is news to me I remember being recommended (or i read about it somewhere) to compress normal maps to dxt5 when i first started modding Doom 3 years ago. I've known the DDS format since my Max Payne 2 modding days but obviously that game has no normal mapping. Also reading about AMD 3Dc normal map compression format, seems it is based somewhat on dxt5, but i'm not a graphics coder far from it so I could be getting this wrong.

 

http://wiki.polycount.com/wiki/3Dc

Link to comment
Share on other sites

I thought that's what the engine does if you have the above cvars enabled. But it seems that the old hardware takes it quite hard when you only have tgas and you use on-the-fly compression only. In my case, the framerate went from 25 to 55 FPS in the same environment, when I compressed tgas to dds.

 

Very strange; I can't see any obvious reason why on-the-fly compression would change the final framerate (except during the initial compression phase, if it is doing this in realtime). I wonder if the on-the-fly compression was somehow giving a different result, or maybe not even working at all due to some cvar conflict.

 

Hum that is news to me I remember being recommended (or i read about it somewhere) to compress normal maps to dxt5 when i first started modding Doom 3 years ago. I've known the DDS format since my Max Payne 2 modding days but obviously that game has no normal mapping. Also reading about AMD 3Dc normal map compression format, seems it is based somewhat on dxt5, but i'm not a graphics coder far from it so I could be getting this wrong.

 

Well, I haven't written exporters for the formats myself so am just reading about it from various sources, but everything I have seen so far points to DXT5 compressing color in exactly the same way as DXT1, with differences only in the alpha channel.

 

The 3Dc page you link to says:

 

Each channel uses the same compression technique as DXT5 alpha.

 

i.e. the two channels that this format stores (which is all that should be needed for tangent-space normal maps) are each individually compressed using the scheme that provides the high-quality gradients in DXT5 alpha channels, rather than the lower-quality DXT1 scheme for encoding color channels which tends to make normal maps look bad. This is very different from simply using regular DXT5 for normal maps.

 

If you follow the link through to the DXT5 page, it confirms that stock DXT5 provides no benefit for color:

 

Color is compressed the same as DXT1.

UPDATE: Actually it seems I am partially wrong about this with respect to Doom 3, because of this feature (as reported by Wikipedia):

 

id Software worked around the normalmap compression issues in Doom 3 by moving the red component into the alpha channel before compression and moving it back during rendering in the pixel shader.[7]

 

So if this feature really does exist and is still present in the engine, you are better off using DXT5 because you will gain the higher alpha-quality compression for the red channel (i.e. this is half of what the 3Dc scheme is doing).

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