Jump to content


Photo

Model texture issues


19 replies to this topic

#1 refl3ks

refl3ks

    Member

  • Member
  • PipPip
  • 37 posts

Posted 17 May 2018 - 12:32 PM

I'm new to modeling in Dark Radiant (using Blender), and having some noob issues.

 

I've exported the model as .ase, model appears as it should but has no texture present.

 

I modified the BITMAP margin in the .ase to the path of the texture (ie: //base\models\darkmod\props\textures\*texture name*).

I've browsed countless times through the wiki re-reading everything concerning this general issue with no luck.

 

What other steps am I missing for the texture to show up in the model?

 

Any help will be greatly appreciated!


Edited by refl3ks, 17 May 2018 - 01:14 PM.


#2 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36996 posts

Posted 17 May 2018 - 12:50 PM

Are you choosing .ase for a reason?  If you export as .lwo no text editing is required.  .lwo files also are quite a bit smaller in filesize.



#3 refl3ks

refl3ks

    Member

  • Member
  • PipPip
  • 37 posts

Posted 17 May 2018 - 01:00 PM

I'm not finding .lwo export in blender even though it's enabled in plugins. That just leaves me .ase.

 

 

edit:

Ok I found an .lwo exporter. After exporting, texture is still not showing up.


Edited by refl3ks, 17 May 2018 - 01:04 PM.


#4 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36996 posts

Posted 17 May 2018 - 01:07 PM

I'm not finding .lwo export in blender

 

 

Are you making your models in Blender or in Dark Radiant?



#5 refl3ks

refl3ks

    Member

  • Member
  • PipPip
  • 37 posts

Posted 17 May 2018 - 01:09 PM

I'm making my models in Blender and trying to export to Dark Radiant.



#6 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36996 posts

Posted 17 May 2018 - 01:12 PM

Oh, that's a different thing.  Someone who uses Blender will have to comment.



#7 refl3ks

refl3ks

    Member

  • Member
  • PipPip
  • 37 posts

Posted 17 May 2018 - 01:14 PM

Oh, that's a different thing.  Someone who uses Blender will have to comment.

 

I should have mentioned it in my title, didn't mean to misuse your time.



#8 nbohr1more

nbohr1more

    Darkmod PR, Wordsmith

  • Development Role
  • PipPipPipPipPip
  • 8432 posts

Posted 17 May 2018 - 01:21 PM

Chedap appears to have LWO working:

 

http://forums.thedar...ender-into-tdm/


Please visit TDM's IndieDB site and help promote the mod:

http://www.indiedb.c...ds/the-dark-mod

(Yeah, shameless promotion... but traffic is traffic folks...)

#9 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36996 posts

Posted 17 May 2018 - 01:59 PM

 

I should have mentioned it in my title, didn't mean to misuse your time.

 

No worries!  It was just a little confusing because you actually CAN use DR to make models.



#10 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1488 posts

Posted 17 May 2018 - 02:07 PM

You mean the model is showing up in DR right? But with no texture applied to it. That is most likely an issue with the material paths.

 

When you say "//base\models\darkmod\props\textures\*texture name*" what this refers to is actually the material name. Inside the .mtr file you can have several materials, so in your "models\darkmod\props\textures\*texture name*" material, thats where you define where your texture maps are actually in (among other things). Your material would look something like this:

 

models\darkmod\props\textures\*texture name*
{
 
    stone
    qer_editorimage  models\darkmod\props\textures\*texture name*_ed
    bumpmap          models\darkmod\props\textures\*texture name*_local
    diffusemap       models\darkmod\props\textures\*texture name*
    specularmap      models\darkmod\props\textures\*texture name*_s
 
And etc... You can use an existing material file and just replace the texture map paths inside.

Edited by RPGista, 17 May 2018 - 02:21 PM.


#11 R Soul

R Soul

    Member

  • Member
  • PipPip
  • 91 posts

Posted 17 May 2018 - 05:16 PM

edit:
Ok I found an .lwo exporter. After exporting, texture is still not showing up.

 
Which one? This is the one I was using until a few hours ago:

http://www.ewocproje.../lwoexport.html

 

The one in the link to Chedap's thread (which I've now started using) is a modified version which has better support for sharp edges.

 

The reason I've asked which exporter you're using is that another one may handle materials differently. For either of the exporters I've mentioned, you do this:

 

In Blender, you need to assign materials to faces (not just textures) (it's probably unwise to use lots of materials per object though). Those material names must be valid TDM material paths (the shader name you see when you select something in the material browser in DarkRadiant), e.g textures/darkmod/roof/shingles_red_flat. It doesn't matter what textures the Blender materials have, but it helps if they match the TDM textures (I wrote a Blender addon to make that easier).



#12 stumpy

stumpy

    Advanced Member

  • Member
  • PipPipPip
  • 1748 posts

Posted 17 May 2018 - 06:50 PM

if its a texture something like

*BITMAP "//base/textures/darkmod/samhaim/jack5stem.dds"

if its the material its

*BITMAP "//base/textures/darkmod/rougecard/cardfrnt"



#13 refl3ks

refl3ks

    Member

  • Member
  • PipPip
  • 37 posts

Posted 18 May 2018 - 09:16 AM

Which one? This is the one I was using until a few hours ago:
http://www.ewocproje.../lwoexport.html
 
The one in the link to Chedap's thread (which I've now started using) is a modified version which has better support for sharp edges.
 
The reason I've asked which exporter you're using is that another one may handle materials differently. For either of the exporters I've mentioned, you do this:
 
In Blender, you need to assign materials to faces (not just textures) (it's probably unwise to use lots of materials per object though). Those material names must be valid TDM material paths (the shader name you see when you select something in the material browser in DarkRadiant), e.g textures/darkmod/roof/shingles_red_flat. It doesn't matter what textures the Blender materials have, but it helps if they match the TDM textures (I wrote a Blender addon to make that easier).


 
That's the exact .lwo plugin that I have found and tried using, I will find the thread and download the modified version.
 
I have been using your blender addon, its a great addition, thank you!
 
maybe these images might help narrow everything down:

Spoiler

Edited by refl3ks, 18 May 2018 - 09:17 AM.


#14 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1194 posts

Posted 18 May 2018 - 09:30 AM

I use .ase models but with 3dsmax, the material name doesn't matter, same goes for map name. Only the last one, Bitmap, is important. That's your material path, contrary to the name. Materials usualy mimic the texture folder structure (although they don't have to), so it should be //base/textures/(...)/your_material_name


Edited by Judith, 18 May 2018 - 09:30 AM.


#15 refl3ks

refl3ks

    Member

  • Member
  • PipPip
  • 37 posts

Posted 18 May 2018 - 09:38 AM

I use .ase models but with 3dsmax, the material name doesn't matter, same goes for map name. Only the last one, Bitmap, is important. That's your material path, contrary to the name. Materials usualy mimic the texture folder structure (although they don't have to), so it should be //base/textures/(...)/your_material_name


I'm assuming I'm typing this out right? Texture is still missing.

ypgZLPc.png

edit: Ok I seem to have solved it, all I did was add .jpg and it miraculously appeared  :blush:  

What a simple issue that give me a migraine for two days...


Edited by refl3ks, 18 May 2018 - 09:43 AM.


#16 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1194 posts

Posted 18 May 2018 - 09:50 AM

Jpeg? You don't use jpegs for anything but editor preview, you can easily use diffuse texture for that, DarkRadiant will handle that nicely, even with 2k textures. All the textures are .tga, and you convert them to .dds before packing your mission for release (except for normalmaps).


Edited by Judith, 18 May 2018 - 10:24 AM.


#17 RPGista

RPGista

    Advanced Member

  • Member
  • PipPipPip
  • 1488 posts

Posted 18 May 2018 - 02:57 PM

Let me try to put it in simple terms:

 

When you model for the game, the only thing that will be exported from blender apart from the mesh are the material name and the UV mapping. What you have as texture layers inside the blender material doesnt matter, only the name of the material will be used. You still texture it because you want to set up the UVs and test how it looks with all its texture maps applied before it goes in game, obviously. Notice that one unit in Blender is the same as one unit in DR/TDM, and it means an inch, so scale it accordingly before exporting.

 

Once you have the ASE file, you edit it in a text editor and replace whatever was in the BITMAP path for the material name you are going to be using for that mesh (if its a LWO file, then the material name inside blender should already have been the material path).

 

For static meshes, you need 3 folders - materials, models and textures. You put your model inside its folder, and the texture maps inside their folder (you can come up with your own strucutre or use the suggested folder trees). Inside the materials folder, you need a .mtr file with all the characteristics the material will have. The best way to do it is to find an existing material, copy it, rename it and replace the all the paths in there with your own texture maps'. Or, you can simply use an existing material and skip this stage. 

 

Download this model here and check it out, you will see how the files are structured and you can use it as a base for your own (just replace files and rename existing ones).

 

http://forums.thedar...-12#entry407573


Edited by RPGista, 18 May 2018 - 03:09 PM.

  • refl3ks likes this

#18 refl3ks

refl3ks

    Member

  • Member
  • PipPip
  • 37 posts

Posted Yesterday, 11:20 AM

Let me try to put it in simple terms:

 

When you model for the game, the only thing that will be exported from blender apart from the mesh are the material name and the UV mapping. What you have as texture layers inside the blender material doesnt matter, only the name of the material will be used. You still texture it because you want to set up the UVs and test how it looks with all its texture maps applied before it goes in game, obviously. Notice that one unit in Blender is the same as one unit in DR/TDM, and it means an inch, so scale it accordingly before exporting.

 

Once you have the ASE file, you edit it in a text editor and replace whatever was in the BITMAP path for the material name you are going to be using for that mesh (if its a LWO file, then the material name inside blender should already have been the material path).

 

For static meshes, you need 3 folders - materials, models and textures. You put your model inside its folder, and the texture maps inside their folder (you can come up with your own strucutre or use the suggested folder trees). Inside the materials folder, you need a .mtr file with all the characteristics the material will have. The best way to do it is to find an existing material, copy it, rename it and replace the all the paths in there with your own texture maps'. Or, you can simply use an existing material and skip this stage. 

 

Download this model here and check it out, you will see how the files are structured and you can use it as a base for your own (just replace files and rename existing ones).

 

http://forums.thedar...-12#entry407573

 

 

Thanks for the breakdown, I'm starting to figure out the process. It would be great if there was a tutorial for all this in the wiki that wasn't so vague (that or I'm completely missing it).

 

Jpeg? You don't use jpegs for anything but editor preview, you can easily use diffuse texture for that, DarkRadiant will handle that nicely, even with 2k textures. All the textures are .tga, and you convert them to .dds before packing your mission for release (except for normalmaps).

 

Corrected, started using .tga.  


  • Judith likes this

#19 Judith

Judith

    Advanced Member

  • Member
  • PipPipPip
  • 1194 posts

Posted Yesterday, 11:26 AM

You're not missing it, there's no explicit tutorial or a model workflow, I had to figure it out myself too. This is what I have in my notes, I hope it helps, although this is for 3dsmax:

 

 

1. Make your mesh, UVs, textures, etc. Assign the diffuse texture to the mesh (with Diffuse -> Bitmap material).

IMPORTANT: when adjusting pivot, don't use 3dsmax Align to the World option. This will change reference coordinates for stuff like specularity and cubemaps, making everything look weird. You can move pivot around, just don't rotate it. When in doubt, reset the pivot.

2. In 3dsmax, you need to export the mesh from scene with completely clean material editor to get proper model definition in .ase file. Save your scene with your models, use Reset option to clear everything in the scene and material library, then import the model from your saved scene. Use lower caps for everything, and no spaces.

Remember to change the extension file from ".ASE" to ".ase" to avoid future problems! (e.g. with skins)

3. Put textures for the mesh in the proper folder. I.e. fms/yourfmname/models/...

4. Create a material definition file in your materials folder. It doesn't have to reflect the mesh name, and it can contain multiple definitions, possibly grouped per mesh classes. Start your material with: textures/yourfmname/models/materialname
Then add diffuse, specular and normal definitions.

5. Edit the .ase file in the notepad. Go to the *MAP_DIFFUSE section. Paste the material path in the BITMAP section, but use //base/
prefix, e.g. //base/textures/.../materialname

6. Now your .ase model will be visible both in model browser and ingame.

7. If you want to use multiple materials, import your mesh into a reset scene, then split it into several meshes corresponding to different materials. Make all the Standard materials and add Bitmaps to their Diffuse channels. Then apply materials to proper meshes. Now export the whole scene to ase (don't use Export selected!). Remember to change the extension file from ".ASE" to ".ase". Now edit BITMAP sections for all the different materials, as you do per single material. Save the mesh, preview it in editor and in game.

 

Note that texture and material paths can be created in many ways. Most people use the Dark Mod directory structure (textures/darkmod/... etc.), but if you need faster access or you just want to have your own structure, you can use something like textures/yourfmname/.../ etc. When you open the media browser, you'll see a folder with your fm name in the main catalogue, and you can choose your materials directly from there. Materials typically mimic the texture directory structure, but there are exeptions, like light materials (they need to start with lights/.../ etc.)


Edited by Judith, Yesterday, 11:36 AM.

  • RPGista likes this

#20 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36996 posts

Posted Yesterday, 11:37 AM

 

 

Thanks for the breakdown, I'm starting to figure out the process. It would be great if there was a tutorial for all this in the wiki that wasn't so vague (that or I'm completely missing it).

 

 

I assume you've seen these?

 

http://wiki.thedarkm..._Basic_Tutorial

 

http://wiki.thedarkm...=Material_Files

 

http://wiki.thedarkm...tiple_Materials





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users