Jump to content
The Dark Mod Forums

R Soul

Member
  • Posts

    185
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by R Soul

  1. While browsing for 3d objects I saw these 3d Frieze models and was thinking they could be of use for someone making TDM resources. In some scenarios the 3d shapes themselve may be good, or it may be better to use them to generate the various texture required for materials:

    https://creazilla.com/nodes/63996-frieze-set-3d-model

    Note that they are in the native format for Blender, and there are other models on that site that may also be suitable.

    • Like 3
  2. Something could be done. A few years ago I wrote an addon that looks at a Blender material's diffuse texture and scans the .mtr files to work out the TDM material name. Any name over 63 chars long gets saved in a custom property called FullName. An export script could look in there and do a swap. It's worth noting that my addon is not linked to any export process. Any user can make their own custom properties.

    I think OrbWeaver did some unrelated modifications to some of the import/export scripts, but it's been a very long time since I've been here so I don't know the current state of that side of things.

  3. People who use Blender for object editing sometimes run into a problem with material names. It has a character limit of 63. That's usually fine but some existing TDM materials have names which are longer than that, so it becomes impossible to use them. An FM author can make a copy of the material with a shorter name, but that might be adding unnecesary complexity for people who are just making standalone objects to share.

    I've been mounting a valiant campain on various Blender forums, and some of their LinkedIn posts, to get them to increase the limit, but to no avail. So it's time to take a different approach. Would it be feasible for TDM to rename long materials? The rendering system would have to intercept and replace calls to the original names, or something like that. I'm not sure if that would be an easy thing to implement or if it would set off a chain of complex events or coding etc.

    Another possible approach could be a material ID sytem, so in Blender the material name could be WoodPlanks_4ACFB987B, which would correspond to something like TDM\long\path\to\material\WoodPlanks

    That might even be beneficial for shorter material names, as even they are not user friendly to look at in some interfaces.

  4. Hi OrbWeaver.

    Each time I load Blender, for your ASE and LWO addons the console lists a load of warnings about properties that should be annotations. It doesn't say why, just that they should be.

    Warning: class <class name> contains a property which should be an annotation!
    ...
        assign as a type annotation: EXPORT_OT_ase.filter_glob
        assign as a type annotation: EXPORT_OT_ase.filepath
    ...
        assign as a type annotation: EXPORT_OT_ase.option_scale

    Fortunately all that's necessary is to change the = to a : and the console loses a lot of clutter.

    • Thanks 1
  5. I've been using Blender 2.80 for a while now. One of the good features is the ability to edit multiple objects at the same time. It's often useful to have vertices from different objects lined up, and it's especially useful when doing UV mapping with a single material for all objects because overlaps can be avoided.

  6. I think it's working. I got a texture loaded and assigned. Updating the screenshots meant I had to test the other features (e.g. overly long material names, duplicate materials etc) and the results were what I expected.

     

    I also gave the Material file extractor a test to make sure the zip (pk4) system still works, and it seems fine.

     

    https://github.com/RSoul82/Blender-TDM-Material-Manager

    • Like 2
  7. It feels like the ability to load textures is close. The existing code still finds material slots. Each slot seems to contain the actual material (i.e. mat = slot_name.material). In case the user has turned off nodes, I use the code mat.use_nodes = True to ensure they're turned on.

     

    if mat.node_tree.nodes.find('Image Texture') == -1: will check if there isn't such a node, in which case it needs to be added

    node_tree.nodes.new("ShaderNodeTexImage") adds an image node

     

    That's it for now. Why does the day have to end when I'm getting somewhere?

    • Like 1
  8. Thanks. I've added your changes to my file (on GitHub).

     

    Notable changes from 2.79 to 2.80:

    The code for checking object visibility has changed

    Reading mtr files would crash with one particular file, so I did something to do with encoding.

     

    Now that I've got going and we're over the UI hurdle I'm happy to continue. So far I've made the assumption that the the texture is assigned via a material node called 'Image Texture' (the code checks for the file path not just the texture name).

  9. 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
  10. I've begun the process of updating this to work in Blender 2.80. I've got the panel and buttons showing up and am working my way though the errors I get when I try to run things. Material textures seem to have a different structure. Google results may be sparse for now because it's so new, so advice/assistance welcome.

     

    Current file on Github: https://github.com/RSoul82/Blender-TDM-Material-Manager

     

    edit: Because it's not ready, it's not quite in the Addon format (no 'info' at the start of the file) - it has to be run from Blender's text editor. The controls show up on the right (N menu, under a 'TDM' tab).

     

    edit2: It set the correct name for test material I'd set up.

    • Like 1
  11. 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.

  12. I've done that now. The master branch now has the GPL license. I also reuploaded the file addon in a "2.79 archive" branch to preserve that version while the master gets updated for 2.80. I recently thought about updating it but read about 2.80 not being finished yet, but if you're willing and able, then you have my sword.

    • Like 1
  13. I just had a go at this and for me there were no problems resizing the model in DR. It may be that your scaled models are in a format that causes the error. For me the format is LWO. If your setting is different, maybe DR is having trouble converting from one format to another.

     

    I also had a go at modifying it in Blender, but it's a difficult one to work with because the canvas is formed of two layers (one facing out, one facing in), but not in a consistent way. And the I'm finding it very had to get smooth shading working, which isn't usually a problem for me.

     

     

    And yes I know what today is.

×
×
  • Create New...