Modular Items

I've been working on some sword models for another project, and would like to put them in Daz, as well. However, what I'd like to do is develop a modular system that allows you to swap out parts (blades, guards, grips, and pommels) as well as use morphs to adjust dimensions and other features so one sword model could conceivably be used to make dozens of different swords because of the number of possible combinations (I've also got a procedural material in Blender that would let you add rust, chips and scratches, and other wear and tear that would be great to make use of, if possible).

For example, let's say the "default" blade has a minimum length of 36 inches. Pretty standard longsword blade. I duplicated this and tweaked its dimensions to use as the morph which would allow the blade to be lengthened up to 42in. I have other morphs that would allow you to make the blade broader, or even adjust the cross section (in this case, between a diamond and hollow diamond).

Easy peasy so far. The origin of the blade object is at 0,0,0, which is also the base of the blade.

The guard would also be simple, because I can put the top of the guard (the bit that connects to the blade) at 0,0,0 with the same origin. But now it gets tricky:

Some guards may be taller than others, which means I couldn't set a fixed position for the grip because this might cause gaps between the guard or grip, or for the guard to clip into it.

Additionally, I was going to have morphs for tweaking the grip length which would cause similar problems for pommels; if the pommel has a fixed origin, it could lead to gaps or clipping.

TL;DR version, would any of this be possible:

  • The sword should be treated by Daz as one model. You select the sword, and the whole shebang gets added to the scene.

  • Once added, you can swap out individual pieces, (guards, pommels, etc.) and each piece would have its own morph to tweak the shape (IE wheel-shaped Pommel A has its own unique morph controls vs. scent stopper Pommel B).

  • Each piece would attach to the previous in a way that dynamically adjusts as the length of the part it's attaching to changes.

  • Bonus: Would it possible to parent morphs of two separate objects in the scene, so tweaking one object would automatically update another? That way I could have scabbards that automatically resize to fit the blade of the sword.

Comments

  • crosswindcrosswind Posts: 7,003

    I think technically it's doable, however, I'm afraid there'll be potential problem in terms of UV stretch and/or texture stretch after dialing morphs of "different modular"... But if you only use shaders plus shader presets, that'll be much easier I believe.

    As for Bonus question, yes, you may set up ERC links and formulas in between the morphs of two objects in Property Hierarchy, by using Controller / Sub-Components.

  • Richard HaseltineRichard Haseltine Posts: 101,032

    Traveler had a Multi-sword like this, and there was a staff set too

  • crosswind said:

    I think technically it's doable, however, I'm afraid there'll be potential problem in terms of UV stretch and/or texture stretch after dialing morphs of "different modular"... But if you only use shaders plus shader presets, that'll be much easier I believe.

    As for Bonus question, yes, you may set up ERC links and formulas in between the morphs of two objects in Property Hierarchy, by using Controller / Sub-Components.

    The shader that I have is entirely procedural with no image files, and uses Object mapping instead of UVs. It's also INSANELY complex, (I got it from Blender market) but is really cool because I can adjust sliders to add rust, change colors, and add chips and scratches, and other blemishes. I see Daz does have a Shader mixer, but I have no idea whether it's capable of the same functionality as Blender. And even if it CAN do it, I'd have no idea how to even begin translating between the two.

    So how exactly would the modular components work? Would I use parenting to attach everything together, with bones to control where the components that might need to be moved would attach? How would the different components be "swapped in?"

  • crosswindcrosswind Posts: 7,003

    ambaryerno_f18cf8da31 said:

    crosswind said:

    I think technically it's doable, however, I'm afraid there'll be potential problem in terms of UV stretch and/or texture stretch after dialing morphs of "different modular"... But if you only use shaders plus shader presets, that'll be much easier I believe.

    As for Bonus question, yes, you may set up ERC links and formulas in between the morphs of two objects in Property Hierarchy, by using Controller / Sub-Components.

    The shader that I have is entirely procedural with no image files, and uses Object mapping instead of UVs. It's also INSANELY complex, (I got it from Blender market) but is really cool because I can adjust sliders to add rust, change colors, and add chips and scratches, and other blemishes. I see Daz does have a Shader mixer, but I have no idea whether it's capable of the same functionality as Blender. And even if it CAN do it, I'd have no idea how to even begin translating between the two.

    So how exactly would the modular components work? Would I use parenting to attach everything together, with bones to control where the components that might need to be moved would attach? How would the different components be "swapped in?"

    If you just make separate Props to "form a whole sword", yes, technically you always can group them together with parenting. Then build ERC links of rigging / morphs among the Props. But it's not the best way... Better convert all Props into a single Figure if you want to have the enablement of both rigging and morphing.

    Well plan and design the components / modules before modeling / sculpting. Then it'll be easy to rig and make morphs on it. Import morphs as different type of "components" , create control properties for them, then build ERC links as needed. Then save assets, Shaping and / or Property Presets accordingly, etc. etc.

    I quickly made a simple case as below,  a "modular" Katana... For your reference.

    SNAG-2024-1-6-0014.png
    2560 x 1400 - 366K
    SNAG-2024-1-6-0015.png
    2560 x 1400 - 414K
    SNAG-2024-1-6-0016.png
    2560 x 1400 - 382K
    SNAG-2024-1-6-0017.png
    2560 x 1400 - 338K
  • edited January 6

    The problem is that morphs aren't going to work for changing a lot of the components I have in mind. For instance, let's say this is Pommel #1:

    Towton Sword - Oakeshott Type XVIIIc – Arms & Armor

    And then this is pommel #2:

    Single Handed Sword -- Fishtail Pommel (SHARP) — Jesse Belsky Stageswords

    The shapes are simply far too different in their geometry.

    Post edited by ambaryerno_f18cf8da31 on
  • Richard HaseltineRichard Haseltine Posts: 101,032

    You could use GeoGrafts.

  • crosswindcrosswind Posts: 7,003
    edited January 6

    ambaryerno_f18cf8da31 said:

    The problem is that morphs aren't going to work for changing a lot of the components I have in mind. For instance, let's say this is Pommel #1:

    ..

    And then this is pommel #2:

    ...

    The shapes are simply far too different in their geometry.

    That won't be an issue. You just need to model / sculp the pommel separately, merge them with the blade as a single Sword prop or figure. Then rig to change the scale of one shape,  or create morph(s) to "hide" another, or use conditional graft to hide the designated geometry.... quite a few ways.

    Like below example.... , Technically, you can make a very complex "structure" of modules as you wish.... as long as you can design and make them well.

     

    SNAG-2024-1-7-0020.png
    2560 x 1400 - 330K
    SNAG-2024-1-7-0021.png
    2560 x 1400 - 282K
    SNAG-2024-1-7-0022.png
    2560 x 1400 - 287K
    Post edited by crosswind on
  • So if I'm reading you right, each component of a given sword needs to first be imported individually into DAZ, with whatever morphs to tweak the shape of a component (length, width, diameter, etc.). Then add a Conditional Graft to the parts I want to be able to turn on or off. Once all that is set up, Parent them to whatever the base component will be which will make it a single object.

    I could then also add ERC links so that morphing part of the sword would also morph the scabbard object, IE to fit the width of the blade.

  • crosswindcrosswind Posts: 7,003

    ambaryerno_f18cf8da31 said:

    So if I'm reading you right, each component of a given sword needs to first be imported individually into DAZ, with whatever morphs to tweak the shape of a component (length, width, diameter, etc.). Then add a Conditional Graft to the parts I want to be able to turn on or off. Once all that is set up, Parent them to whatever the base component will be which will make it a single object.

    I could then also add ERC links so that morphing part of the sword would also morph the scabbard object, IE to fit the width of the blade.

    That is correct ~ as an alternative, you can also import them into Ds all together after modeling the objects in external application. It's up to you...  Grouping + Parenting or rigging them as a single figure will be also up to you... ERC links will work on either of them.

  • Now how about the attachment points of various components adjusting to the length of what it's attached to?

    My thought process is to put bones on the objects, with the attachment point for each component being at the end of that specific bone, and the length of the bone changing with the morph.

    Say, for the pommel, it would attach to a bone at the end of the grip called "Pommel" (for simplicity's sake). The grip morph would control the length of that bone along with the mesh, and (hopefully) moving the pommel with it as the length of the grip changes.

  • crosswindcrosswind Posts: 7,003

    If you add bones, that's gonna be a rigging with defined face group assigned and that'll be more complex. Morphing is easier. Still, IMO, don't make the modules too complex otherwise you might be lost some day. devil

  • My concern is would morphing alone be enough to adjust the position of a parented object? Right now I'm looking at four parts to each sword:

    The Blade
    The Guard
    The Grip
    The Pommel

    The blade and guard would be at fixed positions (base of the blade and where the guard meets the blade at 0,0,0). However the position of the grip and pommel could change based on how tall the guard is, and how long the grip is.

  • crosswindcrosswind Posts: 7,003
    edited January 8

    I understand that. On a Sword, the "transforms" of the pommel should be limited within a certain and reasonable area along the grip... as long as it's not a long distance moving (e.g. moving to the tip of the sword...devil),  morphing will work well.

    Post edited by crosswind on
  • I might need more guidance on how to do what you're saying in your example. As far as I've b tell you can't actually merge objects in DS. Which means if I'm going to make everything one object it'd have to be at import, but that will make the morphs a colossal mess because of geometry not matching. And Conditional Grafts only work on Figures, not props.

  • crosswindcrosswind Posts: 7,003
    edited January 11

    Yes, it'll be a bit cumbersome with a single rigged figure for such a modular case... it's one of the reasons that very very less PA chose to make a figure-based modular weapon other than multiple weapon Props.. That's why I always say "technically" it can be done but practically it'll really depend...

    If you choose no-go for rigging as a single figure, the method is still the same. You scale down one of the "Designs" to tiny enough, import back as a morph and link it to a controller via ERC on another "Design", and vice versa.

    Or, the simplest way : you just create a couple Bool properties and use "Visible in Viewport" to control Visible / Invisible from one another, just like a Conditional Graft...

    SNAG-2024-1-11-0008.png
    2560 x 1400 - 969K
    SNAG-2024-1-11-0009.png
    2560 x 1400 - 900K
    Post edited by crosswind on
  • Making Part B a morph of Part A will simply not work because of geometry changes. And no, it physically would not be possible to keep the same vertex count or even order across all parts. I already tried once (IE, a guard that can have either a square, rectangular, or circular cross section). Even maintaining the same vertex count just made a colossal mess, and trying to apply other morphs on top of the section changes (IE changing how much the guard tapers to its end) just ended up breaking the mesh.

  • crosswindcrosswind Posts: 7,003
    edited January 11

    Not correct... You misunderstood the way, it's not making Part B as a morph of Part A by importing or vice versa ! If so, of course the polycount / vertices won't match... It is the way of making a morph on Part A or Part B itself separately and use a property on each of them to control one another ! 

    I've already done it in the above example, it's the very standard way of using morph and ERC controlling to make the effect in place. Trust me, I almost work on these stuff everyday for my clients.... You'll make it as long as you do it right.

    Good luck ~

    Post edited by crosswind on
  • Well, what I'm just going to do is use Vertex Groups in Blender to put every component into one mesh and use that to make it easier to select the faces I want to create the Conditional Grafts.

    One further question on that front: Can you set an ERC so that turning on one Graft turns off others? That way activating one pommel automatically turns off all the other pommels.

    Other than that the only other thing I need to figure out is getting the materials from Blender into Daz. Which is going to be even TRICKIER than the knot in my other thread, because its all procedural and incredibly complicated.

     

  • crosswindcrosswind Posts: 7,003

    Using Vertex Group is surely a good way.

    Yes, still use Property Hierarchy to set ERC links among the toggles of Conditional Grafts, by setting 1 or -1 Scalar values to turn Sub-Component property On or Off.

    Besides, modeling, procedural materials, UV Unwrap, baking texture maps etc. could be pretty standardized in terms of a Blender to DS pipeline. And still suggest use Iray Uber shader in DS directly...

    Recommend Ryan King Art's Blender channel on youtube, he's a veteran in procedural material from whom I learnt a lot - https://www.youtube.com/@RyanKingArt

  • edited January 12

    Just to give you an idea of what the shader I'm using can do, see the attached.

    These are all different sliders adding wear, rust, scuffing, chips and scratches, and even a Damascus pattern. And other sliders can change the shape of all those patterns, some of them adding bump mapping, too (so you could make a rough and completely rusted-through blade).

    There's also fine detail (like the grain lines running along the blade) that baked UV texture maps just won't pick up.

     

    BaseTex.JPG
    739 x 493 - 26K
    Detail1.JPG
    820 x 544 - 35K
    Detail2.JPG
    823 x 585 - 50K
    Detail3.JPG
    836 x 578 - 62K
    Detail4.JPG
    913 x 568 - 62K
    Detail5.JPG
    1060 x 634 - 74K
    Detail6.JPG
    1054 x 617 - 69K
    Post edited by ambaryerno_f18cf8da31 on
  • crosswindcrosswind Posts: 7,003

    I understand that and I just suggested... If you do want to render a close-up CG level sword with enough details, you certainly can do these as you wish. It's alwasy up to your choice at the end of the day.

    But to most of the people or customers, they may only need a sword with just good design and good quality of texture other than high definition / high details textures. Just no more, no less will do greatly.

    Like the case I encountered last month, I bought a small set of Desk + Chair product (Office Set), the IM package sige of the product is 2.5GB in which there're nearly 2.2GB texture maps files with 8K....It'll nearly consume 3.8GB VRAM to just render an Office Desk set. To me, it's really not necessary, though I'm never short of disk space and VRAM.

  • The nice thing about the procedurals here is if I can get it to work that SHOULD keep the file sizes down, because there's no actual texture maps involved.

    Shader Mixer and Blender are similar enough I'm sure I could recreate it, the problem I'm running into is that the SM bricks aren't 1:1 with Blender's nodes, and I'm having trouble figuring out the right bricks to use in their place. Especially because there's functions Blender can do with a single node that may require multiple bricks to recreate in SM.

Sign In or Register to comment.