Jump to content
The Dark Mod Forums

Recommended Posts

  • 3 months later...
Posted

Thanks for updating these scripts chedap. It's great to see that the Blender users aren't being stuck with outdated scripts that only work with ancient versions of Blender.

 

I've taken the liberty of uploading both ASE and LWO scripts to a new GitLab repository here:

 

https://gitlab.com/orbweaver/darkblender

 

I hope you don't feel this is treading on your toes, but such repositories are a better way of sharing code than file sharing links scattered across random forum posts, and allow people to more easily checkout the latest version, as well as tracking any changes that are made. Of course if you would prefer to maintain an "official" repository yourself you are free to do so; the beauty of Git is that changes can easily be pushed and pulled between different people even on different sites.

  • Like 1
Posted

I've updated the ASE exporter for Blender 2.8.

 

I've done some basic testing, confirming that it produces a valid ASE which displays in DarkRadiant with what appears to be the correct texture, but I haven't tested thoroughly to confirm that it is correct in all cases.

 

If any Blender users are trying 2.8 and want to test the new script, it can be found in the blender-2.80 branch of my repository:

 

https://gitlab.com/orbweaver/darkblender/tree/blender-2.80

  • Like 3
Posted

Im migrating to 2.8, working on a few models too, will definitely give these a spin. Thanks a lot for this.

  • 3 weeks later...
Posted

Hmmm, unfortunately Im getting an error when I try to start a map using a model I exported with the ASE 2.8 script. The model shows up fine in DR, but the dmap and map commands crash with the error: MESH _NUMTVFACES != MESH _NUMFACES.

 

Heres the model if you wanna test it on your side (just drop it in your project folder): https://1drv.ms/u/s!AtiNx4pGNqbmbe32GXV7-iomjLY

Posted (edited)

Working perfectly now, my friend! Thank you guys for this. 2.8 is a lot better to work with and its great (and important) to have scripts that keep tdm up to date with whats going on.

 

PS: Orb I had a typo in the material file for that model, I also had to get rid of the shadow mesh as it was sticking out visibly in several places, but its fixed and looking good here on my side now.

 

Will be checking lwo next.

Edited by RPGista
Posted

Working perfectly now, my friend! Thank you guys for this. 2.8 is a lot better to work with and its great (and important) to have scripts that keep tdm up to date with whats going on.

I agree, I really like the new 2.8 interface. It is so much more professional and dicoverable for newer users.

 

PS: Orb I had a typo in the material file for that model, I also had to get rid of the shadow mesh as it was sticking out visibly in several places, but its fixed and looking good here on my side now.

I didn't actually test with your example model, since I could reproduce the problem even using my simple test cube. The script line which populated the *MESH_TVFACES line was using some weird Blender API variable related to UV stencil layers, for some unknown reason. I changed it to simply count the number of triangles that were already being exported into *MESH_TFACE block.

  • 3 weeks later...
Posted

Hey, here's a very old question: is there a way to circumvent the 64 character limit on filepaths in Blender? I searched around and the only thread on the internet I could find was a Blenderforums one from like 2011, with Orbweaver in it. .ASE is human readable but .LWO isn't, so I can't fix the offending, long texture path post-export. I installed Blender 2.8 beta, but it's still the same there.

  • Like 1

My FMs: The King of Diamonds (2016) | Visit my Mapbook thread sometimes! | Read my tutorial on Image-Based Lighting Workflows for TDM!

 

 

Posted (edited)

Should be possible with something like WinHex, by adjusting the material header reference and then offsetting the bytes by however many extra characters you needed.

 

Would just like to add, according to my tests, LWO vs ASE will save you some MBs on your HDD, but won't actually do much for load-times or performance, AFAIK, incase that was a concern for anyone.

Edited by LDAsh
  • Like 1
Posted

Hey, here's a very old question: is there a way to circumvent the 64 character limit on filepaths in Blender? I searched around and the only thread on the internet I could find was a Blenderforums one from like 2011, with Orbweaver in it. .ASE is human readable but .LWO isn't, so I can't fix the offending, long texture path post-export.

 

I remember asking about that. It was much worse then, because the name limit was only 19 characters, which isn't enough for even the simplest material unless you create deliberately abbreviated material names for your models. At least we have 64 characters now, which seems to fit quite a lot of the TDM materials, but clearly not all of them.

 

