By kami
#372741
Hi Jeremy
Would it be possible to have MXS references working in a way that you could exchange them easily with an external block or the other way around? Or replace them with another MXS)
At the moment they are shown in the block manager but you cannot do much with it there.
We often work with external blocks. At one point the file might get too heavy so it'll be helpful to exchange the external block for an MXS reference. I could just delete it and insert the reference, but if you have moved (or even rotated the block before) it's very hard to put it the same way as the MXSrefs don't show up as the right geometry. If you could just swap the block for a reference that would help alot.
Another example: If you already have a MXS ref in your scene which you want to exchange for a different one, you'd have to reposition it too.
Hope that this would be possible sometime in future....
Best, Christoph
By JDHill
#372750
kami wrote:At one point the file might get too heavy so it'll be helpful to exchange the external block for an MXS reference. I could just delete it and insert the reference, but if you have moved (or even rotated the block before) it's very hard to put it the same way as the MXSrefs don't show up as the right geometry. If you could just swap the block for a reference that would help alot.
Let's try to make the idea more concrete. First, we have block definitions, and block instances; let's say that you have 10 instances of a block definition, which points to an external 3DM. What we can do here is modify that block definition so that it no longer points to the 3DM, and instead becomes a placeholder for an MXS file. After doing so, the 10 instances will remain unchanged, except that they will now show no geometry, and will instead just contain the point cloud, wireframe, or nurbs boxes that represent what is contained in the MXS file. So you need a command that prompts you to select a block instance, and modifies that instance's definition.
kami wrote:... or the other way around?
I can see wanting to swap an MXS Reference in for a block definition that points to a 3DM, but would a tool that went the other way actually see much use?
kami wrote:... Or replace them with another MXS
This (setting an existing MXS Reference to refer to a different MXS, if that is what you mean) is already implemented in Object Properties > Maxwell; just clear the reference and browse to another MXS.
By kami
#372757
Let's try to make the idea more concrete. First, we have block definitions, and block instances; let's say that you have 10 instances of a block definition, which points to an external 3DM. What we can do here is modify that block definition so that it no longer points to the 3DM, and instead becomes a placeholder for an MXS file. After doing so, the 10 instances will remain unchanged, except that they will now show no geometry, and will instead just contain the point cloud, wireframe, or nurbs boxes that represent what is contained in the MXS file. So you need a command that prompts you to select a block instance, and modifies that instance's definition.
That would be exactly what I was hoping for!
I don't know if it is possible, but in the block manager you can select a different .3dm source file for an external block. What if you could also browse for a .mxs instead of a .3dm?
I can see wanting to swap an MXS Reference in for a block definition that points to a 3DM, but would a tool that went the other way actually see much use?
I think I wouldn't need it, but maybe if it is working in one way, people would want it to work the other way around too? The advantage would be, that it would be the easiest way to directly implement the geometry into your scene file (from mxs reference to an embedded block) if you were working with mxs references before.
This (setting an existing MXS Reference to refer to a different MXS, if that is what you mean) is already implemented in Object Properties > Maxwell; just clear the reference and browse to another MXS
Ah, yes. Perfectly! I keep forgetting that as I am working with the block manager a lot to exchange blocks and there you cannot exchange mxs blocks.
By JDHill
#372758
Your command would not involve the block manager, it would be a command where you are prompted to select a block instance, and to then browse for an MXS file, after which the plugin would remove everything from the instance's definition, and replace it with a point cloud. Afterward, that definition, and all of its existing instances, would represent the chosen MXS file.

Regarding going the MXS > 3DM route, I prefer not adding things without good reason -- not only because it represents an investment of time into something lacking a definite payoff, but because this plugin already has far too many dark and obscure corners.
User avatar
By glassbathroom
#372763
Hi kami & JD,

Can I just add that I would find this extra feature a tremendous bonus (if it is possible). The workflow described exactly matches what I have been doing in Rhino. But only with simple blocks inserted at 0,0,0. If I have complex positioning of the block I never manage to change to MXS.

Personally I think it is unlikely that I would ever want to go from MXS to 3DM, but an easy way of going from 3DM to MXS would be superb.

Good stuff if it can be done.

