Jump to content
The Dark Mod Forums

ASE Export Script for Dark Radiant


rich_is_bored

Recommended Posts

There may or may not be something wrong with the Blender import script. It's hard to tell given the Dark Radiant plugin is in a state of flux.

 

I will say that the last time I worked on the Blender import script, I did a batch import of all the ASE files bundled with Doom 3 and there were no observable errors. But that doesn't mean much.

 

At any rate, I've submitted a bug report for the python dialog not trapping key presses.

Link to comment
Share on other sites

Okay I was able to confirm the overwrite dialog, the fix for key trapping, and it looks like the textures and geometry are preserved (best I can tell from within DR). Really nice!

 

So: just for completeness/summary: old script several days ago worked to import into Blender 2.5, but was said to have several issues needing fixing and couldn't be imported back into DarkRadiant. The newer version exports and imports back into DarkRadiant fine, but don't import into Blender 2.43, 2.49, or 2.5.

Link to comment
Share on other sites

  • 4 weeks later...

That script is very cool!

 

I managed to find out (or so I think) that I need to copy it to /usr/lib/darkradiant/scripts/ but then, how do I run it from within DR? Could somebody please put a quick tutorial on the wiki?

 

Me thinks that could be *very* useful to create easily simple models that can be used as entity f.i. for LOD!

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

It's (hopefully) still in dev, and is not in a state where DR <-> Blender is a simple back-forth. See my feedbacks above for problems encountered.

 

Yeah, but all I care about is "DR -> ASE_MODEL -> load in map and display", I don't do Blender :)

 

Anyway, how I do I run it? "RunScript" from the console did nothing?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

No idea; my interest in this is to get geometry from DR to Blender (and of course then reverse that) and that currently is on the fritz the best of my knowledge.

 

Erm, who are you and what did you do to the real SneaksieDave? :ph34r: Here:

 

http://forums.thedarkmod.com/topic/10906-ase-export-script-wip/page__view__findpost__p__217968

 

you gave a report of successfully running the script. So, pray, tell me, how did you do it? My DR doesn't have anywhere (as it seems) anything to run scripts, and the console does not respond to the only command I found via google, namely RunScript:

 

http://wiki.thedarkmod.com/index.php?title=DarkRadiant_Script_Reference

 

