Jump to content
The Dark Mod Forums

[Feature Request] .ase exporter groups\renames objects according to their shader


Recommended Posts

I am trying to port a Quake 4 map over to UT2k4(Unreal Tounament 2004) and I tried out Dark Radiant which turned out to be the right program for the job! The Q4 map is q4xdm10.map called Central Processing and when exported as a .obj file the texture mapping is for some reason messed up completely.

 

I tried the export the map as a .ase file and that worked a lot better which I then saved as an .obj file but unfortunately the map is saved as individual objects and not grouped according to texture\shader used.Is that possible to have the map exported as as .ase file but instead of tons of groups the faces\surfaces are grouped and named according to the shader used with each face which not only brings the number of groups down from about 4000 to about 30\40 and I can then fix the map in milkshape 3D which I have a licence for and then export it into a format I can use as either a brush\static mesh into UnrealEd?

 

I can then import the textures as I have already imported most of the static meshes from the map and I will import the pick-up meshes to be used as proper pick-ups with their Q4 sounds.

Is is possible to do that for Dark Radiant as this is kinda urgent?

 

 

Thanks.

Edited by maxdamage
Link to comment
Share on other sites

It is possible. If you know python you can do the changes yourself.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

When I bring the exports into Blender and CTRL+J to join every different part together, I can then select/split/delete different parts based on their material from the "Material" tab in Edit Mode by highlighting the material name and using the "Select" button.

Link to comment
Share on other sites

It is possible. If you know python you can do the changes yourself.

 

 

Unfortunately I haven't a clue regarding python. :( Having to slowly combine objects\faces that have the same shader\texture is soo depressing atm... :(

 

I have blender but I'd rather have Dark Raidant export the .ase grouped\renamed according to the shader used so I an fix it up in milkshape 3D and then get it exported into unrealed format.

 

Thanks.

Link to comment
Share on other sites

I can change the script for you. But I won't let it be part of the official DR release, as I fixed a bug and don't want it to show up again. Will pm you once I'm finished.

  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

There is a (little bit) of method in DR's madness.

 

ASE is intended to be used in a way which sharing of vertices is left up to the user. There is a field that defines at what angle the vertices should be seen as having a hard edge, i.e a corner should not be smooth shaded. However since games tend not to leave this up to the model format itself, because 3dsmax had a lot of duplication in the format and it all became a bit too complex, generally sharing vertices will result in edges not being hard, even if the angle is > the predefined limit.

 

D3 does the vertex merging itself if the file is correctly formed (however the exact reason for it not always applying is a mystery to me). DR on the other hand does not compile the map and as such has no need for storing this information for brushes. So if we used a solution like you are asking for, the corners of things would start to look really horribly shaded.

 

So, if you group the materials and faces, you will likely run into the problem where the entire area is seen as a single smoothing group (_nothing_ uses ASE smoothing groups correctly - are you noticing something about ASE being left up to the user?). This is why after I complained about this same issue, I didn't actually fix it, there is a little accidental method in the madness. Ideally we could use the face normal to offer an option about when to merge, and when to preserve hard edges (and then likely have the engine ignore them anyway).

 

So yeah, if you need the script modified, I'm sure it can be sorted out for your case :)

 

The last option is to find my old ASE aware version of the assimp exporter on these forums and throw the model into there, it may or may not do what you want...

Link to comment
Share on other sites

This issue again can be fixed in Blender. Select the object(s) as a whole in 'Object Mode', go to the 'Object Modifiers' tab and 'Add Modifier' then under 'Generate' choose 'Edge Split'. You can define a custom angle and then click 'Apply' and it will break the vertex welding/smoothing along all appropriate edges.

 

 

Will pm you once I'm finished.

Would you mind sending me a PM also? Would greatly appreciate! :) Edited by LDAsh
Link to comment
Share on other sites

@Obsttorte

Thanks for the help! :) Can't wait for the pm.I will post my progress here as well once I get the map into unrealed for UT2k4.

 

@LDAsh

Is there a tutorial for that?I have version 2.57 of Blender and can it import .ase files and export the resultant file as an .obj without the need for an plug-in from somewhere else as I have plug-ins that only seem to work with a specific version of Blender ans it usually ends up being the version I don't have and can't get?

 

Thanks a lot everyone :) :) :) :)

Link to comment
Share on other sites

This issue again can be fixed in Blender. Select the object(s) as a whole in 'Object Mode', go to the 'Object Modifiers' tab and 'Add Modifier' then under 'Generate' choose 'Edge Split'. You can define a custom angle and then click 'Apply' and it will break the vertex welding/smoothing along all appropriate edges.

 

The point is for interoperability, i.e not intended for only exporting to blender. It'd be easier to just write a better obj exporter if that's all you want.

Link to comment
Share on other sites

@Serpentine

 

If it is possible when exporting the map as an .ase file but while exporting the faces\objects are grouped and renamed according to the shader used as I can convert it to .obj file format in an old version of 3D deep exploration which worked better than Dark Radiant's .obj exporter.