glassbathroom
By kami
#372803
As noted before, I think the only really usage of the backward way (from mxs to block) would be if you would need to implement all the external geometry into your file either because you'd like to use it in a different way than just rendering or because the external objects would need to be influenced by objects in the other scene so you would need to alter them in a way that you would also see the rest of your scene... I can't tell if this is necessary very often, but I'm almost sure that a request for this feature will come too in the future :)
By kami
#373171
I've got one more request concerning the MXS reference use. Right now you would have to check the "Instances" in the export settings for the mxs references to export. But I tend to not use instances usually, because they slow down the render, but I still want to use the MXS references. When I have a complex scene, I use MXS for different buildings (in the background) and I use block instances for objects like trees, windows, furniture etc and I would want them to export as normal objects.
I'd prefer it if they would export even if instances are disabled, maybe with an additional 'Disable MXS References' button, but I wouldn't need that one, because you could just hide them in the render if you don't want to export them ...
By JDHill
#373178
I'll look into it, but of course it works that way because a) they really are (block) instances, and because b) I make the assumption that if there are, say, 100 instances of a given MXS reference, we want 99 of them to be instances, rather than loading the complete MXS 100 times.
By kami
#373181
What I meant was, that I would want the block instances in the scenes (windows and furniture) to export as objects. I didn't think of a situation when you have hundreds of trees as mxs. Don't know how the engine behaves when it has to load the same file several times ...
But I guess if the MXS references in the scene would always be exported and you could control with the 'Instances' whether they are used as instances or different objects that would be perfect.
Because in my understanding there is a difference between MXS references (which are objects that are not exported but loaded directly by the engine) and instances (which are there to save you memory I guess)

I also noted that when you make a copy of a mxs reference and exchange it with a different mxs, it changes the original mxs too. This might make sense somehow, but I was rather surprised, as I did the change in the object tab of that object and thought it would only affect this object.
By JDHill
#373184
We should probably clarify how we're using terminology, because there is overlap; in Rhino, we are dealing with:
  • block definitions
  • block instances
And in Maxwell:
  • meshes
  • MXS References
  • instances (of meshes and/or MXS References)
In Rhino, what you see as an MXS Reference is implemented by attaching data to a block definition. You may then insert as many (block) instances of that definition as you like. It is done this way so as to be analogous to how block definitions & instances work with 3dm files in Rhino, with the result being that in the same way updating the definition of a Rhino block also updates any instances of that block, updating the definition of the MXS reference also updates every instance of that MXS reference.

At export, when we encounter a block instance (which we don't, if we have disabled exporting instances) whose definition refers to an MXS file, we create an MXS reference in the MXS we're exporting. This reference must be loaded into Maxwell in order to render it. However, if we later encounter another instance of that block definition, we don't want to create another MXS reference, we want to create an (a Maxwell) instance of the previously-written MXS reference, so that we don't end up loading GBs of MXS files, since that would basically defeat the purpose.

As such, what you are requesting is possible, but it is not trivial, requiring that a separate pass be made through the whole model.
By kami
#373740
Hi Jeremy
Sorry for my late reply. This topic kind of got too complicated for me to follow :)
JDHill wrote:In Rhino, what you see as an MXS Reference is implemented by attaching data to a block definition. You may then insert as many (block) instances of that definition as you like. It is done this way so as to be analogous to how block definitions & instances work with 3dm files in Rhino, with the result being that in the same way updating the definition of a Rhino block also updates any instances of that block, updating the definition of the MXS reference also updates every instance of that MXS reference.
It is understandble, now that you explained it, but before, the whole process / how a MXS references is placed inside rhino file is not clear if you don't know it. For example if you use the 'replace block' command for a rhino block instance, it exchanges this one block with another instance. So I thought if I change the corresponding MXS (in the object tab of that one object which I supposed was only changing that one object). I supposed the MXS reference would work somehow similar to a block instance, because it is shown as one when you select it.
So, for example, I was first looking in the block manager to replace all MXS references at once - which is not possible there. On the other hand, I did copy some MXS references (trees) and wanted to replace just one of them with a different type of tree, which I did in the object tab of those MXS and it replaced all trees.
JDHill wrote:At export, when we encounter a block instance (which we don't, if we have disabled exporting instances) whose definition refers to an MXS file, we create an MXS reference in the MXS we're exporting. This reference must be loaded into Maxwell in order to render it. However, if we later encounter another instance of that block definition, we don't want to create another MXS reference, we want to create an (a Maxwell) instance of the previously-written MXS reference, so that we don't end up loading GBs of MXS files, since that would basically defeat the purpose.
As such, what you are requesting is possible, but it is not trivial, requiring that a separate pass be made through the whole model.
My intention was not to complicate the process.
Since I don't understand the process behind, my request is coming from my workflow oriented thinking.
As shown in this thread http://maxwellrender.com/forum/viewtopi ... 97&t=41018 instances can slow down a rendering heavily. So I try to avoid them if not neccesary. But on the other hand I would still like to use MXS references for referencing external object. I rarely use several instances of a MXS reference but just one for exmple for each building in a large scene. Mostly because rhino gets really slow with a lot of geometry ...
Sketchup 2024 Released

I would like to add my voice to this annual reques[…]