Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing models

#1
This tutorial will not cover modelling. It will cover briefly subject of importing models into the netradiant and setting, adjusting them properly.

The tutorial is done only for learning purposes, model itself was done quickly and only for this tutorial and the appearance might not be great! Although I have been helping others in mapping related stuff mind that this is my first tutorial like this therefore it might not be complete. If you have any questions, just ask.

The final result of this tutorial in my case looks like this (light bugs might caused by low quality of light settings or scaling)
[Image: model_finale.jpg]

Let's start:

First we have our model. Select it, go to File/export selected and save the model as .ASE file. (check on mesh definition, materials, mesh normals, mapping coordinates, geometric, shapes)

[Image: amodel1.jpg] [Image: model011.jpg]

Next step is to open the .ase file in a text editor (might be WordPad)
Change the material and texture absolute paths into relative paths (make sure the textures exist) like this. IF YOU HAVE MULTIPLE textures on your model (applied to different surfaces by ID) you will want to use multi-material in your modelling software and change paths of the submaterials. Make sure you didn't make typo and you have those textures set in right folder: xonotic/data/textures. In text editor you should write: textures/... (without xonotic/data)

[Image: model2.jpg]

Now its time to place changed .ase file in the data/models folder:

[Image: model3.jpg]

At this point if you did everything properly you should jump into editor and rightclick on one of the viewports, choose misc/ model. Models list should pop out and show offical Xonotic models (if you have paths set properly). Filter those models displaying .ase files and you should be able to find your custom model among others:

[Image: model4.jpg] [Image: model5.jpg]

Once you have the model in the editor you should press 'N' to bring up the entities menu and check boxes like: Solid, Force meta and also add other keys like: _castshadows 1, _receiveshadows 1, to increase shadows quality you also might add _lightmapscale key and set it to .1 for instance, if the model is not scaled properly you can add modelscale [value] key or adjust it manually using vector scale tool. You can also rotate models (use angle [value] key). After setting map and adding quickly player spawns build the map:
[Image: model55.jpg] [Image: model6.jpg]

Finally:jump into game, open console with '`'(key above Tab button on your keyboard), type 'map [mapname]' and hit enter. If its not showing textures on your model that might mean that your paths are set up wrongly. Make sure that your textures exist and have dimensions in powers of 2 (4x4, 8x8, 512x256, 1024x2048....). If the map does not want to launch, check that .bsp file is in the right place (Xonotic/data/maps) and make sure that none of the player spawns are in solid (player spawn should not be placed inside anything, make it slightly floating above the ground and away from the walls and solid models).
Good luck!
Reply

#2
Funnily enough, this will actually be useful for me too in the near future Big Grin

Thanks Justin, good work as always.
Do it yourself, or stop complaining.
Reply

#3
Very nice tutorial Justin! Wink

@everybody:
  • Does anybody know how to make the game/compiler use the smoothgroups/normals of the models and not reprocessing them. I tried to use the spawnflag "dont_fix_normals" but either it messed up the lightmap of the model or it doesn´t change anything.
  • Also the lightend models seem to behave differently in processing the colour and hue values. Any information about that?
  • .ase models with alphablend values totally mess up the lightmaps of my complete maps. Every time I include one, lightmaps are extremely bright...
Reply

#4
Interesting qestions, Maddin. Could you please elaborate?

1. When it comes to smooting groups: I use value of 1 for every surface and it imports without problems, anyway: I suggest switching them off (imported models aren't smooth, right? in the end It's all about number of polygons the model has I think). I tried different values and models were always buggy. Just invest in adding some polygons to your mesh. Tongue
2. Yes I noticed similar thing. Do you use default textures for your models? It might be caused by custom texture that reflects light differently.
3. I have no idea: I never used it. I used 'canvas tool' for terrain blending, which is basically painting on the model and saving your painting on the UV map. I have to learn actuall terrain blending...

Glad you find it usefull, Samual!
Reply

#5
1. Smoothgroups are important! Just using a higher amount of polygons doesn´t solve this problem in any way. Think about some pipes or organic objects like terrain and such things not smoothed properly... *shudder*

2. Using default textures...
Reply

#6
(01-02-2014, 02:11 PM)Maddin Wrote: Very nice tutorial Justin! Wink

@everybody:
  • Does anybody know how to make the game/compiler use the smoothgroups/normals of the models and not reprocessing them. I tried to use the spawnflag "dont_fix_normals" but either it messed up the lightmap of the model or it doesn´t change anything.
You need to split the edges between your "smooth groups" for it to work, in blender theres a modifier you can add that does just that; 3ds i haven't used for so many years that i really have no idea how to automate that (tough i do remember that's how the old md3 exporter did it). EDIT: you can also use -np XX (or its shader level relative, q3map_shadeangle, to let q3map2 handle it. note that this will merge/split surfaces to smooth them so usually a bit of a blunt stick)