I am running DR 1.3.2 on Linux 64bit, if that matters. (Looking into the about box, I see no mentioning of a "script module", but maybe there isn't one?)

 

Documentation is lacking...

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Oh run it in DR? There should be a Scripts menu entry. If you have the script dropped in the right place (mentioned in this thread I think) then it's right there. Select some stuff and run it.

 

I'm not sure it's going to give what you want/need anyway. Something (not sure what) might be wrong with the models if they won't open in Blender (any version I tried). Though, they open in DR. :wacko: So yeah -- I'm confused. Rich hasn't replied back here yet so I have no idea what's going on currently.

Link to comment
Share on other sites

Just to be certain there are no issues here I've re-uploaded the script. I've just tested it with DR 1.3.2 and it produces valid ASE files that can be loaded back into DR.

 

I thought I covered installation in the first post but to go over it again you place ase_export.py in your "DarkRadiant/scripts/commands" folder and the next time you launch DR, aseExport will be available in the scripts menu.

 

Just select the brushes and or patches you would like to export, and go to Scripts > aseExport.

Edited by rich_is_bored
Link to comment
Share on other sites

@rich_is_bored: I can confirm (from above) that I am able to make a selection of brushes and patches, export them in DR, and then reload them as a model in DR. That appears to work.

 

However, attempting to import to Blender has mostly unsuccessful results:

 

1. If an exported ASE contains only a single mesh patch: imports to blender 2.52 fine

2. If an exported ASE contains multiple patches: blender only imports one of the patches apparently

3. If an exported ASE contains patches and brushes: I made a patch arch with some brush columns -- the result in Blender was a single brush block (of expected shape) but nothing else.

4. If an exported ASE is only brushes: I made a doorway of 4 brushes (two sides, one top, and an overhang) -- the result from importing to Blender was one rectangular block.

 

I've tried Blender 2.43:

 

Import Patch:  D:\doom3\darkmod\models\darkmod\architecture\test.ase
Read file
Import Objects
Blender.Scene.getCurrent() is deprecated,
       use Blender.Scene.GetCurrent() instead.
Traceback (most recent call last):
 File "<string>", line 392, in read_ui
 File "<string>", line 53, in read_main
 File "<string>", line 281, in read_file
 File "<string>", line 298, in spawn_main
 File "<string>", line 361, in spawn_mesh
ValueError: matrix does not have an inverse

 

and 2.52:

 

found bundled python: D:\programs\BLENDE~1.5-A\.blender\python
RNA_string_set: IMPORT_SCENE_OT_ase.filename not found.
RNA_string_set: IMPORT_SCENE_OT_ase.directory not found.
*** ASE Scene Importer v0.06 ***
Loading D:\doom3\darkmod\models\darkmod\architecture\test.ase
Success.
Traceback (most recent call last):
 File "D:\programs\BLENDE~1.5-A\.blender\scripts\io\import_ase.py", line 581, i
n execute
   applyData(model)
 File "D:\programs\BLENDE~1.5-A\.blender\scripts\io\import_ase.py", line 558, i
n applyData
   ob_new.data.add_material(bpy.data.materials[model.materials[x.materialref].n
ame])
KeyError: 'bpy_prop_collection[key]: key "textures/darkmod/stone/brick/blocks_br
own" not found'

 

Is there a version of Blender (or an import script) where these DR exports can be used?

 

 

Edit: To risk confusing(?) the issue again, I'll repeat: older versions of the script could import to blender. Something break along the way, or conflicting versions, or...?

Link to comment
Share on other sites

Just to be certain there are no issues here I've re-uploaded the script. I've just tested it with DR 1.3.2 and it produces valid ASE files that can be loaded back into DR.

 

I thought I covered installation in the first post but to go over it again you place ase_export.py in your "DarkRadiant/scripts/commands" folder and the next time you launch DR, aseExport will be available in the scripts menu.

 

Just select the brushes and or patches you would like to export, and go to Scripts > aseExport.

 

Erm, I don't have a "scripts" menu?

 

Also, the "DarkRadiant/scripts/commands" folder is a bit unspecified, because I don't know where exactly in Linux this is.. :)

 

(I found /usr/lib/darkradiant/scripts/commands and there are a few .py files in there, so I dropped it to there, too.)

 

Anyway, started this:

 

http://wiki.thedarkmod.com/index.php?title=Running_Scripts_in_Darkradiant

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Some of the included scripts require headers that are not used, i.e random.

 

Should I bother putting a ticket in? will test if its just as trivial as I think to fix.

 

Think even if the fix is 1minute, a ticket would be nice. Hopefully can get this work, the script looks damn useful for me.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

However, attempting to import to Blender has mostly unsuccessful results:

 

I appreciate the feedback but the functionality of the Blender import plugin has no bearing on whether or not the Dark Radiant ASE export plugin works.

 

I'll test things on my end and keep you posted on here...

 

http://forums.thedarkmod.com/topic/10941-ase-import-script-for-blender-25/

Link to comment
Share on other sites

Erm, I don't have a "scripts" menu?

Then you didn't compile DR with scripting support, probably because your system is lacking the boost python dev libs. The automake toolchain automatically deactivates the scripting build option if the headers are not present on your system.

Link to comment
Share on other sites

Then you didn't compile DR with scripting support, probably because your system is lacking the boost python dev libs. The automake toolchain automatically deactivates the scripting build option if the headers are not present on your system.

 

I didn't compile it, just used the one from the repository and already pinged Orbweaver if he can fix it - otherwise no linux user can run scripts unless he compiles DR by himself (which we wanted to avoid in the first place by having a repository :)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I have 1.3.2svn5614~lucid1 installed from the repository and there is definitely a scripts menu with three commands in. :unsure:

 

Sorry, I meant with "repository" the one via PPA. E.g. just the one that Ubuntu now provides.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

That's the one I meant too -- that is the latest version from the PPA.

 

https://launchpad.net/~orbweaver/+archive/darkradiant/+packages

 

That's the one I have installed, the "karmic" version.

 

The log for both 64bit and 32bit say during buld "Python scripting: no". Huh?

 

http://launchpadlibrarian.net/50643137/buildlog_ubuntu-karmic-amd64.darkradiant_1.3.2svn5614~karmic1_FULLYBUILT.txt.gz

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

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

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...