Jump to content


Photo

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


  • Please log in to reply
38 replies to this topic

#1 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 04 October 2013 - 04:04 PM

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, 04 October 2013 - 05:26 PM.


#2 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5338 posts

Posted 05 October 2013 - 01:46 AM

It is possible. If you know python you can do the changes yourself.
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#3 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 67 posts

Posted 05 October 2013 - 07:31 PM

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.

#4 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 07 October 2013 - 10:12 PM

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.

#5 Obsttorte

Obsttorte

    Scripting guru, Mapper

  • Active Developer
  • PipPipPipPipPip
  • 5338 posts

Posted 08 October 2013 - 01:43 AM

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.
  • maxdamage likes this
FM's: Builder Roads, Old Habits, Old Habits Rebuild
WIP's: Several. Although after playing Thief 4 I really wanna make a city mission.
Mapping and Scripting: Apples and Peaches
Sculptris Models and Tutorials: Obsttortes Models
My wiki articles: Obstipedia
Let's Map TDM YouTube playlist: ObstlerTube
Texture Blending in DR: DR ASE Blend Exporter

End of shameless self promotion.

#6 Serpentine

Serpentine

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2903 posts

Posted 08 October 2013 - 04:45 PM

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

#7 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 67 posts

Posted 08 October 2013 - 06:55 PM

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, 08 October 2013 - 06:56 PM.


#8 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 08 October 2013 - 07:05 PM

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

#9 Serpentine

Serpentine

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2903 posts

Posted 08 October 2013 - 07:23 PM

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.

#10 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 08 October 2013 - 08:24 PM

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

#11 Serpentine

Serpentine

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2903 posts

Posted 08 October 2013 - 09:09 PM

I'll see what I can cook up tomorrow :)
  • maxdamage likes this

#12 Serpentine

Serpentine

    Uber member

  • Active Developer
  • PipPipPipPip
  • 2903 posts

Posted 11 October 2013 - 04:57 PM

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.
  • maxdamage likes this

#13 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 18 October 2013 - 04:15 PM

Here is a screenshot of the static meshes and the Q4 mega health imported into unrealed but I still have to add the normal texture to each mesh:
Posted Image

#14 LDAsh

LDAsh

    Member

  • Member
  • PipPip
  • 67 posts

Posted 20 October 2013 - 02:29 AM

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.

#15 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 21 October 2013 - 02:58 PM

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

#16 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 25 October 2013 - 09:01 PM

Any word on the fix\feature?Also I have added the normal map to each of the static meshes that is used in the map.

thanks :)

Edited by maxdamage, 25 October 2013 - 09:13 PM.


#17 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 06 November 2013 - 09:52 PM

Any news on the fixes to Dark Radiant?

Thanks.

#18 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 22 November 2013 - 03:23 PM

*Bump*

#19 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 10 December 2013 - 05:23 PM

Any news on the fix?

Thanks.

#20 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36631 posts

Posted 11 December 2013 - 06:24 PM

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

#21 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 13 December 2013 - 06:45 PM

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.



#22 Springheel

Springheel

    Creative Director (retired)

  • Admin
  • 36631 posts

Posted 13 December 2013 - 09:01 PM

Your best bet is to PM him then...he hasn't posted here in two months.

#23 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 16 December 2013 - 04:16 PM

Your best bet is to PM him then...he hasn't posted here in two months.


Will do.

#24 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 14 January 2014 - 04:57 PM

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.

#25 maxdamage

maxdamage

    Member

  • Member
  • PipPip
  • 20 posts

Posted 14 November 2017 - 05:46 PM

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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users