Quote:
  • Also the lightend models seem to behave differently in processing the colour and hue values. Any information about that?
Different than what? Are you sure you have the appropriate flags set (usually lightmapping one on/off is what makes the largest visual difference)

Quote:
  • .ase models with alphablend values totally mess up the lightmaps of my complete maps. Every time I include one, lightmaps are extremely bright...
You need to use COLOR_TO_ALPHA on those (im assuming you're trying to get a blend shader going).
Reply

#7
Sticky!
Reply

#8
(01-06-2014, 09:14 AM)tZork Wrote: You need to split the edges between your "smooth groups" for it to work, in blender theres a modifier you can add that does just that; 3ds i haven't used for so many years that i really have no idea how to automate that (tough i do remember that's how the old md3 exporter did it). EDIT: you can also use -np XX (or its shader level relative, q3map_shadeangle, to let q3map2 handle it. note that this will merge/split surfaces to smooth them so usually a bit of a blunt stick)
I know how to handle smoothgroups in Blender. The problem is that q3map2 autonomously regenerates the normals, you can see that in Justin´s screenshots too. "-np N" affects the whole level thus making other geometry looking ugly too. "q3map_shadeangle" isn´t an option either as it works a bit different and extends the amount of work quite a bit when you have to rewrite every shader for some models. All this tricks shouldn´t be needed if "dont_fix_normals" simply worked.

I made some tests with a misc_model and compared the results with a BSP brush and a patch mesh (same order at screenshot, left to right...):

model in Blender with sharp edges (marked turquoise) and edge split modifier
[Image: blender.png]

default misc_model, no spawnflags: the model does not use specularmapping, the normals are not the ones from the model (they are generated by q3map2) but with smoothing
[Image: default.jpg]

misc_model with "force_meta": the model properly uses specularmapping, the normals are not the ones from the model (they are generated by q3map2) and with some random, ugly smoothing
[Image: forcemeta.jpg]

misc_model with "force_meta" and "dont_fix_normals": the model properly uses specularmapping, the normals for the lightmaps are not the ones from the model (they are generated by q3map2) and still with some random, ugly smoothing, but the normals for the model geometry is used from the model itself, so there needs to be something wrong about the lightmap calculation...
[Image: forcemeta_dontfixnormals.jpg]
... and here is the last build of the model with showing normals (blue is Z, the normal vector of the vertex):
[Image: forcemeta_dontfixnormals_normals.jpg]
... only looking at the normals this seems alright, but the lightmaps are still screwed.



(01-06-2014, 09:14 AM)tZork Wrote: Different than what? Are you sure you have the appropriate flags set (usually lightmapping one on/off is what makes the largest visual difference)
I am sure that I have set them right ("force_meta" and "solid" if needed).