I think we can work around it though. R Soul's material manager will actually detect when a loaded material is too long to fit in Blender, and adds it as a custom property. When I finally get time to work on this, I'm thinking I might add support to both the ASE and LWO exporters to use this FullName property if it is set instead of the Blender name, allowing a seamless workflow.

 

Would just like to add, according to my tests, LWO vs ASE will save you some MBs on your HDD, but won't actually do much for load-times or performance, AFAIK, incase that was a concern for anyone.

 

It probably doesn't even save you disk space once the assets get into a PK4 file for distribution, since the ASE will compress very well under ZIP. But it would still be nice to support both formats equally, which I think we can do with sufficient support in the exporters.

  • Like 1
Posted

Thank you for the great work of providing up-to-date exporters and refining them, it really is much appreciated.

 

Unfortunately I can't get any smoothing with the scripts in this thread, though. Got the latest Blender 2.79b and the 2.79 versions of the scripts from Orbweaver's Github and tried various combinations of checkbox settings.

 

Is there maybe something specific I have to do, beyond setting face shading to smooth and ensuring no double vertices? I've seen there was discussion of going either by smoothing groups or vertex normals in this thread.

Posted (edited)

Hey, here's a very old question: is there a way to circumvent the 64 character limit on filepaths in Blender? I searched around and the only thread on the internet I could find was a Blenderforums one from like 2011, with Orbweaver in it. .ASE is human readable but .LWO isn't, so I can't fix the offending, long texture path post-export. I installed Blender 2.8 beta, but it's still the same there.

I have two posts on Blender forums about it:

https://blenderartists.org/t/material-name-character-limit-63/1146620

 

And this one on what appears to be the official request forum (or maybe a sort of sinkhole where the Blender devs can filter out all these pesky user requests, or their version of hell banning):

https://blender.community/c/rightclickselect/hGcbbc/

 

 

 

I think we can work around it though. R Soul's material manager will actually detect when a loaded material is too long to fit in Blender, and adds it as a custom property. When I finally get time to work on this, I'm thinking I might add support to both the ASE and LWO exporters to use this FullName property if it is set instead of the Blender name, allowing a seamless workflow.

 

That would be a good idea. When I see a long name has been found, I find the material definition in DR and copy it to a new one with a shorter name which I'll then use normally.

Edited by R Soul
Posted (edited)

Unfortunately I can't get any smoothing with the scripts in this thread, though. Got the latest Blender 2.79b and the 2.79 versions of the scripts from Orbweaver's Github and tried various combinations of checkbox settings.

 

Is there maybe something specific I have to do, beyond setting face shading to smooth and ensuring no double vertices? I've seen there was discussion of going either by smoothing groups or vertex normals in this thread.

Weird, I get perfect results using the scripts (dont remember if I actually tried the lwo yet, but the ase works for sure).

 

Aside from setting the shading to smooth, make sure you clear any sharp edges, that you set to auto smooth with a good angle and that you click on Clear Custom Split Normals Data under Geometry Data, that usually needs to be done with imported meshes.

Edited by RPGista
  • Like 1
Posted

Weird, I get perfect results using the scripts (dont remember if I actually tried the lwo yet, but the ase works for sure).

 

Aside from setting the shading to smooth, make sure you clear any sharp edges, that you set to auto smooth with a good angle and that you click on Clear Custom Split Normals Data under Geometry Data, that usually needs to be done with imported meshes.

 

Thank you for sharing these additional steps, it works like a charm now - I do import meshes quite often, and additionally some shading issues I was having went away now that I started playing with the auto-smooth slider. Didn't need to use those settings before, but I believe this is just a more advanced exporter that takes more factors into account.

  • Like 1
Posted (edited)

I used a program called Araxis Merge to compare some LWO files, and it seems like there is a character set to determine the length of the material header prefixed to it. Apart from the headers themselves, the rest of the files are identical to each other. There are 2 references at the top and bottom, and if this prefixed character is not corrected, then Radiant doesn't want to play nice. I'm convinced it can be manually edited, but trying to figure out how to "count" the material length needs to be figured out. The reason for it being off by 2 is possibly because of the forward-slashes, or possibly because it's using a couple of other characters to count with.

xmodels/security/pythagorasdetector1
0123456789abcdefghijklmnopqrstuvwx

rmodels/storage/twixsixbarrel1
0123456789abcdefghijklmnopqr

 

Edited by LDAsh
Posted (edited)

