PDA

View Full Version : EQG Zone Importer


Zaela_S
06-13-2014, 11:04 PM
By request-ish. A simple program for importing custom models and editing data for EQG-based zones.

Download link (www.shardsofdalaya.com/EQG Zone Importer.7z). Also on github (https://github.com/Zaela/EQGZoneImporter).

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

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

Zones are imported from the Wavefront .obj format. Instructions are mostly the same as for the EQG Weapon Model Importer (http://www.eqemulator.org/forums/showthread.php?t=38287).

Namely, from your 3D modelling program (such as Blender) you'll want to export to .obj with these options or equivalents:

* Apply Modifiers
* Include Edges
* Write Normals
* Include UVs
* Write Materials
* Triangulate Faces
* Objects as OBJ Objects

However, unlike with weapon models, zone models stick closely to the in-game coordinate system. So you'll want to export with positive Z as the Up direction.


This tool may have bugs etc etc. Some improvements could also be made if there is any interest. Currently it can only view data for zones using some of the earlier EQG formats (which is what this tool imports custom zones as). Also, it would probably be nice to survey existing "regions" in various zones to see what the options there are -- the "type" of region seems to depend on the region's name (e.g. "AWT_water" presumably makes the region count as water). The effects of individual bits in the per-triangle flags is also unknown -- if anyone figures some of them out, I'll add labels and make it possible to mass-edit triangle flags somehow.

Zaela_S
06-14-2014, 06:29 AM
Just wanted to confirm something I'd been wondering about: namely, whether the client cares if a particular zone is loaded from an S3D or an EQG.

It doesn't. Creating a "gfaydark.eqg" and importing a zone model to it was enough to make the game load that over the gfaydark.s3d files. So, hopefully, there won't be any reason to bother with the old, terrible formats as far as zones are concerned.

edit: added the ability to make empty EQG files to the tool in order to facilitate that.

One mild annoyance is that the zone's _chr.s3d file won't be loaded by default if the main geometry is loaded from an .eqg file instead. But I imagine you could get around that via the _chr.txt file just fine.

Zaela_S
06-14-2014, 11:59 PM
Just wanted to confirm something I'd been wondering about: namely, whether the client cares if a particular zone is loaded from an S3D or an EQG.

It doesn't. Creating a "gfaydark.eqg" and importing a zone model to it was enough to make the game load that over the gfaydark.s3d files.

So long as I'm talking to myself here, I suspect the same would be true of NPC models, at least the non-built-in-global ones. Will be interesting to see if I get around to making an animated model importer.

Kingly_Krab
06-15-2014, 12:02 AM
So long as I'm talking to myself here, I suspect the same would be true of NPC models, at least the non-built-in-global ones. Will be interesting to see if I get around to making an animated model importer.
That would be cool, once people start making use of these tools we'll start seeing much more custom stuff and this will open a new world of ideas and content to people.

Akkadius
06-15-2014, 02:29 AM
Once again Zaela, you're going to be talking to yourself at first. For most people its just seeing before believing.

You're doing remarkable work.

Weldarr
06-15-2014, 06:52 AM
So long as I'm talking to myself here, I suspect the same would be true of NPC models, at least the non-built-in-global ones. Will be interesting to see if I get around to making an animated model importer.


Zaela, you can definitely do this with the older graphic animations. I have been able to manually overwrite older graphics using the same identifier.

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

http://i.imgur.com/6jivaT1.png

Both of these use the old akheva identifiers (akf, akm) and were manually edited to use the newer EQLive akhevan graphics (identifiers; ahm, ahf). Also an interesting thing about some older models, is that many actually have male, female and neutral model types but only one or two of them have a graphic associated with them. (Old Akhevan Identifers: akf, akm, akn)

This is the model identifier list that I pulled from EQGraphicsDX9.dll for Titanium Client (other clients will have more on their respective lists):

HUM.HUF.KRB.FRY.CWR.ZMM.ZMF.MNR.EVE.SNK.SHL.MYG.KO R.GGY.FGP.DRC.DCM.DCF.CRL.CRH.ORK.CWG.FNG.KBD.WWF. FGT.SHD.LSQ.LSP.SEG.ASM.LVR.DRS.DRE.ANS.SPQ.TAR.PM A.SDR.MDR.BAS.LDR.KRN.GBN.DKE.DVS.CDR.MES.RKP.CNP. PRT.CRS.MAP.DBP.ROB.DBX.MNT.DDV.DSF.FRD.DMA.DDM.CH M.FRA.DSG.SCU.MUR.CLV.TGO.TLN.ISE.ISB.IWB.ILB.IFC. IBR.IHU.ICY.ILA.IEC.IWH.TTB.TMB.TAC.TWF.TGL.BON.CP T.RAK.TBL.VAS.CST.BRL.BOX.JKR.NIN.EEY.GLM.SDC.DRV. FGH.GBL.MMY.SKT.MMV.SYN.BGB.ROE.ROM.WUF.UVK.BVK.GV K.VEK.FUD.FSK.FMT.LGR.LGA.LUG.RPF.TPO.TVP.TPB.SPB. BTP.ZBC.SPD.RZM.AAM.BKN.UDF.WBU.EFE.WRB.VAL.QZT.PA F.KRK.WRU.WRW.SCE.STF.SMA.SVO.SKR.SSA.STA.PBR.TMT. PHX.CRB.ONT.GTD.XEG.RTH.UDK.MAR.ZEB.NMP.FMP.EMP.AM P.VAZ.TAZ.RAZ.NMH.NPT.TRW.FEN.SAR.HSS.MOI.GGL.BRV. KAR.NMG.CWB.GLC.BRC.JUB.STR.WMP.PUS.BUU.BUB.LEP.KO P.MAL.NMW.TIN.TRQ.SLG.NBT.CRO.VEG.TRT.TBU.BTX.SRG. DSB.GOJ.SKB.CLB.CLG.SRO.TMR.WRF.TRN.NYM.LUJ.SER.MU H.SOW.SPR.NET.GAL.SHR.SRV.SNN.LCR.ZEL.SCH.SGR.VOL. FUG.TEG.THO.WET.AEL.EEL.RNB.OWB.KHA.ECS.VAC.UNB.RH P.SKN.RON.STU.WLM.OTM.FSG.HIP.RGM.SBU.DIW.SUC.SED. SGO.RAP.MEP.IKG.DEV.WYV.FDR.BER.ISC.BAC.SSN.GOO.BR N.RAL.TUN.SOL.VST.TRK.FGI.DML.YET.KGO.XAL.RHI.MOS. LYC.DLK.SRW.SCR.EYE.DJI.PEG.UNI.INN.DRU.GRG.WOE.SE A.CLA.GSP.DRI.HAR.MER.WAS.MAM.SWO.LEE.KED.GOR.FRT. EFR.DER.DEN.DIA.COC.CAZ.LIZ.ALL.SPE.SCA.REA.ORC.FU N.DRK.BIX.SHA.TRE.WIL.GIA.WER.BEH.FRO.RTN.BTN.RAT. BAT.ELE.PIR.CUB.FIS.SNA.TNF.TNM.SEF.SEM.LMF.LMM.MM F.MMM.IZF.IZM.IWF.IWM.TZF.TZM.EPF.EPM.HPF.HPM.OPF. OPM.DPF.DPM.GPF.GPM.TSF.TSM.FBF.FBM.TBF.TBM.REF.RE N.REM.TPF.TPN.TPM.GSF.GSN.GSM.AKF.AKN.AKM.SDM.SHM. HSF.HSN.HSM.VPF.VPM.GMF.GMN.WAL.VRM.SIF.SIN.SIM.DR F.DRM.IVF.IVM.CEF.CEN.CEM.GEF.GEM.GDF.GDM.GFF.GFM. MIF.MIM.DVF.DVM.VSF.VSM.KAN.GAR.HLF.HLM.CLN.LIM.EG F.EGM.NGF.NGM.FPF.FPM.PIM.SPI.TEF.TEN.FAF.FAM.BRF. BRM.BGF.ZOF.ZOM.HHF.HHM.AVI.GOF.WOF.WOL.WOM.QCF.QC N.QCM.BEA.GOB.GNN.DRA.SHP.LAUNCHM.LAUNCH..DWF.DWM. OGF.OGM.ELF.ELM.BAF.BAM.DAF.DAM.HOF.HOM.HIF.HIM.HA F.HAM.ERF.ERM.IKM.KEF.KEM.FRM.PRE.SHIP....BOAT.... PPOINT..MINIPOM200

Thing to note: the list counts down from KRB as the first real graphic as Race #475

I would assume it to be possible to add a dll hook/inject in that would allow us to make our own identifiers, but that is beyond my expertise level and something that I have never honestly tried. Maybe someone with a bit more knowledge on that front could look into it.

- Vaion
The Hidden Forest

Zaela_S
06-15-2014, 11:39 AM
Zaela, you can definitely do this with the older graphic animations. I have been able to manually overwrite older graphics using the same identifier.

Makes sense.

I would assume it to be possible to add a dll hook/inject in that would allow us to make our own identifiers, but that is beyond my expertise level and something that I have never honestly tried. Maybe someone with a bit more knowledge on that front could look into it.

Saw someone do this just the other day! Beyond me too, though... Probably a bit heavy-duty for general use anyway.


Anywho: added region types to this tool since they had apparently been figured out already.

Akkadius
06-15-2014, 04:01 PM
Secrets has quite a bit of dll injection experience.

Secrets
06-15-2014, 06:52 PM
There's a part of the eqgame.exe that deals with exactly what you are trying to do.

The identifier for NPCs, as you have noted in your disassembly, can be a string that identifies a specific model and its parts.

For example, HUM refers to human male models. So in disassembly, we have pseudocode that looks like this in the class constructor:


CRaceGenderInfoManager::AddRaceGender(pCRaceGender InfoManager, 1, 0, "HUM", 4, 522);
CRaceGenderInfoManager::AddRaceGender(pCRaceGender InfoManager, 1, 1, "HUF", 4, 522);

*The first parameter is the global instance of CRaceGenderInfoManager.
*The second parameter is the ID of the race.
*The third parameter determines the gender (0, 1, 2) of the NPC. The fourth is a bitmask that tells the client what the latest model file format will be for this NPC. I'm unsure of its purpose but all EQG formats have 8 as the bitmask. Basically, it's for animations in some way.
*The fifth parameter is optional and contains fallback race animations in case those listed for the model fail to load. For Humans and some other races, it is 522 (Drakkin) for the fallback animations.

You can find the class constructor in the UF/SoD client by searching for "SHIP" and it's the only reference of the string "SHIP" in the defined strings list in IDA.

The animations are linked to the base model, and as such there's no way to load them from the client I believe. The animation data is stored in the wld file for S3Ds.

Yes, it is possible to add VoA+ models to the UF client. You'd just copy the lines from disassembly to a DLL to add the NPC models from the later clients.
Hook CRaceGenderInfoManager::CRaceGenderInfoManager() (the constructor that adds the races) and after it's done constructing, add in the races you'd like while using the instance returned from the thisptr.

Hope that gives some insight.

Zaela_S
06-15-2014, 09:50 PM
Thanks. Knew most of that at this point, actually. It's the "how to do dll injection 101" part that is beyond me ;p

Not really relevant (yet?) anyway. I can't see myself making any injection patcher type thing.

Zaela_S
06-16-2014, 08:45 AM
Added a small utility to convert S3D-based zones into EQG-based zones. Not at all complete -- just handles the main geometry at the moment, not things like placed objects, texture transparency masking, vertex lighting, etc...

Not terribly useful and easily the Feature Most Likely to Crash, but I mostly just wanted to put gfay underwater for a minute:

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

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

Underwater rain is a bit surreal. Making all of Kelethin into a slippy-slidey ice region would be fun too, but obviously harder to show.

I've decided that if I ever do try to make a zone, it'll be an epic tower climb where at least one floor is made of lava.

Secrets
06-16-2014, 04:10 PM
Added a small utility to convert S3D-based zones into EQG-based zones. Not at all complete -- just handles the main geometry at the moment, not things like placed objects, texture transparency masking, vertex lighting, etc...

Not terribly useful and easily the Feature Most Likely to Crash, but I mostly just wanted to put gfay underwater for a minute:

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

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

Underwater rain is a bit surreal. Making all of Kelethin into a slippy-slidey ice region would be fun too, but obviously harder to show.

I've decided that if I ever do try to make a zone, it'll be an epic tower climb where at least one floor is made of lava.

/that/ is fucking amazing rofl

Packet
06-16-2014, 06:31 PM
Thank you for the help Zaela. Much appreciated. :)

Just to show what I am working on, this is my latest work in building a moba-style server. The layout & concept was inspired by League of Legends and will resemble it as much as legally possible. This has not been imported yet however I'll be trying my best to work this in as the cornerstone zone for matches. I've put roughly 22 hours into this map so far.

- The beginning of the geometry & texture mapping.
http://xonos.net/test/moba_ss1.bmp

- Got some shiny rocks and a tree!
http://xonos.net/zone/ss2.png

- Getting closer to finishing.
http://xonos.net/zone/ss3.png
-
http://xonos.net/zone/ss4.png
-
http://xonos.net/zone/ss5.png


More shots on the next post.

Packet
06-16-2014, 06:32 PM
http://xonos.net/zone/ss6.png
-
http://xonos.net/zone/ss7.png
-
http://xonos.net/zone/ss8.png
-
http://xonos.net/zone/ss9.png

KLS
06-16-2014, 07:01 PM
I wondered why you were asking me about how EQG Regions worked the other day, I didn't know it would be to drown the elves.

Packet
06-16-2014, 07:09 PM
It didn't like my textures. I suppose I should work with DDS. Being used to openzone, I've been saving all my textures in 24-bit bmp's. I'll also need to adjust the scale a bit.

http://xonos.net/zone/ss10.png

knowom
06-16-2014, 07:13 PM
Packet are those in game EQ screenshots or are they renders of a zone in Blender or something? Looks pretty amazing, but a bit cartoonish WoW/Disney stylized a bit which look a bit like as well.

You could make a alternate 4 way faction vs faction map as well by removing the water and adding 2 more bases which could be pretty intense you could even have some water still too by utilizing some of the jungle area's for streams or whatever. This is defiantly exciting to see.

knowom
06-16-2014, 07:19 PM
It didn't like my textures. I suppose I should work with DDS. Being used to openzone, I've been saving all my textures in 24-bit bmp's. I'll also need to adjust the scale a bit.

http://xonos.net/zone/ss10.png

These aren't the greatest looking textures, but you can try some of these as temporary place holders if you want. You could also just rip textures from a s3d zone files as well and use those for now until you find or create custom textures of your own if your planning to share this zone map later.

http://www.eqemulator.org/forums/showthread.php?t=38290

Packet
06-16-2014, 08:01 PM
Packet are those in game EQ screenshots or are they renders of a zone in Blender or something?
They're renders from 3ds Max 2015. The only thing that I am uncertain about is how well the foliage will look in-game once I correct the texture format. I'm not entirely certain how alpha masking has changed within EQG's so I'm going to assume that it still uses the old black n' white masking. We'll see.

Looks pretty amazing, but a bit cartoonish WoW/Disney stylized a bit which look a bit like as well.
It's easier for me to make and realism isn't my goal here to be honest.

In all seriousness, I love Zaela for this tool. I've been needing it for years. lol

Secrets
06-16-2014, 08:37 PM
It didn't like my textures. I suppose I should work with DDS. Being used to openzone, I've been saving all my textures in 24-bit bmp's. I'll also need to adjust the scale a bit.

http://xonos.net/zone/ss10.png
http://puu.sh/9wQN2/0fc90f3185.png

Zaela_S
06-16-2014, 09:08 PM
It didn't like my textures. I suppose I should work with DDS. Being used to openzone, I've been saving all my textures in 24-bit bmp's. I'll also need to adjust the scale a bit.

PNG textures should work fine, probably preferable to DDS or BMP. The test model and texture you gave me earlier worked fine -- note that the tool expects the texture files to be in the same folder as the .obj file when you import.

I'm not sure how EQG zones handle masking yet (if it's a material property, I haven't come across it, and if it's a per-triangle flag bit, that would be a bit dumb).