(01-06-2014, 09:14 AM)tZork Wrote: You need to use COLOR_TO_ALPHA on those (im assuming you're trying to get a blend shader going).
Did that. But it seems to be caused, nevertheless, by the .ase model. Maybe it´s the exporter I am using.
Reply

#9
(01-06-2014, 10:53 AM)Maddin Wrote:
(01-06-2014, 09:14 AM)tZork Wrote: You need to use COLOR_TO_ALPHA on those (im assuming you're trying to get a blend shader going).
Did that. But it seems to be caused, nevertheless, by the .ase model. Maybe it´s the exporter I am using.
Do you have lightmapscale set on your model? If yes, whats the value? Mabye its too high quality for your mesh? I did _lightmapscale 0.01 on the big lowpoly cave model and that's what I got:
https://dl.dropboxusercontent.com/u/9049...737-00.jpg
Reply

#10
No I didn´t. A lightmapscale of 0.01 is insane! Big Grin
Reply

#11
hmm i can't say i have run in to this particular problem, so not sure what to suggest then - testing a alternative exporter / format could be worthwhile for troubleshooting. testing q3map_lightmapSampleOffset, q3map_nonplanar and q3map_shadeangle could help it its indeed lightmap related.
Reply

#12
As I said, it really should not require any shader work to get smoothed models. For me it rather seems to be a kind of bug/not working feature, do you think I should open a ticket for this on the development site?

Could you be so kind and try to reproduce this?
Reply

#13
EDIT: Something wonky with the path's i guess; compiling in netradiant worked. But i get similar issues as you i guess q3map2 got br0k3d wrt this somehow. Ill try recompiling some old known working map using models, if i can find one.
EDIT2: stuff i used to test with is in tzork/modeltest

Tried to, but whatever i do all i get is
"ERROR: PicoLoadModel: Failed loading model models/map_modeltest/modeltest.ase"
apparently something changed and i have no idea what. model shows up fine in radiant 1.6 but simply refuse to compile. ill try and look into it when i have some more time on my hands.
Reply

#14
(01-07-2014, 11:47 AM)Maddin Wrote: As I said, it really should not require any shader work to get smoothed models.

you can specify shadeangle for model and func_group via following entity key synonyms
_shadeangle, _smoothnormals, _sn, _smooth

as for your issue, it looks like incompatibility of q3map2 with your exporter
Reply

#15
Very good idea Garux! I tried that keywords and they work but still, the geometry is split up into random parts thus resulting in weird lighting as you can see:

[Image: forcemeta_shadeangle_entity.jpg]

One thing though, I noticed, is that smoothing via those keywords results in smoothing of vertexes which aren´t even connected. This makes sharp edges/ flat surfaces useless.
Reply

#16
i'v got fine cylinder here
   
3dsmax2010 (didnt even unweld endcap .o), ase, forcemeta, netradiant's q3map2
one with 'nosmooth' flag looks a bit buggy, but acceptable

i also found info about fixing smoothgroups issue by TwentySeven for urt q3map2
http://web.archive.org/web/2009031308274...extend.107
Reply

#17
Could you upload the map and the model you used so I can try out myself?

And what do you mean with "nosmooth flag"? Is it inside 3DSMax or NetRadiant? NetRadiant at least doesn´t have that property.
Reply

#18
nosmooth spawnflag is other name of "dont_fix_normals" one


Attached Files
.zip   59.zip (Size: 4.66 KB / Downloads: 3)
Reply

#19
To answer my own question, here is a working Blender export setup which works flawlessly with Xonotic:
[Image: object_export.png]
Reply

#20
I have a question, how to make a transparent texture to the finished model? i have diffus, specular, opacity, normal

as I understand I need to just make a 3 textures fern_01.jpg, fern_01_alpha.jpg, fern_01_norm.jpg, but fern_01_alpha dont work

Zero - an eternal primordial emptiness the principle of generation of all things.
my Site: http://zeromapping.narod.ru
my Steam: http://steamcommunity.com/id/zeromapping/
my Bananite: http://gamebanana.com/members/1317180
Reply

#21
Transparent textures require custom shaders, something like this should generally work:

Code:
textures/map_mapname/fern_01
{
    qer_editorimage textures/map_mapname/fern_01
    surfaceparm alphashadow
    surfaceparm nonsolid
    surfaceparm nodlight
    surfaceparm nomarks
    surfaceparm noimpact
    surfaceparm nolightmap
    cull disable
    {
        map textures/map_mapname/fern_01
        rgbGen identity
        depthWrite
        alphaFunc GE128
    }
    {
        map $lightmap
        blendfunc filter
        rgbGen identity
        tcGen lightmap
        depthFunc equal
    }
}

Save that as scripts/map_mapname.shader and include just map_mapname in shaderlist.txt.
[Image: 230.png]
Reply

#22
Wink 
Tnx, i solved the problem, problem was in the model. It was enough to cover the model of one diffus texture, without specular, opacity, normal


[Image: xN3PjgNU.png]

Zero - an eternal primordial emptiness the principle of generation of all things.
my Site: http://zeromapping.narod.ru
my Steam: http://steamcommunity.com/id/zeromapping/
my Bananite: http://gamebanana.com/members/1317180
Reply

#23
I had another question, how to make a lot of skins on one model?

Zero - an eternal primordial emptiness the principle of generation of all things.
my Site: http://zeromapping.narod.ru
my Steam: http://steamcommunity.com/id/zeromapping/
my Bananite: http://gamebanana.com/members/1317180
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [NEED HELP] Editing Pick-Up Models NoClue 3 1,135 11-25-2022, 06:17 AM
Last Post: NoClue
  List of Free/GPL Models & Programs AllegedlyDead 7 14,241 10-26-2021, 10:35 AM
Last Post: Dares
  How to import Weapon Models? NoClue 6 3,416 12-23-2020, 10:26 AM
Last Post: Julius
Brick New Shotgun and Uzi models MirceaKitsune 6 4,077 07-17-2020, 01:18 PM
Last Post: _para
  [NEED HELP] NetRadiant Models Not Working 3agle427 7 5,278 06-26-2020, 11:40 AM
Last Post: DarkFox
Rainbow [NEED HELP] Player models. Import to blender, export to xonotic. Snekky 1 3,644 04-19-2020, 09:16 AM
Last Post: DarkFox
  [NEED HELP] Texture problems in MD3 exported models (Quake 3) xLuca91x 9 6,591 03-31-2020, 03:13 PM
Last Post: xLuca91x
  Renamon & Krystal player models MirceaKitsune 37 59,626 12-12-2019, 07:51 AM
Last Post: Mario
  Seeking artist for new character models MarisaG 0 2,281 10-12-2018, 05:25 PM
Last Post: MarisaG
  Request for Models Cortez666 6 7,270 07-14-2016, 01:36 PM
Last Post: Cortez666

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-