EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Tools (https://www.eqemulator.org/forums/forumdisplay.php?f=593)
-   -   EQG Zone Importer (https://www.eqemulator.org/forums/showthread.php?t=38384)

Akkadius 07-16-2014 11:20 AM

I may not post, but I think this thread is cool to watch :)

501st 07-18-2014 08:35 PM

By Azura the things that happen when I'm MIA...

Just the npc thing alone, I remember wishing I could get modern npc models in older clients. In fact, Akkadius may specifically recall me crying about the Bellikos prior to Underfoot becoming a stable client...when the highest we had was SoD.

This is phenomenal. I need to get back into all this =X

Zaela_S 07-20-2014 06:34 AM

Quote:

Originally Posted by Zaela_S (Post 231455)
I might be able to whip something up for imported models only -- the .obj file does keep track of different named sections of geometry from the modeller (with the "Objects as OBJ Objects" export option from Blender, for example), so I could keep those in an external file and read from there. Probably worth doing; the list is just way way too long to look at as things are.

Went ahead and did this. Added a new tab called "OBJ Data": if you import a zone that has been exported with the "Objects as OBJ Objects" from Blender or equivalent, this tab will enable you to edit triangle flags by the "logical" divisions of the zone mesh from your modelling tool. For example, if you have a section of your zone mesh called "Hill" in Blender, there will be a listing for "Hill" in this tab which will refer to the same triangles. These are further subdivided by any materials that are applied to them; you can edit flags for only a certain material of a certain section of the mesh or for the whole section of the mesh regardless of materials.

tl;dr better triangle flag editor

http://i.imgur.com/rst4Ufd.png

Also added strafe movement to the zone viewer and stopped it wasting cpu time when the window doesn't have focus (probably shouldn't need to re-render at all unless the camera just moved now that I think of it... maybe next time).

Packet 07-22-2014 09:53 AM

Good work Zaela. I'll give an update soon on my progress. Again, thank you thank you thank you.

Edit: I noticed a bug some time ago that I figured (while not a big issue, can be easily replicated.). File->New EQG. then open the new EQG file you've just created.

You'll receive this error:

Quote:

.\gui/loader.lua:46: attempt to concatenate local 'ext' (a nil value)
stack traceback:
.\gui/loader.lua:46: in function 'LoadZone'
gui/main.lua:58: in function <gui/main.lua:49>
(tail call): ?
[C]: in function 'MainLoop'
gui/main.lua:255: in main chunk
Also, Zaela - I still get that "Attempted to index a nil value" error when trying to import a specific models as zone geometry. Is there some sort of triangle limit to .ter? Do you have any idea what it means by "nill value"? I mean, I understand something is missing but I'm trying to understand what is missing. I've manually looked through my obj file (as well as the mtl file) and I just don't see it.

3rd Edit:
I've narrowed the issue down to one of two possibilities. The UV mapping OR the texture itself. I have 3 models which are unwrapped via 3ds max and textured however, if I remove those 3 material entries from the mtl file - I get a successful import and the models come in without a texture. My next import, I will change the physical texture file out with one that already works to see if that's the difference. If the import fails, then this is likely because there is something wrong with the UV's themselves.