KLS
06-16-2014, 09:34 PM
Not sure if this is what you were talking about exactly but crescent has some alpha materials.

Packet
06-16-2014, 09:40 PM
----------------
You made me choke on my dinner when I saw this.

PNG textures should work fine, probably preferable to DDS or BMP. The test model and texture you gave me earlier worked fine -- note that the tool expects the texture files to be in the same folder as the .obj file when you import.

I'm not sure how EQG zones handle masking yet (if it's a material property, I haven't come across it, and if it's a per-triangle flag bit, that would be a bit dumb).

Agh! I'm a fool. I've got all my textures in sub-folders.

knowom
06-16-2014, 09:46 PM
Packet btw I'm using InfranView image effects on some of those screenshots and they look even nicer with a "unmask sharp" between 2-4 applied. Image effect and filters in InfranView/GIMP/Photoshop can really do wonders to enhance textures. Merging two or more textures together to form a more detailed one can be a very nice touch also.

Here's a example of how you can enhance texture detail. This could really enhance some of your textures in a nice way though though they really aren't bad as is. I feel like the wood and rock textures in particular could personally benefit from a bit finer detail touches added to spruce them up.
http://blogs.msdn.com/b/shawnhar/archive/2008/11/03/detail-textures.aspx

Very awesome Packet and Zaela for providing the great tool that aided in the creation of it. Could make lots of different kinds of texture variations for your zone Packet. The MOBA design is great and could see it being widely used EQemu could use more custom zones like this. It's not only awesome, but it could actually be freely modded and shared around easily without all the copyright hassles presented with zones owned by Sony.

knowom
06-16-2014, 09:51 PM
Would love to see a step by step basic tutorial process on your zone creation Packet this is dope!

Zaela_S
06-16-2014, 09:52 PM
Not sure if this is what you were talking about exactly but crescent has some alpha materials.

Could be! I'll have to take a look later.

Agh! I'm a fool. I've got all my textures in sub-folders.

I might make it look for the textures at the paths listed in the .obj before defaulting to same-folder in the next update. Just wanted to make sure people could move things around or trade export files across machines and still have it work consistently.

Packet
06-16-2014, 10:02 PM
I might make it look for the textures at the paths listed in the .obj before defaulting to same-folder in the next update. Just wanted to make sure people could move things around or trade export files across machines and still have it work consistently.

