Xonotic Forums
From .ut2 to .obj, then from .obj to misc_gamemodel. - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10)
+--- Forum: Xonotic - Editing and Concept Art (https://forums.xonotic.org/forumdisplay.php?fid=11)
+--- Thread: From .ut2 to .obj, then from .obj to misc_gamemodel. (/showthread.php?tid=2911)



From .ut2 to .obj, then from .obj to misc_gamemodel. - neXus - 04-17-2012

If i try converting a .ut2 map into .obj and then import the .obj into Radiant, i only get the X,Y,Z axis on the 3d screen.


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - Soelen - 04-17-2012

maybe the model is so tiny, you maybe have to scale it to see anything.
Luckily you can scale misc_model with entity attribute.

Mark your misc_model, press n to open the entity inspector and write a new key called modelscale with an attribute of 100. Press enter to apply.
If you made everything right and you still dont see anything, netradiant probably dont accept your .obj file, or the .obj file is just empty.

Known causes why netradiant dont want to accept .obj files sometimes: Unconnected edges and verticies, edges which dont create a polygon, double edges and verticies.
But try first modelscale 100.


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - Cortez666 - 04-17-2012

i dont know anything about converting .ut2 into .obj, but if it worked then the following steps are simple.

1. put the .obj \Xonotic\data\models
2. misc_model
3. chose to show obj files instead of md3
4. open it
5. scale it


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - neXus - 04-17-2012

hmm... unfortunately my radiant doesnt accept the obj file.
i'll try with an .ase file.

btw. i forgot to say that i used blender to have a view of the map and i think i accidentally moved some brushes.

it seems that the .obj itself is broken. the UnrealEd creates too many edges and vertices.


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - Soelen - 04-17-2012

If you may post the blend file. I' going to try and if I have somehow success I'll post a video how to.


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - neXus - 04-17-2012

ok here's the link : http://dl.dropbox.com/u/67627614/rankin.obj


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - Maddin - 04-17-2012

Seems like the model is broken or not campatible. NetRadiant gives the following error message:
Code:
PICO_WARNING: No group defined for usemtl, so creating an autoSurface in OBJ, line 7.
PICO_WARNING: Undefined material name in OBJ, line 7. Making a default shader.
PICO_ERROR: Vertex index out of range in OBJ, line 25.

It´s also a bad idea to use a single model as a whole map! Very bad performance! Better you´ll rebuild the map with normal brushes!


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - Cortez666 - 04-17-2012

(04-17-2012, 03:27 PM)Maddin Wrote: It´s also a bad idea to use a single model as a whole map! Very bad performance! Better you´ll rebuild the map with normal brushes!

its not a bad idea, if you do it right. The problem here seems to be that also stuff which needs shaders, have been compressed into a model. A long with a lot of other stuff from ut.

With the support of some additional caulk brushes, huge models wouldnt be a problem but in this case the model just seem to be fucked up.


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - divVerent - 04-18-2012

When exporting from blender, make sure "material groups" are enabled. They're necessary to associate the model surfaces with the textures properly.


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - Soelen - 04-18-2012

Holy macaroni! You just gave me an obj file which has the magnificent size of 33mb! 500 000 Verticies! How could netradiant even accept this file heh
I just tried to merge all objects into one, removed all doubles (400 000 doubles) and exported it yet again as an obj file. Netradiant crashed ^^

Anyway, I would like to reply maddin and cortez comments first.

(04-17-2012, 03:27 PM)Maddin Wrote: It´s also a bad idea to use a single model as a whole map! Very bad performance!

Yes and/or No because

(04-17-2012, 04:11 PM)Cortez666 Wrote: its not a bad idea, if you do it right.

I would like to refer to dearsoelensroom since the whole map is just an obj file, not a good map but still good in perfomance since I tried to model every object low-poly and simple. Dearsoelensroom is has 6000 verticies, if you want to compare this number to an average modelobject, every weapon in xonotic has +/- 4000 verticies.

Why could objects be very bad in perfomance you might ask?

Imagine you have 2 different versions of a map, one made with blender which is exported as an model file (like .obj, .ase, .md3), and one with brushes.
When you are playing a map in xonotic, you see everything what the viewport renders. The viewport is a rendered image given from the engine, showing your actions in the game.
To render your viewport, darkengine needs to know what needs to be drawn.

When you play the brush version of the map, darkengine ignores all brushes which are not in the viewport or behind other objects, other brushes. This means less calculation for your pc, so maps with no open landscape will gain good perfomance.

When you play the model version of the map, darkengine still sees everything as one model, so no matter if you are staring just at a wall or being in a tiny room, darkengine still need to calculate every position of a vertex point, every transformation of a texture etc etc.

So here's the thing about model based maps:
  • It is possible, but you have to work very lowpoly to gain good perfomance for everyone.
  • When you do an model based map, try to export every object as a single .obj, .ase, .md3 file
  • if not animated, try the .ase format since it has also the capability to export materials right, not like the obj format
speaking of materials
(04-17-2012, 03:27 PM)Maddin Wrote: Seems like the model is broken or not campatible. NetRadiant gives the following error message:
Code:
PICO_WARNING: No group defined for usemtl, so creating an autoSurface in OBJ, line 7.
PICO_WARNING: Undefined material name in OBJ, line 7. Making a default shader.
These are normal messages from netradiant if you use obj files. Since netradiant does not read the given .mtl files, you always get this error messages.

Anyway GaryRoach, I fear creating a video were impossible by such an complex model, sorry dude. Sadly you are forced to work with brushes when my given statement above is not wrong. 500000, even 100000 verticies are simply too much for a model.

I also want to mention that brushes may act not ressourcefriendly sometimes, I would like to link to an thread which can solve this issue:
http://forums.xonotic.org/showthread.php?tid=2845
If dragging faces means that the amount of double verticies could be reduced, then I would like to see this feature indeed. =D

Please feel free to correct me if I might be wrong about the model behaviour in the darkengine.


RE: From .ut2 to .obj, then from .obj to misc_gamemodel. - neXus - 04-18-2012

ok. i'll try to build the map from scrap Smile