4th Edit:
Alas, swapping the textures (and I also tried swapping all of the material attributes from one that's working) resulted in the "nill value" error. I really don't know what's going on here. It seems to just not like the UV's on these specific models. I just don't get it. I unwrapped these models exactly the same way that I did everything else. Is there any logging or information that I can collect that'd tell me where to find said null value?

Zaela_S 07-22-2014 08:28 PM

Quote:

Originally Posted by Packet (Post 232119)
Edit: I noticed a bug some time ago that I figured (while not a big issue, can be easily replicated.). File->New EQG. then open the new EQG file you've just created.

There isn't really any reason to open a newly created EQG since there's nothing in it but an empty encoded directory. Will automatically be opened when you import something into it. Will fix it choking on contained files (or "files") with no extensions, though.

Quote:

Originally Posted by Packet (Post 232119)
Also, Zaela - I still get that "Attempted to index a nil value" error when trying to import a specific models as zone geometry. Is there some sort of triangle limit to .ter? Do you have any idea what it means by "nill value"? I mean, I understand something is missing but I'm trying to understand what is missing. I've manually looked through my obj file (as well as the mtl file) and I just don't see it.

3rd Edit:
I've narrowed the issue down to one of two possibilities. The UV mapping OR the texture itself. I have 3 models which are unwrapped via 3ds max and textured however, if I remove those 3 material entries from the mtl file - I get a successful import and the models come in without a texture. My next import, I will change the physical texture file out with one that already works to see if that's the difference. If the import fails, then this is likely because there is something wrong with the UV's themselves.

4th Edit:
Alas, swapping the textures (and I also tried swapping all of the material attributes from one that's working) resulted in the "nill value" error. I really don't know what's going on here. It seems to just not like the UV's on these specific models. I just don't get it. I unwrapped these models exactly the same way that I did everything else. Is there any logging or information that I can collect that'd tell me where to find said null value?

I haven't added logging or error dumps yet but I guess I'll do that next. I still have no issues with your stuff. Nil value error is pretty generic, but basically just means something that is expected to exist does not. Given what you've said it sounds like it is failing to find some textures listed in the .mtl file. The paths from that file are ignored, only cares about the file name which it looks for in the same folder as the .obj file. If your textures are all there, then I'm not sure what to say. Can only think of generic things: make sure the absolute path to each texture is less than 256 characters (old windows limit), maybe try making sure there are no spaces in the absolute paths (shouldn't matter).

Maybe I'll make it search in more places as well.

Packet 07-24-2014 01:43 PM

Yeah it's very strange. All of my textures are in the root folder of the .obj file and the paths are perfectly correct. I even import the obj into other programs without any texture issues which is why I am confused. I also tried moving the entire project to D:\zone\ to reduce the path lengths and it made no difference.

Zaela_S 07-27-2014 08:42 AM

I threw together some basic logging, mostly just during imports and particularly around the parts dealing with textures. We'll see if we can at least pinpoint which part is failing on you :|

Packet 07-28-2014 12:09 PM

Quote:

Originally Posted by Zaela_S (Post 232247)
I threw together some basic logging, mostly just during imports and particularly around the parts dealing with textures. We'll see if we can at least pinpoint which part is failing on you :|

[07/28/14 11:12:57] Loading UI
[07/28/14 11:12:57] Loading zone EQG from 'D:\Zone\nexus.eqg'
[07/28/14 11:12:57] Could not open zone EQG
[07/28/14 11:13:10] Creating new EQG file at 'D:\Zone\nexus.eqg'
[07/28/14 11:13:10] Successfully created new EQG file
[07/28/14 11:13:23] Starting IMPORT from OBJ format
[07/28/14 11:13:27] Found OBJ file with 964690 lines at 'D:\Zone\entire_zone.obj'
[07/28/14 11:13:27] Attempting to read MTL file from 'D:\Zone\entire_zone.mtl'
[07/28/14 11:13:27] Found material 'terrain_diff'
[07/28/14 11:13:27] Found diffuse map name 'Terr.png'
[07/28/14 11:13:27] Found material 'terrain_object_opaque'
[07/28/14 11:13:27] Found diffuse map name 'obj_txr.bmp'
[07/28/14 11:13:27] Found material 'terrain_object_alpha'
[07/28/14 11:13:27] Found diffuse map name 'obj_txr_alpha.png'
[07/28/14 11:13:27] Found material 'base_flr'
[07/28/14 11:13:27] Found diffuse map name 'base_floor.png'
[07/28/14 11:13:27] Finished reading MTL file
[07/28/14 11:13:36] Finished reading OBJ vertices, normals, texture coordinates and faces
[07/28/14 11:13:36] Searching for texture files to import from directory 'D:\Zone\'
[07/28/14 11:13:36] Searching for images to import for material 'terrain_diff'
[07/28/14 11:13:36] Material had diffuse map 'Terr.png' listed
[07/28/14 11:13:36] Attempting to find file 'Terr.png' at 'D:\Zone\Terr.png'
[07/28/14 11:13:37] Imported 'terr.png' successfully
[07/28/14 11:13:37] Searching for images to import for material 'terrain_object_alpha'
[07/28/14 11:13:37] Material had diffuse map 'obj_txr_alpha.png' listed
[07/28/14 11:13:37] Attempting to find file 'obj_txr_alpha.png' at 'D:\Zone\obj_txr_alpha.png'
[07/28/14 11:13:46] Imported 'obj_txr_alpha.png' successfully
[07/28/14 11:13:46] Searching for images to import for material 'terrain_object_opaque'
[07/28/14 11:13:46] Material had diffuse map 'obj_txr.bmp' listed
[07/28/14 11:13:46] Attempting to find file 'obj_txr.bmp' at 'D:\Zone\obj_txr.bmp'
[07/28/14 11:13:53] Imported 'obj_txr.bmp' successfully
[07/28/14 11:13:53] Searching for images to import for material 'base_flr'
[07/28/14 11:13:53] Material had diffuse map 'base_floor.png' listed
[07/28/14 11:13:53] Attempting to find file 'base_floor.png' at 'D:\Zone\base_floor.png'
[07/28/14 11:13:53] Imported 'base_floor.png' successfully
[07/28/14 11:13:53] Import from OBJ complete
[07/28/14 11:13:53] Loading 'nexus' from 'D:\Zone\nexus.eqg' after import
[07/28/14 11:13:53] Writing gui/settings.lua
[07/28/14 11:13:53] Attempting to save 'nexus.ter' and 'nexus.zon' to active directory
[07/28/14 11:13:53] Error writing to active directory: attempt to index a nil value

Packet 07-30-2014 09:56 AM

I threw this together yesterday. The textures are sloppy because I didn't put a whole lot of time into it. I made this in an attempt to replicate my problem. So I created these models from scratch, unwrapped and textured them. The walls are simply duplicated copies. Here's the kicker... I was able to compile the zone before I started duplicating the walls. After duplicating the walls to surround the court-yard area - I started getting the nill error. So I deleted the duplicated models with the exact same results. I don't get it. I've gone ahead and uploaded this model (which im importing as zone geometry) to my webserver if anyone wants to try to compile this as a zone. I'm curious if it's just me.

Download: http://xonos.net/zone/base/Aztek.zip
(PS: You're free to take this model and use it if you want it. I probably won't even use it as I hate the textures. If you do, let me know if you want the normal maps for bump mapping.)

http://xonos.net/zone/base/ss1.png
http://xonos.net/zone/base/ss2.png
http://xonos.net/zone/base/ss3.png
http://xonos.net/zone/base/ss4.png

knowom 07-30-2014 10:24 AM

Even if the textures could be nicer it still looks really nice.

Secrets 07-30-2014 02:11 PM

Think I figured out the issue with Zaela, you have to use an existing eqg v1 file (crystallos.eqg or something) and import to that until Zaela fixes the tool.

http://puu.sh/axESD/3276eed869.jpg

Zaela_S 07-30-2014 02:35 PM

Issue with importing to newly-made EQGs should hopefully be fixed now. Not sure why it seemed to be related to certain files for you, Packet, but it could be a coincidence, or it could be that attempting to import into a new file for a second time technically plugged the issue from then on.

Tyen05 07-30-2014 03:18 PM

Where is that custom pvp server with your starcraft map, bro

My body is ready

Packet 07-30-2014 06:27 PM

http://xonos.net/zone/success.png
YES!!!!!!!!!!!

Pectabyte 08-02-2014 02:01 PM

The zone importer crashes for me every time I try to convert an s3d to eqg.
I've tried running the program as administrator but it still crashes.
Anyone else having this problem?


All times are GMT -4. The time now is 08:07 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.