I don't think that's a big deal. Honestly, I really don't mind keeping the files in the same project folder. I just assumed this was native. At this point, I'll take anything I can get.


Very awesome Packet and Zaela for providing the great tool that aided in the creation of it.

I didn't help create the tool. This is all Zaela.

Zaela_S
06-17-2014, 12:20 AM
I'm not entirely certain how alpha masking has changed within EQG's so I'm going to assume that it still uses the old black n' white masking. We'll see.

Okay well looking at some things it appears it just uses the alpha channel for transparency like some kind of reasonable thing. Too used to S3D format myself, I expected some kind of wrinkle ;p Haven't tested in-game but seems likely.

knowom
06-17-2014, 01:53 AM
I don't think that's a big deal. Honestly, I really don't mind keeping the files in the same project folder. I just assumed this was native. At this point, I'll take anything I can get.

I didn't help create the tool. This is all Zaela. What I was referring to was the zone you created or are creating I should say? Along with Zaela's tool that helped or is helping with part of the creation of it.

Secrets
06-17-2014, 07:00 AM
messed around with this a bit and gamecube model rips.

Super Smash Quest?

http://puu.sh/9xn4C/81c604ce65.jpg

Zaela_S
06-17-2014, 07:13 AM
The guard falling through the air really sells it.

I put up a new version, now has a mass triangle flag editor window in the "triangles" tab. Can edit flags for triangles based on a sub-range of them, the material they use, or both; and the flags themselves can either be overwritten to the new value or bitwise or'd to set specific bits on top of whatever they had before. Pretty simple. Might add an option for un-setting bits later.

Learned that bit 1 sets permeability/not counting for collision, so that's labelled now too.

Leetsauce
06-17-2014, 07:14 AM
Beautiful. Probably the coolest thing I've seen to date integrated into EQ. Can you pretty much map anything? FF7 textures, perhaps?

provocating
06-17-2014, 07:45 AM
Very cool stuff, I wish I had more of an artistic ability.

vsab
06-17-2014, 07:50 AM
I've been thinking about this in a slightly more philosophical sense - mainly because my home PC is out of action (actually the PC is fine, it's my house that's b0rked).

In EqEmu customisation is generally based on:-
1. Rule set tweaks
2. Custom quests
3. Custom NPC's
4. Custom Spells

Some go a bit further and have new classes, and so on. The tools that are growing now can potentially allow this customisation:-
1. Zones + models in them
2. Weapon models
3. Particles

