Quake3World.com Forums
     Level Editing & Modeling
        Importing models and Assign texture to imported model?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Importing models and Assign texture to imported model?

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-23-2013 06:12 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hi everyone, I'm total NOOB at GTKRadiant and have a couple of questions really. I'm using the new GTKRadiant v1.6.3 , 1. How do I import Quake models? I read that they are stored in pk3 files, I've tried to unzip them with winzip and winrar but to no avail? Keeps saying unsuported or corrupt? I can add to archive but then when I try to unzip all I get is the same file in .pk3 format. Really would like to import game assets but am stumped at this. Really appreciate any help.
OK, question 2. I am good with 3d modeling, using 3dsMax, Modo etc.. " http://www.theburgerman.co.uk " shameless plug :P and would really like to import models to the editor to use in levels. I have managed to import as .ase format and can view model in editor but no texture is on model. I press "n" for entity and need to know what to type in the "key and value " parameters to get tex to show on model. Any help you can offer please, driving me mad. Thanks.




Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-23-2013 10:44 AM           Profile Send private message  E-mail  Edit post Reply with quote


Ok, I got some information from browsing web and some from this forum... "http://www.quake3world.com/forum/viewtopic.php?f=10&t=44673&p=843408&hilit=importing+textures#p843408 " As "Obsidian" mentions in his post. I changed the .ase to .txt then I could change the texture path. So great that worked!
I am still stuck on how to load Quake models into the editor though... anyone help with that?




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 02-23-2013 05:06 PM           Profile Send private message  E-mail  Edit post Reply with quote


Welcome!

First, what game are you working on? Quake 3, Quake Live? The source models are compiled into the .bsp files so they are "baked" into the map, they are not actually distributed with either game.

If you are working with Quake 3 Arena, the source models used for the game are included with GtkRadiant 1.6.3, it will install the model files to your game directory in Quake3\baseq3\models\mapobjects.

If you are working with Quake Live, id Software has not yet made the models publicly available, however we (the GtkRadiant team) are working on this with id Software and trying to find a way to distribute them with all the proper licensing. For the time being, you can copy the Q3 models included with GtkRadiant into your QL directory and load them into the game. Most models are the same and will work, though there are some Q3 and QL specific ones which will result in missing textures (in which case you can try using a different model).

With either game, you load models into your map by right-clicking on the grid area, and choosing misc_model in the flyout menu. Choose the appropriate file format (ASE, MD3, etc.), then browse for the model you are looking for and hit OK.

Side note: For Q3, you can open the PK3 files in Winzip/Winrar/7-zip if you associate the .pk3 extension with the program. QL is a bit trickier since the PK3 files are encrypted. You'll need a utility like Quake Live Decembler to decrypt the file first.


P.S. Awesome modeling skills on your portfolio! I have much to learn from you in that regard. Share your knowledge with the community and write or record a few tutorials. ;)



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-24-2013 02:14 AM           Profile Send private message  E-mail  Edit post Reply with quote


Thanks Obsidian for quick response. I am working on Quake Live and I just checked it is ticked to load selected game at start up. So I guess that's why I couldn't open .pk3 files if they are encrypted like you said. Ok, If I un check load selected game at start up, I'm guessing I could choose to use Quake 3. Question, would this remove any files that I have made with Quake Live? The folder structure and what's inside? ie my play map? Thanks for the Decembler but I tried changing the extension to .zip but the prog still requested a password so couldn't use it for Quake Live .pk3s. :confused:




Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-24-2013 11:10 AM           Profile Send private message  E-mail  Edit post Reply with quote


Image

Having real fun learning this editor but having some problems. I really need to learn how to make my own shaders so any help would be nice. As you can see from pic, the model I imported looks cell shaded and the flag I made has no transparency. I'm really stumped with shaders as it looks real complicated. I've seen some examples online and even looking through Quake 3 scripts but a set format eg step 1, step2 etc.. would be nice.
I know shaders are written in a txt file "notepad" do I change the extention then to " .shader "? Also say I have "test_map" do I make a shader called "test_map" and put scripts in that? All I would like to know for the moment :smirk: is how do I script for a flag, if flag texture is called "flag_demon", what do I save that script as and where too? Oh, the flag texture is a 32bit Targa with an alpha channel that has black as opaque and white as transparent "bottom area of flag". And then how do I make the demon girl in picture look like stone? She has a marble texture mapped to her "devil_girl.jpg" but what would here shader file look like? I know this is a lot to ask, but I'm keen to import my own models and learn as I go. Thanks.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 02-24-2013 05:17 PM           Profile Send private message  E-mail  Edit post Reply with quote