Perhaps a way of solving it while blender doesnt fix the limit would be to have a separate field inside the exporter menu where you can tell it that X material means X's actual name in the game, so that the exporter will automatically substitute the X name for the actual in game name you defined when you export.

 

Something like this:

 

Material name in blender - 'rock'

In the exporter you set - 'rock' equals 'base/models/darkmod/etc/etc/etc/etc/rock'

 

You would only do this for names that are above the limit, if nothing is set in the exporter, it would simply use the blender material name as normal.

Edited by RPGista
Posted

Perhaps a way of solving it while blender doesnt fix the limit would be to have a separate field inside the exporter menu where you can tell it that X material means X's actual name in the game, so that the exporter will automatically substitute the X name for the actual in game name you defined when you export.

 

That's exactly what my suggestion above is proposing.

 

Such a custom field already exists if you are using R Soul's material manager, since it sets a FullName property on any material it couldn't completely import due to length limitations. If you are not using his material manager, you could set this property manually in the Blender interface.

 

My proposal is that both the ASE and LWO exporters will check for this FullName property and use it (if it is set) in place of the Blender material name. So pretty much exactly what you describe, except the mapping between Doom 3 material name and Blender material name is stored on the material itself, rather than trying to store a large list of material mappings in the exporter settings (which is more cumbersome and probably won't be persisted into the Blender file).

  • Like 1
Posted (edited)

Good to know you have a feasible workaround designed! This reminds me I should give Rsouls script a go.

Edited by RPGista
Posted

I've begun trying to update the material manager to work in 2.8.

 

http://forums.thedarkmod.com/topic/19196-blender-tdm-material-manager-plugin-updated-to-version-230/page-2

 

Question: what's the best way to assign materials/textures in 2.8? My own criteria is whatever requires the fewest steps and that only the diffuse texture is necessary. For me that is: add material, use nodes enabled (by default), set the shader type to 'Diffuse BSDF' (Principled makes things look too shiny), select the circle next to colour and choose Image Texture. Use the buttons underneath to load a next image or choose an existing one. Viewport shading should be 'LookDev', which seems to be the equivalent of 'material' in previous versions.

 

If other people agree that that's the best way to set up materials/textures I can focus my attempts on in. If not I can try to account for other ways too.

  • Like 1
Posted

I've encountered an error with the 2.8 ASE Exporter when exporting a specific model:

xu8dvla2.jpg

 

It only happens with this model, other ones export just fine. Also, i can export it to ASE with no problems in 2.79.

 

OrbWeaver, do you mind having a look at this?

 

I put the blend file here: https://mega.nz/#!UBY0DCoZ!ndbCrVJRhAA5eUinBOvoD7AhByMjOOCLDMM2BlxhA_4

 

Btw, thank you for the updated exporters, much appreciated. :)

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

    • snatcher

      Modpack 5.0 released! Introducing the Light Stones.
      · 0 replies
    • Goblin of Akenash

      Goblin-Secrets episode 2 is out now!
       
      · 3 replies
    • Airship-Ballet

      https://www.twitch.tv/airshipballet2 There was a mapping stream here, it's gone now.
      · 8 replies
    • peter_spy

      Stumbled upon a documentary on Enki Bilal, he is one of the most influential comic book artists of my adolescence. English auto-subtitles is rubbish, so you might need to brush up on your French
      · 3 replies
    • Goblin of Akenash

      Today I did a bit of an experiment! I wanted to see if I could get a dark radiant map into garry's mod, the quickest and dirtiest and not-workiest method is "OBJ2VMF" which converts .obj models into VMF files for hammer to then compile, the way its supposed to work is that you input a 6 sided cube and it turns it into a 6 brush room (not exactly ideal for this since that's not how TDM maps work, this honestly would have been a better idea with any thief game from 1 to the one from 2014 since they all work like that) so what ended up happening was that for every brush there was 6 brushes would be ontop of that almost inflating everything in the map like a balloon, map scale was also an issue that I couldn't fine-tune easily either so the scale is way off ontop of everything being inflated making the space inside the map very tiny! anyways heres the result of that and it looks almost nothing like footloose (plus I did add a bunch of random props in gmod for funsies and better visibility since the process involved replacing all the textures with dev ones that look very flat when in full-bright)

      https://streamable.com/ctmh58

      (streamable link will expire in 2 days but I'll have a spoken word version of this post along side the video and other fun images relating to the bsp inflation effect in the next "Goblin Secrets" video next month)
      · 0 replies
×
×
  • Create New...