This basically leaves "only" NPC/PC model mods left. These I suspect, will be the hardest to change if only because the artists required are pretty thin on the ground. Personally I like the hokey (N)PC models and animations, I prefer the newer modelled zones and weapons (although IMO they've made them all way too fancy on live).

The question is at which point does EqEmu basically become a generic MMORPG development system, and really not much of an emulator at all? Because if you completely change rules, quests, zones,spells, weapons, particles and mobs, then really the only thing tying in that system to Everquest is the client, which is the biggest PITA since currently there are no legally available clients (bar a lucky find on ebay).

I see there have been multiple attempts to make a new client (and I'm even thinking about it since I think I shall have to learn OpenGL for work and quite fancing mucking about with Unity3d too). Presumably though, if you shipped Sony's assets that had been modified to a different format that would be dodgy legally? I don't know if it would be dodgy if you could distribute the export program with the new client, so users would have to have their own legally obtained data files and run the converter before using the new client?

Zaela_S
06-17-2014, 09:16 AM
Making a client would be thousands of times harder than some dinky data editor, both in terms of effort and of required know-how. Would take far better programmers than me! (I made my "attempt" a few months back, good excuse to learn the basics of 3D graphics but not something to waste more than a few weeks on.) Of course, anyone who could work on that would probably be better served doing something for money, or at least, something that isn't trying to simulate a 15-year-old game client.

If someone were trying to make a "generic" make-your-own-MMO client, making it compatible with EQEmu servers probably wouldn't be worth it. EQ has too much legacy crap and terrible decisions that only made sense in ancient times (e.g. giving the client way too much information about enemy positions).

Packet
06-17-2014, 09:21 AM
Taking assets from the EQ client is not recommended as you stated, it is illegal. Also, a new client will take a very long time to make. You may want to look into the client WindCatcher was working on and build upon it.

vsab
06-17-2014, 10:56 AM
Oh god no, I'm not volunteering to write a new client! But I do need to brush up on OpenGl & Unity3d :) Let's face it a million people have posted "anyone fancy writing a new client?" and not gone anywhere.

And I think Windcatcher's code was written in Delphi (for which I have no IDE) and the source is hiding somewhere not obvious...

Packet
06-17-2014, 12:53 PM
Okay well looking at some things it appears it just uses the alpha channel for transparency like some kind of reasonable thing. Too used to S3D format myself, I expected some kind of wrinkle ;p Haven't tested in-game but seems likely.

Edit:Actually, I just confirmed that alpha masking doesn't seem to carry over when I export to obj. I re-imported my OBJ back into 3ds max and the textures were fubarred like they are in the screenshot below.

Transparency in .png textures isn't working out for me. I set the material to use the alpha channel and renders come out alright. But in-game, these are my results. I'm trying to find an EQG zone that has a model (like grass or something) that I can reference. Is there a different shader perhaps?

http://xonos.net/zone/ss11.png




I noticed something which may be intended by design but I thought I might bring it up. The materials that are imported (like my trees) are seemingly duplicated. I use the same material on a large majority of the duplicate meshes in my scene. Instead of re-using the same material, it duplicates a copy of the material which makes it hard to do "mass edits" to referenced objects sharing the same material. But I'm not sure if this was intended or not.

knowom
06-17-2014, 02:54 PM
Edit:Actually, I just confirmed that alpha masking doesn't seem to carry over when I export to obj. I re-imported my OBJ back into 3ds max and the textures were fubarred like they are in the screenshot below.

Transparency in .png textures isn't working out for me. I set the material to use the alpha channel and renders come out alright. But in-game, these are my results. I'm trying to find an EQG zone that has a model (like grass or something) that I can reference. Is there a different shader perhaps?

http://xonos.net/zone/ss11.png




I noticed something which may be intended by design but I thought I might bring it up. The materials that are imported (like my trees) are seemingly duplicated. I use the same material on a large majority of the duplicate meshes in my scene. Instead of re-using the same material, it duplicates a copy of the material which makes it hard to do "mass edits" to referenced objects sharing the same material. But I'm not sure if this was intended or not. Everquest Player Studio mentions "All texture maps must be in 24-bit TGA with no Alpha channel."

Google searched 24-bit TGA with no Alpha Channel and I came across this. http://www.yolkfolk.com/dizzyage/books/editor/page02.html

From the looks of it your texture images are opaque rather than transparent as your intending them to be. I had noticed player models and other stuff like UI use TGA files so seems there is a correlation. Anyway hope that helps you in figuring it out. Judging from the information in the link though you'd want 24-bit TGA "with" Alpha Channel in your case because you don't want your trees opaque.

vsab
06-17-2014, 03:38 PM
I FUCKING LOVED the Dizzy games :)

Packet
06-17-2014, 04:54 PM
From the looks of it your texture images are opaque rather than transparent as your intending them to be.

My textures are not opaque. Also, I've tried using an opaque alpha mask and that doesn't work for me either.

Zaela_S
06-17-2014, 10:06 PM
Edit:Actually, I just confirmed that alpha masking doesn't seem to carry over when I export to obj. I re-imported my OBJ back into 3ds max and the textures were fubarred like they are in the screenshot below.

Yeah you're right, I tried in game myself and it doesn't seem to respect alpha. I have no idea again. Nothing jumps out at me. The shader does seem like a logical place to look, though.

The materials that are imported (like my trees) are seemingly duplicated.

Whoops, laziness. I just put up a quick fix.

Scorpious2k
06-17-2014, 10:25 PM
Didn't Windcatcher have a program that converted a bmp to an image with transparency by adding the alpha layer? I think it came with OpenZone. Maybe it has some clues.

Zaela_S
06-17-2014, 10:46 PM
S3D-based zones have a bit flag for texture visibility settings. No direct equivalent in EQG-based zones.

The shader does seem like a logical place to look, though.

"Alpha_MPLBasicA.fx" seems like a good place to start. Will test later.

Need to compile a list of shader names at some point, seems like there are a bunch used by zones.

KLS
06-17-2014, 11:14 PM
Mat: brnch Alpha_MPLBumpAT.fx
prop: e_TextureDiffuse0 Di_Birch_branch03.dds
prop: e_TextureNormal0 Di_Birch_branch01_n.dds
prop: e_TextureCoverage0 oakcover.dds
prop: e_TextureFallback0 Di_Birch_branch03.dds
prop: e_fCoverageScale0 0.050000

There's the tree branches on the birch trees from Nektulos.

Packet
06-18-2014, 12:17 AM
Didn't Windcatcher have a program that converted a bmp to an image with transparency by adding the alpha layer? I think it came with OpenZone. Maybe it has some clues.

It was built-in to OpenZone, definitely. We could use a material which had two textures. One as the diffuse and the other as the opacity map (the black and white cuttout).

Yeah you're right, I tried in game myself and it doesn't seem to respect alpha. I have no idea again. Nothing jumps out at me. The shader does seem like a logical place to look, though.

Whoops, laziness. I just put up a quick fix.
Yeah. I was surprised PNG's worked though so that's good. I think I'm going to install a dds plugin for photoshop cs6 so that I can work with the native texture format now that you've confirmed that I'm not insane.


Mat: brnch Alpha_MPLBumpAT.fx
prop: e_TextureDiffuse0 Di_Birch_branch03.dds
prop: e_TextureNormal0 Di_Birch_branch01_n.dds
prop: e_TextureCoverage0 oakcover.dds
prop: e_TextureFallback0 Di_Birch_branch03.dds
prop: e_fCoverageScale0 0.050000

There's the tree branches on the birch trees from Nektulos.

Interesting. I'll try this again tomorrow and see if I can get this to come out. I suppose the first step is taking out all of these textures and examine which one is which and does what. The normal is obviously the bump mapping and the diffuse is the actual texture itself. So the only thing left is the Fallback & Coverage. I've seen coverage on materials without any alpha masking so I assume it's the fallback but I suppose we'll see tomorrow. Thanks for pointing this out KLS.

Zaela_S
06-18-2014, 12:31 AM
Yeah. I was surprised PNG's worked though so that's good. I think I'm going to install a dds plugin for photoshop cs6 so that I can work with the native texture format now that you've confirmed that I'm not insane.

DDS isn't any different. It's all the same by the time it gets to the renderer anyway.

Zaela_S
06-18-2014, 01:28 AM
Finally got the chance to test. Definitely controlled by the material shader:

Opaque_MaxCB1.fx (tool default)
http://i.imgur.com/4Dt4Tts.png

Alpha_MPLBasicA.fx
http://i.imgur.com/WuSzFet.png

Maybe not that exact one since it seems to have made the alpha texture further away show in front of the closer one around the middle there. But, you know.

Akkadius
06-18-2014, 01:55 AM
This is all crazy shit

KLS
06-18-2014, 02:04 AM
Looking at the disassembly for EQGraphicsDX9 it appears keywords in shader names determine the basic render method for the material.

There being a major keyword and a minor keyword that determines what render effect it has.

eg:


WaterFall

Water

Terrain

Lava2

Lava

AddAlpha
CBSGE1
CBGG1
CBSG1
CBS1
CB1
CE1
CG1
Alpha
MPLBasic
MPLBlendNoBump
MPLBlend
MPLFull2UV
MPLFull
MPLBump2UV
MPLBump
MPLSB2UV
MPLSB
MPLGB2UV
MPLGB
MPLRB2UV
MPLRB
C1DTP
CBSG1_2UV
CBST2_2UV
CB1_2UV
C1_2UV
CBGGE1
CBSGE1
CBSE1
CBE1
CBGG1
CBSG1
VSB
CBS1 (applies only if VSB not found)
CBS_2UV
CB1
CE1
CG1
Chroma
MPLBasic
CBSGE1
CBGG1
CBSG1
VSB
CBS1 (applies only if VSB not found)
CB1
CE1
CG1
AnythingElse (eg Opaque)
MPLBasic
MPLBump
CBSGE1
CBGG1
CBSG1
CBS1
CB1
CE1

KLS
06-18-2014, 02:26 AM
Mat: ddbrnch Chroma_MPLBumpAT.fx
prop: e_TextureDiffuse0 Di_Birch_branch_bare.dds
prop: e_TextureNormal0 Di_Birch_branch_bare_n.dds
prop: e_TextureCoverage0 oakcover.dds
prop: e_TextureFallback0 Di_Birch_branch_bare.dds
prop: e_fCoverageScale0 1.000000

Here's another branch, it appears Chroma materials also have some sort of blending to them.

Also are those ropes part of the TER or are they a placeable?

knowom
06-18-2014, 02:58 AM
Didn't Windcatcher have a program that converted a bmp to an image with transparency by adding the alpha layer? I think it came with OpenZone. Maybe it has some clues.

Wasn't done by Windcatcher to my knowledge, but is this what you were thinking of? Has to do with magic pink and alpha transparency.
http://www.project1999.com/forums/showthread.php?t=32380

This is all crazy shit

I think we can fairly unanimously agree to that statement. This is rather technical stuff I believe to most of us with no backgrounds in this kind of shit. Even if you had one in this stuff it seems like EQ has it's own way of doing stuff especially early EQ where the common used API's were different Glide vs Direct X.

It's actually quite remarkable and a accomplishment that a game that was dominantly played based on Glide in infancy early days evolved into what it is today and testament to the staying power of the game itself.

Zaela_S
06-18-2014, 03:34 AM
Also are those ropes part of the TER or are they a placeable?

Was part of the main geometry S3D so I translated it into the TER.

KLS
06-18-2014, 05:23 AM
It probably doesn't sort transparent materials within the ter, or perhaps it does it by model and the ter is a huge model with multiple materials that may be transparent.

Packet
06-18-2014, 10:12 AM
I think KLS might be onto something. I'm currently playing with the shaders to see what combinations do what and im documenting as I go.

I did have a question regarding shaders that perhaps you two could answer. How does the relation between materials and material properties work? Can there be multiple shaders per each property in a material?

Zaela_S
06-18-2014, 10:37 AM
Can there be multiple shaders per each property in a material?

Opposite direction, just one shader name per material. Just hard to indicate that in the tool without making the layout weird.

Packet
06-18-2014, 11:04 AM
Yeah. I assumed that was the case but I thought I should ask since multiple textures can exist within a material. If I could somehow add AddAlpha to normals or something but oh well.

What're you guys using to explore eqg's since s3dspy only supports s3ds.

Edit: Nvm, I see EQG's in there now. You know, I'm looking around at the physical textures of models in zones. For instance, "Harbingers.eqg". Take a look at "av_skull06_n.dds" and "av_skull06_c.dds" or even the branches KLS was talking about. The _n.dds normal maps all contain the same color as the backdrop that we want to subtract/filter out. Perhaps this is the key in combination with the appropriate shader.

I also noticed "all_alpha.dds" in nektulosa.eqg. Maybe the shader assigned to materials that use this texture will provide some insight as well.

Zaela_S
06-18-2014, 11:32 AM
What're you guys using to explore eqg's since s3dspy only supports s3ds.

I made a quick replacement as well (www.shardsofdalaya.com/EQGExport.7z) since S3DSpy seems to crash or hang on certain files for no reason.

Packet
06-18-2014, 02:23 PM
Awesome. Thank you. I'm still trying to figure out this alpha masking. I tried using normals with the chroma shader like the references I've seen have it set but that did nothing so next up is to cycle through the alpha shaders.

KLS
06-18-2014, 04:38 PM
EQEmu has a command line pfs archive tool as well:

https://github.com/EQEmu/zone-utilities/releases

Packet
06-18-2014, 08:03 PM
Finally got the chance to test. Definitely controlled by the material shader:

Opaque_MaxCB1.fx (tool default)
http://i.imgur.com/4Dt4Tts.png

Alpha_MPLBasicA.fx
http://i.imgur.com/WuSzFet.png

Maybe not that exact one since it seems to have made the alpha texture further away show in front of the closer one around the middle there. But, you know.

Quick question. How did you do that?

Zaela_S
06-18-2014, 10:51 PM
Quick question. How did you do that?

Hmm? Find material, type in shader name, save? Or did you mean something else? The original texture already had the transparent parts set to 0 alpha.

Packet
06-19-2014, 11:37 AM
Hmm? Find material, type in shader name, save? Or did you mean something else? The original texture already had the transparent parts set to 0 alpha.

Ok. So after about 60 accumulative hours of trying to figure out why my transparent materials were not coming in, I finally figured it out. I got the alpha masking in and it looks like I was completely wrong about texture transparency support (as you mentioned above). I imported .png's (4096x4096) with transparency while using the Alpha_VBS.fx shader on the material and it worked however, now my objects can be seen through other objects that share the same material. So I figured it was because my materials were being used on objects that need to be opaque so what I've done is separate the foliage leaves from the tree trunk(s) and created the same material using the default opaque shader. Now the tree leaves are masked and the trees/rocks/etc are no longer obscured (kinda).

With that being said, I've decided to attempt to separate the geometry which is being imported as .ter. Instead, I'd like to import the .mod files now. My terrain model is separate from all of the trees and rocks, etc... I imported the terrain without a hitch. I then navigated to the "Models" tab and right-click->imported the terrain objects obj file.

It seemed to process them all just fine and now I have a terrain_objects.mod in the model list. I then right-clicked the next box and hit "add placement", selected the terrain_objects and left the x y z and scale alone since it should match the terrain (as I didn't move anything from its original location). Now my client crashes. Without the .mod, it works fine.

Here's the eq client error log:

2014-06-19 10:51:45 fatal error in main thread Code = c0000005 ADDR=0x02c43713
2014-06-19 10:51:45
2014-06-19 10:51:45 EAX=00000001 EBX=18a96a36 ECX=00000000 EDX=0018d00c
2014-06-19 10:51:46
2014-06-19 10:51:46 ESI=00000000 EDI=18a96a02 EBP=18a96a4e ESP=0018cf9c
2014-06-19 10:51:46
2014-06-19 10:51:46 Process was trying to READ invalid data.
2014-06-19 10:51:46
2014-06-19 10:51:46 Invalid access occurred at virtual address 0x00000000.
2014-06-19 10:51:46
2014-06-19 10:51:46 Fatal error occurred in mainthread! (Release Client #630)
2014-06-19 10:51:46
2014-06-19 10:51:46 Client Version: Oct 31 2005 10:33:37
2014-06-19 10:51:46 Skin Directory: UIFiles\Default\
2014-06-19 10:51:46
2014-06-19 10:51:46 Graphics DLL Loaded: Graphics DLL Version 2.00.0258
2014-06-19 10:51:46 Graphics Build Date: Oct 25 2005 17:11:03
2014-06-19 10:51:46 Video Card: NVIDIA GeForce GTX 570 , 9.18.13.1106
2014-06-19 10:51:46
2014-06-19 10:51:46 Crash (char = Packet, zone = nexus)
2014-06-19 10:51:46
2014-06-19 10:51:46 Local Player's World location at time of crash: -62.000000, 55.625000, -99.250000.
2014-06-19 10:51:47
2014-06-19 10:51:47 Gamestate at crash = 253
2014-06-19 10:51:47
2014-06-19 10:51:47 Processor: 8 of type 586
2014-06-19 10:51:47 Physical memory: 0 Megs
2014-06-19 10:51:47 CPU: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz 3395837


This is just a note that importing as .mod didn't work for me. Importing it all as terrain did though however, there is another issue regarding UV mapping. When I imported the objs, the UV mapping is off by an inch. It's not precise however if I view my .obj's in a model viewer, the UV mapping is spot on. I can deal with uv mapping not being as precise but I'd prefer it not to be. I did also notice that after importing an obj as terrain, all of the textures were flipped upside down. This didn't effect how they looked (other than the shifting by an inch) however, it's likely the culprit. Any ideas?

Edit: It looks like OBJ exporting via 3ds Max produces obscured UV's. I'm going to try Maya or Blender instead, I'll post results.

http://xonos.net/zone/ss12.png

Packet
06-19-2014, 01:43 PM
Normal maps (bump mapping) working well. Hurray! :) I added way too much depth to my normal maps for testing.

http://xonos.net/zone/ss13.png

Zaela_S
06-19-2014, 01:44 PM
It seemed to process them all just fine and now I have a terrain_objects.mod in the model list. I then right-clicked the next box and hit "add placement", selected the terrain_objects and left the x y z and scale alone since it should match the terrain (as I didn't move anything from its original location). Now my client crashes. Without the .mod, it works fine.

Found bug for MOD import, should be fixed. Last place I thought to look, didn't occur to me until I had just left the house of course ;p

That stuff looks pretty nice!

Packet
06-19-2014, 02:21 PM
Awesome. I'll let you know how it works out. Great job Zaela.

On the triangle editing which allows you to set specific flags on a specific vertex - I have a long list which contains 172852 vertices. It's great to see what material is applied but it's almost impossible to know what vertex is where. Would it be difficult to sort vertexes by what model they're associated with? This would simplify sorting out objects that should be permable and applying other flags. If not, I'm still content with what you've made.

Also on another note, when importing objects - more specifically the object material file (.mtl): There is a part that accounts for bump mapping which causes a nil error and corrupts the eqg archive.

It looks something like this (in the mtl file):


newmtl terrain_object_alpha
Ns 10.000000000000
Ni 1.500000000000
d 1.000000000000
Tr 0.000000000000
Tf 1.000000000000 1.000000000000 1.000000000000
illum 2
Ka 0.587999999523 0.587999999523 0.587999999523
Kd 0.587999999523 0.587999999523 0.587999999523
Ks 0.000000000000 0.000000000000 0.000000000000
Ke 0.000000000000 0.000000000000 0.000000000000
map_Ka D:\C:\path_to_zone_source\obj_txr_alpha.png
map_Kd D:\C:\path_to_zone_source\obj_txr_alpha.png
map_bump C:\path_to_zone_source\obj_txr_alpha.png
bump C:\path_to_zone_source\obj_txr_alpha.png



I know it's this because if I remove the lines, it works just fine. So instead, I have to use the EQG Extractor to import the normals and add the texture normals into the material config (in the importer tool) but I have to do it in a specific order. If I already have the eqg file open with the zone importer while I am simultaneously importing new textures with the extractor; if I were to save the new normal modifier (in the importer) using the new texture - it saves the file as is and removes the textures I just imported. So, I have to import the textures and THEN open the eqg with the zone importer so that the texture files are there once I save my changes. It's no big deal but it caused some confusion when my normals weren't working. :p

knowom
06-19-2014, 04:27 PM
Damn this looks great never really seen EQ looks so atmospheric in a outdoor zone the level of detail in terms of objects and the style is impressive.

I can imagine it populated with mobs hidden around different nooks and crannies of it shadowmen that path the jungle area's or ncps that are simply invisible or buff themselves with it and walking along triggering a trap that spawns mobs or does something else entirely poisons, snares, debuffs, or ports you ect.

Doing this same MOBA inspired map style, but with a mountainous with rocky terrain with lots of over passes bridges similar to like kingspass meets gfay (wood elf village with the bridges) would be incredible I bet. I love the potential all this adds to EQ it's new and refreshing it's kind of like experiencing the game new all over again at least in terms of exploring the new zone area's that are quite different in design which is entertainingly different.

Zaela_S
06-20-2014, 04:22 AM
Would it be difficult to sort vertexes by what model they're associated with? This would simplify sorting out objects that should be permable and applying other flags. If not, I'm still content with what you've made.

Technically they are all part of the single model glob that is the TER. The EQG game files don't have the concept of a submesh or anything like that, so I wouldn't be able to read boundaries from them beyond material associations. However, 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.

(Reminds me I need to add a way to set triangle flags for MOD models. Also I would be interested to see if EnvEmitter particles could be added to zone MODs through the weapon model importer (http://www.eqemulator.org/forums/showthread.php?t=38303) and the particle data editor (http://www.eqemulator.org/forums/showthread.php?t=38360). Could probably have little fires, falling leaves, stuff like that.)

Also on another note, when importing objects - more specifically the object material file (.mtl): There is a part that accounts for bump mapping which causes a nil error and corrupts the eqg archive.

Blah. The map_bump property is one of only two things it even reads from there, it ought to work :| Will have to take a look at that. I'm thinking of adding some kind of quick error dumping to the tool after that MOD import bug.

Zaela_S
06-22-2014, 03:17 PM
In the meantime I got around to writing an export to .obj (it's under the "utility" menu).

The output files are a bit huge (~20mb) and it exports any referenced images at the same time. I dunno how to even navigate such huge models in Blender ;p Probably not useful to anyone but nice to have there for the sake of completeness.

Packet
06-23-2014, 05:10 PM
Oh awesome! I'll be able to kidnap models and shove them places where they shouldn't be. *waits for Secrets to read this*


* I found another crash-on-import bug. Can I send you an obj file so that you can see it for yourself? It seems like it's directly related to UV's. If I unwrap a model and assign a new material to it (as of the latest version and a couple of versions ago), upon importing (as terrain, haven't tested .mod yet) it causes the "nil" error and corrupts the eqg.

Blah. The map_bump property is one of only two things it even reads from there, it ought to work :| Will have to take a look at that. I'm thinking of adding some kind of quick error dumping to the tool after that MOD import bug.
Actually, error logs would be amazing because I'm running into issues where certain models cause the entire import to fail and it's hard to pin point where the problem actually is. I have to manually remove everything first and then attempt imports until I get one that works.

Packet
07-14-2014, 08:45 AM
Hey Zaela. Have you noticed any issues with UV Maps being off?

Zaela_S
07-14-2014, 10:59 AM
Hey Zaela. Have you noticed any issues with UV Maps being off?

I had noticed something when working on weapons. I used the 2.0 epics to test and noticed that the green gem texture on the necro one would end up in the wrong place after exporting and importing back in. Details on enchanter one were off all over as well.

Think I just figured it out while tinkering with a model viewer thingy. Apparently the V values in UVs need to be inverted, but only if they are positive. For whatever reason. I think I remember seeing something like that in the context of wld-based stuff, should have realized it sooner :|

Will try to get fixes up later today or tomorrow ... once I figure out what to do to cancel it out properly. Too tired to think right now ;p

edit: Might be something peculiar to DDS format, even just fixing that weirds up my PNG stuff. May just need to stop automatically flipping PNGs/whatever-non-DDSes on import. Hopefully.

Packet
07-15-2014, 08:20 AM
Ahh good. I'm glad it's not just me exporting models with screwy uv's.

The 3ds max OBJ exporter allows me to modify the precision of the UV's which I assumed that was the likely culprit.

Zaela_S
07-15-2014, 07:32 PM
Bit confusing to think about, but it's looking like the issue I was describing should only matter when converting DDS images to another format... I guess... although even then I'm not sure what would be needed to correct it yet ;p

I'm not sure what exactly your UV issue is, but if your UV values are extremely precise, something may be getting lost in translation. EQG uses 32bit floats, while I think the values in some of the material you gave me to test used 64bit doubles. Some of the least significant digits would be truncated to fit. Might try exporting with lower precision. At the end of the day it might be tough to get a huge texture pixel perfect over a huge mesh, though -- the bigger the image, the more precise the UVs have to be.

Zaela_S
07-16-2014, 07:56 AM
In the meantime...

The material shader field now has a dropdown with all the combinations KLS listed available to select.

And the tool now has a barebones zone viewer. Use Viewer > Start Viewer to launch the independent viewer window after you have a zone loaded up in the tool. Does not account for alpha textures and whatnot. Also currently does not show placeable models, but I expect to add those in soon. May not load all textures/display everything correctly in every zone, probably some bugs, etc. Not particularly efficient either. And, of course, it only works with zone files that the tool understands, which is to say earlier EQG-based ones, and any S3D-based ones that you convert up with it.

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

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
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:


.\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
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.


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
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?

Zaela_S
08-02-2014, 11:10 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?

I may have overstated how easy it would be!

The conversion feature is not complete. I found where highpass is crashing it but some things are unclear -- seems like the first texture reference in each mesh is invalid, but necessary to line everything up correctly. Stuff around the top of the zone and all water surfaces aren't getting textured as a result (although some of that might be related to animated textures -- which I'm not sure how to do for EQG zones yet, although I think it's possible). Will need to take a closer look at all that.

Packet
08-03-2014, 11:43 AM
KLS pointed something out to me yesterday which should be noted for server admins intending on incorporating custom zones into their servers. You will need .map files if you intend on having line of sight + other things such as proper npc pathing.

[4:08 PM] <KLS> the problem was you named the terrain file
[4:08 PM] <KLS> nexus
[4:08 PM] <KLS> instead of TER_nexus
[4:08 PM] <KLS> but im adding a fix atm

KLS is going to fix this with azone2 however, if you have an older build - this is why it might fail for you.


Zaela, any ideas on how one might add global lighting to a zone manually while you're working out light placement. Anything that I import does not seem to respond to sky light.

Zaela_S
08-03-2014, 11:19 PM
I guess it needs the vertex colors to have any lighting at all. Not sure how much influence they have on how things'll actually look. If you just want to try whatever for now: create a binary file, set the first 4 bytes to "EQGP", next 4 bytes is an integer equal to the number of vertices in your zone TER (should be on the info screen in the tool), then that many 4 byte integers filled with... let's say 0xFFFFFFFF, I think that should be pure white. It's 8 bit ARGB or RGBA or something like that. Then give it the same name as the TER file, except with .lit as the extension, and import it into the EQG.

My internet died a couple days ago (problem's with the wires underground, joy) so I'm not sure when I'll be able to update again.

Zaela_S
08-04-2014, 06:13 AM
Well phone connection can handle a painfully slow upload now and then I guess.

I found where highpass is crashing it but some things are unclear -- seems like the first texture reference in each mesh is invalid, but necessary to line everything up correctly. Stuff around the top of the zone and all water surfaces aren't getting textured as a result (although some of that might be related to animated textures -- which I'm not sure how to do for EQG zones yet, although I think it's possible). Will need to take a closer look at all that.

I put up a fix for this. The animated textures aren't animated yet, but they show a texture at least.

Weirdness turned out to be an inconsistency in a structure depending on whether textures were animated or not, which wasn't noticed in the WLD bible. Solves the mystery of where the timing information comes from, though.

I can't actually get in game to verify it works since I didn't have the foresight to make a fully local test server. But it looks mostly right in the viewer, so it should show up fine (unless the hardcoding is really really specific, I guess). Although, what I thought was bugged textures towards the top of the zone seems to actually be a zone ceiling (to prevent climbing?). The converter doesn't handle transparencies yet, so the zone will probably seem to have a white or black shell for a sky unless you mess with it a bit ;p

Packet
08-04-2014, 08:58 PM
I'll try that out. Btw, I heard you mention you're messing with EQ character models. That true?

Zaela_S
08-04-2014, 09:47 PM
I'll try that out. Btw, I heard you mention you're messing with EQ character models. That true?

Yeah, working on an EQG animated model importer. Will handle Mob models as well as weapons (animated or non) and static things.

The GUI and viewer are basically done, just need to decide on an animated mesh format (was thinking COLLADA but that seems more annoying than it's worth, might go with B3D) and write the import routines... and decide on some standards for how to set things up (whether different animations should be imported from wholly separate files, etc). Also want to let the user select particle emission points in the tool and have it show where that is in the viewer in real time, but that was proving more difficult than expected -- we'll see.

Packet
08-14-2014, 11:59 AM
If there is anything I can help you with, let me know. I can provide rigged characters & animations as samples to provide with your tool. If you want... :)

Zaela_S
08-14-2014, 06:51 PM
A rigged model with an animation for me to test with would be helpful. Been burned out a bit lately, haven't accomplished much. The prospect of having to both figure out a format and how to make animations in blender (I have a skeleton hooked up to a cube at least... I think) is just daunting enough to hold me back ;p Need both to test either.

knowom
08-15-2014, 02:12 PM
I'm curious if people would be interested in a zone like this if I could design one relatively well in Blender. It would be a little different and not 100% accurate, but generally rather familiar for example I'd knock out a few walls to create pathways to the different mirrored world layouts.

I'd also use the left and right water inlets as a shipping routes pathway to connect the left half to right half among other things. Could also easily knock out 2-4 walls in the middle undecided. In terms of porting druid rings and wizard spires outside the dungeons would probably make a lot of sense.

http://i127.photobucket.com/albums/p145/knowom/Blender/th_ZeldaMoba_zps876f2163.jpg (http://s127.photobucket.com/user/knowom/media/Blender/ZeldaMoba_zps876f2163.jpg.html)

Packet
08-16-2014, 04:18 AM
I'm curious if people would be interested in a zone like this if I could design one relatively well in Blender.
Good luck. :)

A rigged model with an animation for me to test with would be helpful. Been burned out a bit lately, haven't accomplished much. The prospect of having to both figure out a format and how to make animations in blender (I have a skeleton hooked up to a cube at least... I think) is just daunting enough to hold me back ;p Need both to test either.

Preferred format? I have a few bipedal models that have some rigs and basic animations. It seems like (from my observation of OpenZone & Anim8or conversion) that there are specific sequence names per animation in the set. For instance, the idle animation/sequence would be:

standing_c_100_p01

death animation would be: death_n_100_d05

Without the standing_c_100_p01 sequence, the model comes in as a regular human. I'm not sure if this helps as I don't understand the logic behind the OZ conversion. But I do understand being burned out. My projects typically wear in on me as well which is why I am taking my time with this one. One piece at a time, a little a day... otherwise, I'd become distracted by the nearest shiny object.

knowom
08-16-2014, 01:24 PM
Good luck. :) Thanks think I've got a good planned method on how to go about it in mind starting with a 2D layout basically using square tile faces and subdividing. I'll try to add dimension by extruding and such later and other details, but gotta start someplace. Doesn't look like much yet, but chipping away at the layout slowly. Fairly time consuming carefully counting the tiles to try to ensure they are accurate as they can be at least initially may deviate a bit later so it's not just a carbon copy in 3D. Anyway I'm starting off by removing the water terrain initially. Then I'll try to get the base terrain layout down a bit roughly. I gotta chip away at it in stages otherwise it would just end up being a sloppy mess.

Sneak peak at what I've got started doesn't look like much, but counting those tiles is a real pita, but it's starting to take shape a bit so I'm pretty happy with results thus far.
http://i127.photobucket.com/albums/p145/knowom/Blender/ZeldaQuest_zps750fa414.png

rhyotte
08-17-2014, 04:07 AM
Cool beans

Packet
08-17-2014, 01:27 PM
but counting those tiles is a real pita, but it's starting to take shape a bit so I'm pretty

Whenever you're ready to texture that, let me know. I can show you some UV mapping techniques that will make things a lot easier for you.

Zaela_S
08-17-2014, 07:11 PM
Preferred format?

Erm, anything that blender can import I guess ;p

It seems like (from my observation of OpenZone & Anim8or conversion) that there are specific sequence names per animation in the set. For instance, the idle animation/sequence would be:

standing_c_100_p01

death animation would be: death_n_100_d05

For S3D models, it's actually just the last bit that identifies the animation: one letter for the "category," and then two digits for the number. The rest I assume is specific to how OpenZone does things.

EQG models use a slightly clearer system with 4 letters and 1 number. Some are pretty obvious like idle, walk, turn, swim; some understandable but odd like nrun (n?), jmpu (jump up), jmpa (jump forward), crmp ("crumple" to death); others seem like the just picked out some random letters like slpr, gcst (both attack animations ?). Easy enough to figure most of them out by watching the animations of pre-existing models at least, and there's probably a big list in the client or graphics dll that has them all lined up to their in-game id numbers.

knowom
08-17-2014, 07:12 PM
Whenever you're ready to texture that, let me know. I can show you some UV mapping techniques that will make things a lot easier for you.

Yeah defiantly will do once I get to that point. Not trying to rush it I want to get it looking as a right as I possibly can.

Another update btw just finished up with the last bit of water. I also cleaned up the boarder is it starting to look a bit more familiar? :)
http://i127.photobucket.com/albums/p145/knowom/Blender/th_BeyondFurtherContinuedEntranceDungeon1ZeldaQues tDesignblend_zps10eed3ea.png (http://s127.photobucket.com/user/knowom/media/Blender/BeyondFurtherContinuedEntranceDungeon1ZeldaQuestDe signblend_zps10eed3ea.png.html)

Don't mind the extra stuffs in the background that's mostly just there in case I accidentally screw something up. Here's a peak at how the mountain terrain is beginning to take shape very #Minecraft reminiscent for time being. I just want to get the general layout structure across initially. After that I can work toward beveling, smoothing, fracturing, and contorting it to give it character.

http://i127.photobucket.com/albums/p145/knowom/Blender/th_3DDepthZeldaQuestblend_zpsc40f17f8.png (http://s127.photobucket.com/user/knowom/media/Blender/3DDepthZeldaQuestblend_zpsc40f17f8.png.html)

Another screenshot on how it's starting to look. It's defiantly getting closer in feel. I'm pretty glad I decided to give this a try time consuming, but feels worth the time investment. A new yet old yet different type of nostalgia than we've been accustomed to in EQemu. Populating it with spawns will be interesting to say the least. It'll be kind of fun just experimenting with that I think.
http://i127.photobucket.com/albums/p145/knowom/Blender/th_3DDepthZeldaQuestblend_zps6cd0d6ea.png (http://s127.photobucket.com/user/knowom/media/Blender/3DDepthZeldaQuestblend_zps6cd0d6ea.png.html)

New screenshot I'd estimate about 2/5's of this stage of development for the mountain terrain is done with. The sections are defiantly beginning to look more and more familiar.
http://i127.photobucket.com/albums/p145/knowom/Blender/3DDepthZeldaQuestblend_zpsd4124673.png

knowom
08-22-2014, 03:17 AM
Finished up the zone layout aside from the tree's basically which not sure what I'm doing with those currently. The mountains obviously need to be shaped more the placement orientation is where it should be at least. For now I'm cleaning up all the excess faces and deleting them, but after that not sure where to begin next.

http://i127.photobucket.com/albums/p145/knowom/Blender/ZeldaDesignPart2StartCleanupExcessFacespart5blend_ zpsebf3dfa2.png

Tyen05
08-22-2014, 04:40 AM
Random info about animations.


- Human, Half Elf, Dark Elf, High Elf, Erudite, and Barbarian use the ElfMale and ElfFemale animations depending on gender, with the exception of certain animations that they already have (e.g. the Barbarian Male and Female have different walk animations)
- HumanMale has Walk, Run, and Idle animations that should be used instead of the ElfMale ones
- ElfFemale has to Turn_01, so has to use the Turn_01 from ElfMale
- Beetle uses Spider animations
- LionFemale uses LionMale animations
- Puma uses LionMale animations
- Gnomes and Halflings use DwarfMale and DwarfFemale animations, with the exception of their own RunJump
- OgreMale uses all the OgreFemale animations
- TrollMale and TrollFemale use all the OgreFemale animations except for their own unique Walk and Run
- BarbarianMale has unique Walk, Run, Idle animations, but uses ElfMale's animations for everything else
- BarbarianFemale only has a unique Walk animation, but should use the BarbarianMale Run and Idle plus ElfFemale animations for everything else

knowom
08-22-2014, 08:47 PM
Deleted all the excess faces that I could find. Anyway some statistical information 32,920 verts with 27,510 faces. For comparisons temple of veeshan has 92,913 verts with 30,971 faces. Meanwhile guk bottom has 94,173 verts with 31,391 faces. It'll probably have a bit more faces and verts when it's done, but should be right in line with other zones so that's good to know.

I don't know if I can start to texture it now or if I should start shaping the terrain details height of jaggedness of mountains and the ground terrain.

On a side note this wasn't too hard to develop what I've done so far the most challenging part was trying to keep the tiles accurate, but just take a map that size and doing it free hand how I want would be pretty simple and easy. I learned a fair amount of tricks with blender along the way as well which was nice feels a lot less foreign how to go about level design stuff.

knowom
08-23-2014, 01:53 PM
Starting work on all the terrain that juts in or out in spots to further improve both looks and accuracy a bit further. I'm not sure which method I should go with or perhaps even if I should do a cross between the two of them perhaps.

So with that said here's two different screen shots from the bottom corner section of the map. I wouldn't mind a little community input on which of the two people prefer the looks of more. In the mean while I'm gonna work on a hybrid prototype between the two to see how that looks as well.

http://i127.photobucket.com/albums/p145/knowom/Blender/AltTerrainAdvancedZeldaDesignBaseMountainsampWater blend_zps5b57e051.png
http://i127.photobucket.com/albums/p145/knowom/Blender/TerrainMoldingZeldaDesignBaseMountainsampWaterblen d_zpsed911a00.png

knowom
08-23-2014, 02:36 PM
Here's what a hybrid between the two styles looks. Learning more and more 3D modeling techniques as I work on this and experiment with it a bit. I'm confident I could do my own free hand designs with far less difficulty than this replica challenge has been less room for personal stylization with this depending on how closely accurate you go for.

http://i127.photobucket.com/albums/p145/knowom/Blender/HybridZeldaDesignBaseMountainsampWaterblend_zpsdcc db022.png

Packet
08-27-2014, 08:42 AM
Hey Knowom. Would you mind posting new pictures in the OpenZone forum? Reason why I ask is because between the both of us, we've derailed the thread quite a bit with our massive screenshots. I'm probably the worst about this. :p

And I'm not trying to exercise any authority or anything (as I have none). Just a friendly request. :) We should save some room for those needing help.

knowom
08-27-2014, 12:43 PM
Yeah whenever the next update ends up being I'll make a new thread in OpenZone forum someplace. I actually wasn't sure on where to post about initially in regard to this stuff. It's not really OpenZone either, but along the same premise player developed zones which at it's heart is what OpenZone intentions were about.

Zaela_S
08-31-2014, 05:01 AM
Haven't been making any progress lately, but figured I'd put out what I have so far for the animated model tool I've been working on since it makes a decent EQG model and animation viewer. Link (https://dl.dropboxusercontent.com/u/70648819/downloads/EQG%20Model%20Importer.7z), src (https://github.com/Zaela/EQGModelImporter).

Can't save any kind of changes yet, only good for the viewer. Can press 's' in the viewer to display skeletons ('cept on the base pose), right and left arrow to cycle through animations, mouse buttons to move view around. Does not display a small number of models correctly (ones with alternate heads/pieces). There are one or two eqg files that will crash it, not sure why yet. Can view most EQG weapons correctly as well.

Bonehard
09-01-2014, 05:00 AM
Nice work Zaela!

Here is a link to a great 3d library i using in my projects:

http://assimp.sourceforge.net/

It supports alot of 3d formats. For none programmers there is also a nice viewer for 3d models on the website.

There also some api bindings for other language.

"There is a C API as well as bindings to various other languages, including C#/.net, Python and D."


Hope to see more of your nice work.

Packet
09-01-2014, 07:50 PM
Haven't been making any progress lately, but figured I'd put out what I have so far for the animated model tool I've been working on since it makes a decent EQG model and animation viewer. Link (https://dl.dropboxusercontent.com/u/70648819/downloads/EQG%20Model%20Importer.7z), src (https://github.com/Zaela/EQGModelImporter).

Can't save any kind of changes yet, only good for the viewer. Can press 's' in the viewer to display skeletons ('cept on the base pose), right and left arrow to cycle through animations, mouse buttons to move view around. Does not display a small number of models correctly (ones with alternate heads/pieces). There are one or two eqg files that will crash it, not sure why yet. Can view most EQG weapons correctly as well.

That's really awesome Zaela. I was looking at a few model animations and it worked perfectly using left-right arrow keys. Sorry I haven't passed you anything yet for testing. School just started up again for me and on-top of work, my time has been extremely limited.

Zaela_S
09-16-2014, 01:51 PM
The model viewer now supports alternate "heads"/model parts (H key to cycle through them, if any) and texture sets (more or less -- T key to cycle through those).

I took a little time out to change how I was doing things a bit (LuaJIT's FFI is pretty nice) and re-wrote most of common code for my tools to be nicer. Should hopefully make it easier for me to expand and fix things in the future.

Related to that, made a new version of my S3DSpy replacement (https://dl.dropboxusercontent.com/u/70648819/downloads/EQGExport.7z) which now has an "Export as PNG" option to convert DDS images coming out. Also fixed a bug where having an s3d or eqg file open in multiple tools at the same time (i.e. EQGExport + one of my importer tools) would make changes made in one tool overwrite those made in the other; EQGExport (and other tools, as I get to them) will now check if the s3d/eqg file has been modified and reload if necessary before doing any Export or Import operations.

Nice work Zaela!

Here is a link to a great 3d library i using in my projects:

http://assimp.sourceforge.net/

It supports alot of 3d formats. For none programmers there is also a nice viewer for 3d models on the website.

There also some api bindings for other language.

"There is a C API as well as bindings to various other languages, including C#/.net, Python and D."


Hope to see more of your nice work.

I might look into that, but I'm pretty happy using Irrlicht for now. Loading standard formats doesn't matter too much for these tool since they're mostly concerned with going to/from EQ's weird formats.

Gnomish1987
09-17-2014, 01:57 PM
Related to that, made a new version of my S3DSpy replacement (https://dl.dropboxusercontent.com/u/70648819/downloads/EQGExport.7z) which now has an "Export as PNG" option to convert DDS images coming out. Also fixed a bug where having an s3d or eqg file open in multiple tools at the same time (i.e. EQGExport + one of my importer tools) would make changes made in one tool overwrite those made in the other; EQGExport (and other tools, as I get to them) will now check if the s3d/eqg file has been modified and reload if necessary before doing any Export or Import operations.

Speaking of your newest version of EQGExport, Zaela, I am unable to get it to run. Previous versions open just fine for me, but attempting to open the one you've linked in the above quote gives me the following error:

Runtime error:
.\lib\zlib.lua:11: cannot load module 'zlib1': The specified module could not be found.

I'm eager to see your latest additions, but this is preventing me from opening the program. Interestingly, I also get an identical error with your EQG Model Importer, though not with your EQG Weapon Model Importer. Am I doing something wrong?

EDIT: I might also inquire about the "Export as PNG" option. What becomes of the DDS image's alpha channel when this is done? I've found one of the biggest problems with converting DDS files manually to a more manageable format (always BMP in my case) is that an alpha layer can mess up the entire process unless I remember to remove it prior to conversion. Also, given that BMP is the standard format of pre-Luclin textures, is there an advantage to being able to instantly export PNG instead?

Zaela_S
09-19-2014, 05:32 PM
Speaking of your newest version of EQGExport, Zaela, I am unable to get it to run.

Hmm, I'm not sure what's up there. They work out of the box on both Windows machines I have access to (running 7 and 8). zlib1.dll should be a built-in system file since XP, I think; not sure why it might not be able to find it for you.

EDIT: I might also inquire about the "Export as PNG" option. What becomes of the DDS image's alpha channel when this is done? I've found one of the biggest problems with converting DDS files manually to a more manageable format (always BMP in my case) is that an alpha layer can mess up the entire process unless I remember to remove it prior to conversion. Also, given that BMP is the standard format of pre-Luclin textures, is there an advantage to being able to instantly export PNG instead?

Not sure! PNG has an alpha channel so I imagine it just gets converted over as-is.

I didn't have any particular use in mind when I added the PNG export option, I just know I get annoyed when I run into DDS files since I don't have anything to edit them with. There's no reason not to use PNG, at least, since EQ will load any of the common image formats for any purpose. I prefer to use PNG since BMP is a bit of a space-hog.

Shendare
09-19-2014, 05:45 PM
I don't believe zlib comes preinstalled with any version of Windows.

You can easily download zlib1.dll from the official website and drop it into the same folder as the program that needs it, and everything should work fine.

The current version is 1.2.8:

http://zlib.net/zlib128-dll.zip

Or you can always check the home page for the latest version:

http://zlib.net/

Gnomish1987
09-19-2014, 07:11 PM
I didn't have any particular use in mind when I added the PNG export option, I just know I get annoyed when I run into DDS files since I don't have anything to edit them with. There's no reason not to use PNG, at least, since EQ will load any of the common image formats for any purpose. I prefer to use PNG since BMP is a bit of a space-hog.

I fully agree about BMP being a space-hog. However, don't you end up having to convert your final work to BMP eventually anyway if you're dealing with a pre-Luclin zone (when all textures were solely in BMP format)? If one did use a PNG in lieu of a BMP, could one delete the parallel BMP files and the PNG ones would be loaded in their place even with an old zone/model? (For instance, if I wanted to make a brown Old Froglok to overwrite the base Old Froglok texture.)

As for the difficulty of opening DDS, I see what you mean. I managed to find a plugin for GIMP that allows me to open them with relative ease, so I don't mind as much these days. There may be a similar plugin for your image editor of choice. :)

You can easily download zlib1.dll from the official website and drop it into the same folder as the program that needs it, and everything should work fine.

Thanks! I believe this was the initial problem, as both programs now open just fine.

However, while I can get full use out of the Model Viewer, EQGExport still doesn't want to play nice. It simply opens, prompts for the S3D directory, populates the list of .s3d files, then does nothing further. I'm able to select a given .s3d file, but nothing comes up on the next column. Right-clicking does nothing.

I may simply have to make do with v1.1 for the time being. Didn't mean to hijack Zaela's thread and turn it into a troubleshooting session!

Zaela_S
09-19-2014, 10:17 PM
If one did use a PNG in lieu of a BMP, could one delete the parallel BMP files and the PNG ones would be loaded in their place even with an old zone/model? (For instance, if I wanted to make a brown Old Froglok to overwrite the base Old Froglok texture.)

Yeah. The client has no expectations about what format a particular image will be in. Any BMP or DDS file could be replaced with a PNG or JPEG without problems. It just looks at whatever's there, sees if it can figure out the format it's in, and sends it off to the correct decoder for that format.

The only caveat is that, due to internal references in the .wld files, the name of the image file needs to be exactly the same as the original one you want to replace, including the extension. So if you wanted to replace "frglg0101.bmp" with a PNG, that PNG would need to be renamed to "frglg0101.bmp". The extension doesn't really matter. I'm pretty sure some of the official texture updates for older zones are actually DDS files even though they have a ".bmp" extension -- changing the names inside the .wld is a bit of a pain.


However, while I can get full use out of the Model Viewer, EQGExport still doesn't want to play nice. It simply opens, prompts for the S3D directory, populates the list of .s3d files, then does nothing further. I'm able to select a given .s3d file, but nothing comes up on the next column. Right-clicking does nothing.

Now that I'm really not sure what to say to :( Both tools are pretty much identical up to the point where it decides exactly what should show up in the second column. Right-click should bring up a the menu regardless, too... I re-uploaded my most recent files just in case that helps (zlib is now included too).


Maybe I should actually make a thread for EQGExport ;p

jdoran
09-19-2014, 11:25 PM
What is the benefit of converting zones to EQG?

I think it is great that tools like this are being worked on.

I must admit that I like the s3d zones since I can use their models in other zones. Would these EQG tools provide a similar function?

Packet
09-21-2014, 04:02 PM
Everything I've done uses png textures instead of DDS and BMP. I've noticed the file-size decrease to be well worth it. Also, the alpha channel with png files can be used if you choose the right shader for the material.

Zaela_S
09-21-2014, 05:32 PM
What is the benefit of converting zones to EQG?

Mostly to make them compatible with this tool ;p EQG format zones are easier to work with in a lot of ways...

I'm just getting started re-writing this tool; when I'm done I should easily be able to add the ability to export placeable object models from one zone to another, and improve the s3d converter to be more complete (placeable objects, vertex colors, maybe alpha texture detection, etc).

rhyotte
09-21-2014, 07:36 PM
So many cool tools popping up....and Sony just posted a 2 billion loss... :)

Here's to hoping!

Akkadius
11-12-2014, 10:37 PM
Stickied thread

Packet
04-01-2015, 02:35 PM
Mostly to make them compatible with this tool ;p EQG format zones are easier to work with in a lot of ways...

I'm just getting started re-writing this tool; when I'm done I should easily be able to add the ability to export placeable object models from one zone to another, and improve the s3d converter to be more complete (placeable objects, vertex colors, maybe alpha texture detection, etc).

Zaela, do you have a changelog anywhere? I've been abscent for a bit due to work and school. I'm uncertain if the original issues I had with your tool are still present.

Zaela_S
04-02-2015, 11:02 PM
I doubt I changed anything since you last saw it.

lakedoo23
04-06-2015, 11:58 AM
Zaela, I was going to attempt reverse engineering the EQG format, but I was hoping you might have some documentation laying around?

Zaela_S
04-07-2015, 12:18 AM
Zaela, I was going to attempt reverse engineering the EQG format, but I was hoping you might have some documentation laying around?

Which part(s)?

The .eqg archives themselves are just differently-named .s3d archives. Several tools and sources around for opening those, although I could write something up quick about it.

If you're talking about the file types found particularly in .eqg-based stuff (.zon, .ter, .mod, .mds, .ani, etc) I could write up a bit about those too, they're all fairly straightforward.

KLS
04-07-2015, 05:37 AM
The project has several zone utilities (https://github.com/EQEmu/zone-utilities) as well that includes code for reading all the known formats and are largely complete other than things we don't care about like animation.

Not exactly documentation but can be useful if you're trying to reverse any of the formats.

Tyen05
09-27-2015, 08:31 PM
Ran into a small issue, wanted to see if there is any advice.

So gonna run through some images. Basically I took an edge of a hill and stretched it out to create a ramp.

First pic is me stretching it out in Maya.
Second pic is importing the obj to the EQG file.
Third pic is the viewer showing my edit.
Fourth pic is ingame where the edit is not showing up.

Basically my question is, when I edit a zone and import it, is there another step to make those edits show up? I've removed the .s3d so its just my editted .egc in my EQ directory.

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

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

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

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



The object I'm trying to import is here: http://eqbrowser.com/misc/crushboneramp.obj

Gnomish1987
08-03-2017, 04:26 AM
I'm looking to make minor additions to a few old .s3d zones for my own use, such as adding extra alleyways, buildings, caves, etc. for things like new guildhalls in cities. However, a (rather sloppy) test with EQG Zone Importer quickly reminded me that objects and water are lost in the conversion from .s3d to .eqg, unfortunately.

OpenZone doesn't seem to be an option because the documentation is so outdated/sparse and it doesn't allow importation of .s3d files, but on the other hand, EQG Zone Importer's conversion process leaves the zone unusable due to lack of objects and water.

Is there some way of achieving what I want either through EQG Zone Importer or a combination of it and OpenZone? Again, I want to make additions to .s3d city zones without losing objects/water. (I'm not interested in modifying the newer .eqg zones instead, as my goal is to make new landmarks using the blocky, distinctive aesthetic of zones from Classic through Velious.)

Maybe I ought to make a standalone thread...

jim001
02-07-2021, 08:41 PM
Does anyone know if there are any later versions of these? :)