You can change games at any point with GtkRadiant, it won't delete anything. All it does is install some content to your game directory the first time you use it with that game, and change the working directory to your game folder.

There is a link to the shader manual in my signature. It's a lot to read through, but don't be daunted. Take a look at some of the id software shader files, you can learn a lot by seeing how they do things. Shader files are just simple text files with a .shader extension. You can associate the extension to open in whatever text editor you like, Notepad, Notepad++, Sublime Text, etc.

You can name your shader file whatever you want (but good practice to name it as whatever your map name is) and place them in baseq3\scripts\, but also make sure to add the shader name (without the .shader extension) to the shaderlist.txt file in the same directory. Shaderlist.txt is the file that GtkRadiant and Q3Map2 reads to find all the shaders used by your map.

Here is a basic shader that should work on your flag (I did not test it). There are probably a few other optional directives that you can use on it like "deformVertexes" to make it ripple. Read the comments ("//") and refer to the shader manual for more details on what each directive does.

Code:
textures/burgerman/flag
{
   //these are global surface directives - affects entire shader
   cull none            //disables backface culling (surface visible from both sides)
   surfaceparm alphashadow   //casts shadow shape based on alpha channel
   surfaceparm trans      //prevents visibility issues
   surfaceparm nonsolid      //disables player+projectile collisions
   
   //this is the first texture stage - affects only this layer
   {
      map textures/burgerman/flag.tga
      alphaFunc GE128      //this texture has an alpha channel and we will use it for transparency
      depthWrite         //save this alpha channel to buffer so that other stages can use it too
   }
   
   //this is the second texture stage - affects only this layer
   {
      map $lightmap      //this is not a normal texture but a lightmap
      blendFunc filter      //blend this texture over the first stage using a "filter" (subtractive) blend
      depthFunc equal      //use the alpha channel that we saved to buffer in the first stage and apply it to this stage as well
      rgbGen identity      //this is sort of implied for lightmaps, sets default vertex colour values.
   }
}




The devil girl model looks as if she is missing UV coordinates, otherwise the texture should show up on it if you exported it as an .ase file correctly. If you're sure she has UV coordinates applied, try opening the .ase file in a text editor and making sure the file paths to the texture are correct as stated in that thread you linked above. If it's just a marble texture, she shouldn't need a shader file.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-25-2013 08:12 AM           Profile Send private message  E-mail  Edit post Reply with quote


Thanks Obsidian, that script worked great as you can see on the flag in the pics uploaded. I've added pic from in editor so you can see the marble texture is on model but why is it looking so bad in game? Is it lighting or what? What could I add to the shader to make it better? See attached pics to check my folder structure and if I did it correctly. I'll continue to look through the links you provided but any help in the meantime is greatly appreciated. Thanks again .
Image
Image
Image
Image
Image




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 02-25-2013 09:45 AM           Profile Send private message  E-mail  Edit post Reply with quote


Is that model lightmapped (forcemeta spawnflag)? Generally not a good idea on most models.

Do you have smoothing groups applied to your model in 3ds Max/Modo? You probably want to enable this for this kind of model.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-25-2013 12:15 PM           Profile Send private message  E-mail  Edit post Reply with quote


Hi Obsidian, thanks for all your help. The model has auto smooth groups done in 3dsMax. Not sure what you mean by "lightmapped (forcemeta spawnflag)? Only one texture used for colour (diffuse).




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 02-25-2013 12:38 PM           Profile Send private message  E-mail  Edit post Reply with quote