Link to comment
Share on other sites

Legal issues aside for now, the ASE doesn't support exporting of meshes, only brushes. If you want to export "mapobjects", try DOOMedit that comes with Doom3/Quake IV by typing "editor" into the console. Its OBJ exporter can do this. You can export collective chunks of mesh-mapobjects and maintain material headers and UVs. You can export multiple into 1 file which is really handy.

 

Or, this may be just a case of you wanting to automatically assign materials in Unreal Editor based on their headers? Then that's probably a question for the Unreal community.

Link to comment
Share on other sites

Legal issues aside for now, the ASE doesn't support exporting of meshes, only brushes. If you want to export "mapobjects", try DOOMedit that comes with Doom3/Quake IV by typing "editor" into the console. Its OBJ exporter can do this. You can export collective chunks of mesh-mapobjects and maintain material headers and UVs. You can export multiple into 1 file which is really handy.

 

Or, this may be just a case of you wanting to automatically assign materials in Unreal Editor based on their headers? Then that's probably a question for the Unreal community.

 

Firstly I think you missunderstood what I meant.I had extracted the .lwo files from the .pk4 files of Quake 4 which are the ones used in the map Q4xdm10.map according to Quark,GTKRadiant,etc...... Then imported into milkshape 3D then fixed up and prepped and exported into .ase format and then I imported them into unrealed where I added the normal textures to each model.

I even got the Quad Damage mesh imported,the Mega-Health and normal health imported but yet to get them as proper pick-ups in UT2k4.

 

Regarding the legal issues all I can do is to copy the legalese that comes with Quake 4 and include it with the map.All I need done with Dark Radiant is that when exporting maps into .ase format the app groups all the objects that use the same shader and renames them to the name of the shader used.I can fix the map up in milkshape 3D and then get an app that can convert the map into .t3d format for use in unrealed....

 

It is not my fault that Quake 4 doesn't come with bot support... :(

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 3 weeks later...

Has anyone actually offered to address it? It's not going to happen magically.

Link to comment
Share on other sites

Has anyone actually offered to address it? It's not going to happen magically.

 

 

Well Serpintine said he would cook up something for this.Still waiting for his pm.

I'll see what I can cook up tomorrow :)

and

Hey - Sorry, I'm actually still downloading TDM etc and trying to gather more mirrors... I need the TDM assets to test this stuff on a realistic scale, sooo I havent forgotten.

Link to comment
Share on other sites

  • 5 weeks later...

I can change the script for you. But I won't let it be part of the official DR release, as I fixed a bug and don't want it to show up again. Will pm you once I'm finished.

 

 

Did you ever get a chance to get the script working? Can you please check your inbox.

 

Thanks.

Link to comment
Share on other sites

  • 3 years later...

I recently sent a pm to Serpentine regarding the something he was going to do why I hadn't sent a pm to him years ago I haven't a clue.Recently I was busy checking some stuff out and I would like to uninstall Quake 4 as the mp side of the game is "heavy "on the laptop and even though I have a MP with .aas bot files so I can play against the AI, it isn't the same so what I decided to do is to try and get those features added to Dark Radiant so I can also save some hdd space when I uninstall the game and the MP app plus .aas bot files.

 

I plan to port a CTF map as well and I have ported the textures,spec maps,bump\normal maps needed for both maps over into UT2k4 texture packages and created the respective shaders and also finished porting the static meshes used in each map.I just need the map mesh either to use to subtract the shape of the map plus hopefully keeping the texture mapping as well or I can use the map mesh as the map mesh in UT2k4 as that works as the game allows you to have a static mesh or meshes as the actual map in-game.

 

The map meshes need to grouped and renamed according to their respective textures used.Another feature for Dark Radiant that would be handy is ctrl + a to select all of the objects used in the map in Dark Radiant so anyone can export as a .obj or .ase quicker....

 

I have an old version of Dark Radiant v2013 something I think but I am not sure if those fixes\features could be added to the version I am using or if not a newer version which will hopefully be compatible with win vista home basic sp2.

 

Any help will be appreciated.

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
    • nbohr1more

      Please vote in the 15th Anniversary Contest Theme Poll
       
      · 0 replies
    • Ansome

      Well then, it's been about a week since I released my first FM and I must say that I was very pleasantly surprised by its reception. I had expected half as much interest in my short little FM as I received and even less when it came to positive feedback, but I am glad that the aspects of my mission that I put the most heart into were often the most appreciated. It was also delightful to read plenty of honest criticism and helpful feedback, as I've already been given plenty of useful pointers on improving my brushwork, level design, and gameplay difficulty.
      I've gotten back into the groove of chipping away at my reading and game list, as well as the endless FM catalogue here, but I may very well try my hand at the 15th anniversary contest should it materialize. That is assuming my eyes are ready for a few more months of Dark Radiant's bright interface while burning the midnight oil, of course!
      · 4 replies
×
×
  • Create New...