Something I forgot: How many triangles are on that model? I think the ASE format has some limitation where if the model is more than 1024 triangles, smoothing groups don't work properly. You may have to either reduce the number of polys or break the model down into 2 or more ASE models.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-25-2013 01:31 PM           Profile Send private message  E-mail  Edit post Reply with quote


Ok this is really starting to bother me now... :( So I've attached as much information as possible with these pics. Basically I looked through all my files to check every link and I found the paths were wrong from the .ase so I re did everything and renamed for convenience. Even with what I think are correct paths I'm still getting the same error on the devil girls texture. If anyone has time to look through this and come up with a solution would be just great.
Image
Image
Image
Image
Image
Image
Image

Obsidian... just saw your post as i POSTING this... yes this is a very high poly as I was new to editor and just wanted to test the model. Checked in Max and it has 7,595 polys so is prob way too high. I will check tomorrow with a reduced version. Can you tell me what is an acceptable level for a model?




Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 02-25-2013 07:46 PM           Profile Send private message  E-mail  Edit post Reply with quote


I think your problem there is the bitmap line. The \ should be /.
Or the other way around. I can't remember which it is. Am at work and cant check.
The first 2 texture path lines are one way, the bitmap line is the other.
//edit:
Iirc I think I normally write the line something like:
..//textures/myfolder/myshader.tga




Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-25-2013 11:23 PM           Profile Send private message  E-mail  Edit post Reply with quote


Hi dONKEY, did you mean the lines of code in the d.ase file? 'cos I just put / like you said for every backslash in there and the texture didn't show at all in game then.
I changed, (in the .ase file) MATERIAL NAME, MAP NAME , AND BITMAP all to forward slashes / is that what you meant? I appreciate your input on this thanks. In meantime I'm gonna reduce poly count and try new model import see if that works like Obsidian mentioned.




Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 02-26-2013 12:15 AM           Profile Send private message  E-mail  Edit post Reply with quote


I meant the first two texture paths should be \, the final (bitmap) should be / (I think I wrote the line correctly, like I said, am not at my computer to check).
Failing that check and recheck the shader/texture names and paths. These are simple things I know, but more often than not the reason textures don't show up. Oh, also make sure the name of the shader file is in the shaderlist.txt, that's another easily forgotten step.




Top
                 

Gibblet
Gibblet
Joined: 19 Jan 2012
Posts: 17
PostPosted: 02-26-2013 01:29 AM           Profile Send private message  E-mail  Edit post Reply with quote


I got models with over 10 000 polygons and smoothing groups work OK.
But if polygons are tiny even vertex lighting looks bad.
If i were you I'd shadow bake the model and lose the mirror, you got a model with a lot of polygons and that mirror is duplicating them.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 02-26-2013 07:53 AM           Profile Send private message  E-mail  Edit post Reply with quote


  • Models should go in models/mapobjects/nq1/d.ase
  • Your model texture (d.jpg) is probably best kept in the same directory as the model, in your case models/mapobjects/nq1/.
  • The flag is just a texture, so leave it in textures/nq1/
  • Models are vertex lit by default, unless you override it with a shader or with an entity switch. Models like this look horrible lightmapped (possibly why you're getting those lighting issues), just leave it vertex lit. You don't need a shader for this model, so just delete the shader for it.
  • In the .ASE file, texture paths need to use forward slashes, "/".




Cleric, is that with .ASE files? What modelling program are you using?

I have found that .ase files exported out of 3ds Max simply can't handle smoothing groups if there are more than ~1024 polys/triangles. It seems to randomly cause hard edges. This isn't a Q3 limitation, but I believe either some limit to .ASE files or a 3ds Max export bug. Perhaps you are doing something different that sidesteps this issue?



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Gibblet
Gibblet
Joined: 19 Jan 2012
Posts: 17
PostPosted: 02-26-2013 09:13 AM           Profile Send private message  E-mail  Edit post Reply with quote


That is with 3dsmax yes, I've had more problems with vertex lighting breaking on long thin triangles and looking bad with skybox lighting rather than smoothing group issues.
But it might be cause i make models for Urban Terror and not Q3?
Not sure if that engine was changed in some way so the smoothing group problem you're having is solved.




Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-26-2013 11:56 AM           Profile Send private message  E-mail  Edit post Reply with quote


Well I followed Obsidians advice with regard to folder structure and paths, also removed shader except for flag. Added a new model but realise after that it was 1,848 polys and that came out crap also. So made some low poly rocks, each one is only 96 polygons. They seem to render in game ok I think but other models still have bad shadowing on surface normals. I checked smoothing groups, checked and re checked and re checked as dONKEY advised but still have this problem. I edited paths in .ase files and put all forward slashes still loads models. Leads me to think that Obsidian is correct and that it is polygon count problem. Ah well I'll have to re topologise in future. At least I'm learning the hard way lol.

Image
Image
Image
Image
Image

A big thanks to everyone who gave me advice, much appreciated. :)




Top
                 

Gibblet
Gibblet
Joined: 19 Jan 2012
Posts: 17
PostPosted: 02-26-2013 12:26 PM           Profile Send private message  E-mail  Edit post Reply with quote


Would you be so kind and send me that model so i can run a few tests with it.
I give you my word i will not use it in mt work or redistribute it.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 02-26-2013 01:32 PM           Profile Send private message  E-mail  Edit post Reply with quote


Also, you can try splitting the model into two parts... say, wings and tail on one model and the rest of the body as another model, then just import both models into GtkRadiant and place them both on the same location.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 02-26-2013 04:32 PM           Profile Send private message  E-mail  Edit post Reply with quote


Stupid memory...
Should be like this:
Code:
*MATERIAL_LIST {
   *MATERIAL_COUNT 1
   *MATERIAL 0 {
      *MATERIAL_NAME "textures/dk_2012/lightbulb_b.tga"
      *MATERIAL_CLASS "Standard"
      *MATERIAL_AMBIENT 0.0000   0.0000   0.0000
      *MATERIAL_DIFFUSE 0.6864   0.5263   0.5263
      *MATERIAL_SPECULAR 1.0000   1.0000   1.0000
      *MATERIAL_SHINE 0.5000
      *MATERIAL_SHINESTRENGTH 0.0978
      *MATERIAL_TRANSPARENCY 0.0000
      *MATERIAL_WIRESIZE 1.0000
      *MATERIAL_SHADING Blinn
      *MATERIAL_XP_FALLOFF 0.0000
      *MATERIAL_SELFILLUM 0.0000
      *MATERIAL_FALLOFF In
      *MATERIAL_XP_TYPE Filter
      *MAP_DIFFUSE {
         *MAP_NAME "textures/dk_2012/lightbulb_b.tga"
         *MAP_CLASS "Bitmap"
         *MAP_SUBNO 1
         *MAP_AMOUNT 1.0000
         *BITMAP "..\textures\dk_2012\lightbulb_b.tga"
         *MAP_TYPE Screen
         *UVW_U_OFFSET 0.0000
         *UVW_V_OFFSET 0.0000
         *UVW_U_TILING 1.0000
         *UVW_V_TILING 1.0000
         *UVW_ANGLE 0.0000
         *UVW_BLUR 1.0000
         *UVW_BLUR_OFFSET 0.0000
         *UVW_NOUSE_AMT 1.0000
         *UVW_NOISE_SIZE 1.0000
         *UVW_NOISE_LEVEL 1
         *UVW_NOISE_PHASE 0.0000
         *BITMAP_FILTER Pyramidal
      }
   }
}




Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 581
PostPosted: 02-26-2013 04:36 PM           Profile Send private message  E-mail  Edit post Reply with quote


Multiple materials, same set up:
Code:
*MATERIAL_LIST {
   *MATERIAL_COUNT 2
   *MATERIAL 0 {
      *MATERIAL_NAME "textures/dk_2012/terminal.jpg"
      *MATERIAL_CLASS "Standard"
      *MATERIAL_AMBIENT 0.0000   0.0000   0.0000
      *MATERIAL_DIFFUSE 0.8000   0.8000   0.8000
      *MATERIAL_SPECULAR 1.0000   1.0000   1.0000
      *MATERIAL_SHINE 0.5000
      *MATERIAL_SHINESTRENGTH 0.0978
      *MATERIAL_TRANSPARENCY 0.0000
      *MATERIAL_WIRESIZE 1.0000
      *MATERIAL_SHADING Blinn
      *MATERIAL_XP_FALLOFF 0.0000
      *MATERIAL_SELFILLUM 0.0000
      *MATERIAL_FALLOFF In
      *MATERIAL_XP_TYPE Filter
      *MAP_DIFFUSE {
         *MAP_NAME "textures/dk_2012/terminal.jpg"
         *MAP_CLASS "Bitmap"
         *MAP_SUBNO 1
         *MAP_AMOUNT 1.0000
         *BITMAP "..\textures\dk_2012\terminal.jpg"
         *MAP_TYPE Screen
         *UVW_U_OFFSET 0.0000
         *UVW_V_OFFSET 0.0000
         *UVW_U_TILING 1.0000
         *UVW_V_TILING 1.0000
         *UVW_ANGLE 0.0000
         *UVW_BLUR 1.0000
         *UVW_BLUR_OFFSET 0.0000
         *UVW_NOUSE_AMT 1.0000
         *UVW_NOISE_SIZE 1.0000
         *UVW_NOISE_LEVEL 1
         *UVW_NOISE_PHASE 0.0000
         *BITMAP_FILTER Pyramidal
      }
   }
   *MATERIAL 1 {
      *MATERIAL_NAME "textures/dk_2012/controlpanel.jpg"
      *MATERIAL_CLASS "Standard"
      *MATERIAL_AMBIENT 0.0000   0.0000   0.0000
      *MATERIAL_DIFFUSE 0.8000   0.8000   0.8000
      *MATERIAL_SPECULAR 1.0000   1.0000   1.0000
      *MATERIAL_SHINE 0.5000
      *MATERIAL_SHINESTRENGTH 0.0978
      *MATERIAL_TRANSPARENCY 0.0000
      *MATERIAL_WIRESIZE 1.0000
      *MATERIAL_SHADING Blinn
      *MATERIAL_XP_FALLOFF 0.0000
      *MATERIAL_SELFILLUM 0.0000
      *MATERIAL_FALLOFF In
      *MATERIAL_XP_TYPE Filter
      *MAP_DIFFUSE {
         *MAP_NAME "textures/dk_2012/controlpanel.jpg"
         *MAP_CLASS "Bitmap"
         *MAP_SUBNO 1
         *MAP_AMOUNT 1.0000
         *BITMAP "..\textures\dk_2012\controlpanel.jpg"
         *MAP_TYPE Screen
         *UVW_U_OFFSET 0.0000
         *UVW_V_OFFSET 0.0000
         *UVW_U_TILING 1.0000
         *UVW_V_TILING 1.0000
         *UVW_ANGLE 0.0000
         *UVW_BLUR 1.0000
         *UVW_BLUR_OFFSET 0.0000
         *UVW_NOUSE_AMT 1.0000
         *UVW_NOISE_SIZE 1.0000
         *UVW_NOISE_LEVEL 1
         *UVW_NOISE_PHASE 0.0000
         *BITMAP_FILTER Pyramidal
      }
   }
}




Top
                 

Gibblet
Gibblet
Joined: 21 Feb 2013
Posts: 10
PostPosted: 02-27-2013 07:57 AM           Profile Send private message  E-mail  Edit post Reply with quote


Well I separated the wings and tail from the body, reduced the poly count with 3ds max pro optimiser modifier and got the body down to 1000 polys and the rest was less. A real slap dash attempt. Applied a new marble texture with new uv's. The result is no blocky texture effect, so that is good. So looks like the problem is definately a polygon limit. But new texture detail need lot of work. :cry: Also got seams where the wings and tail meets body because they're separate meshes.
Thing is cos I had to load separate meshes "body, tail wings" I tried to select them all to move to new location and they flew apart! So tried the "func_group" option but it wasnT allowed. So what I did was to copy the body origin and pasted it to the wings and tail, they then joined the body nicely. :D
One thing I've noticed is that I can call my .ase anything as long as the texture paths are correct, also I've had the .ase naming paths showing .jpg and without .jpg and it doesn't make a difference the model still shows up with texture without the .jpg extension.
Image
Image




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.