Scripting Challenge .... Any takers ?

Next
 From:  TpwUK
5394.1 
Hi everyone, here's a challenge for the script puppies amongst you....

A script that works with the export option, that will go down the "Styles" listing selecting each object as it goes along, the selected object is then zoomed into and that object to offer mesh settings before exporting, after each object has been exported, the then selected object to be hidden away, and the next object in the styles list is then selected and the process keeps cycling until the whole list has been exported. Once all objects have been exported, then all of them should be un-hidden and the model as a whole selected and zoomed to extents.

It's a real world need for some of us who may have to handle large models with hundreds of parts to them, doing this export thing selecting one item at a time for exporting to try and prevent memory expiration issues is a time consuming job, an option to set all exported elements to the same mesh settings would be a bonus and would remove the need to keep popping up the mesh options dialog!!

Is it a do-able project ?

All the best guys, dolls etc :¬)

Martin
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5394.2 In reply to 5394.1 
Hi Martin, if you're running out of memory during exporting a large project, see these tips here on how to reduce overall memory consumption:
http://moi3d.com/forum/index.php?webtag=MOI&msg=5322.2


If after making a coarser display mesh and turning off multi-threading for the export you're still running out of memory you can then do some selection and partial scene exports at that point, and probably just selecting half of your model and exporting it will lighten the load enough to do the export, then invert the selection and export the rest. Just doing a window select of roughly half the objects is a lot more simple than trying to export each object individually.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  TpwUK
5394.3 In reply to 5394.2 
Hi Michael - It's not my machine that's short of ram, its MoI running out of its working memory, reducing the mesh angle does help with the Moi display, but when having to export to a rendering package that does not do subd smoothing, you can still chew the memory away when preparing the export mesh. Having to back track and lower export settings can be tedious when there are a lot of entities/objects.

Grabbing a quarter of a model or half of it, can help yes, but when you need to use different mesh angles for different objects, you then run into the need of an automated process, especially if you are working on something that's not your own work, and you have no idea what a ms301-b is. I guess it's because I don't have all day to sit there picking objects, exporting them and then hiding them away whilst still trying to look after someone else i could do with an automated type of process that would drastically reduce the amount of time needed, a letter box would still look just as good with 16 polys as it would with 5,000 but the same cant be said for the door handle. Having to select from the styles or named objects, then having to zoom then click on file, export, select type, then set parameters then ok it, then click hide and go back and do it all over again for the next object and blah blah blah

Surely a batch export is not of use just to me .... If i had more time, I would attempt the scripting myself, but alas I do not. Again it's not a deadly important feature for me to have, but boy would it be nice and handy.

Martin
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5394.4 In reply to 5394.3 
Hi Martin, the tips that I linked to are not about reducing the export mesh density, they are for reducing the in-viewport display mesh density that is used just to display your objects inside of MoI before you have even done the export.

By default the density for display meshes is a fairly dense setting, if you adjust it as described in the link above that will make for a rougher viewport display but that will also consume less memory overall for MoI and so that can help avoid Moi running out of 32-bit address space when you want to export.


> Having to back track and lower export settings can be tedious when there are a lot of entities/objects.

Again, what I wrote before is about adjusting MoI's display settings to help conserve memory, it doesn't have anything to do with lowering export settings.


Have you tried making the adjustments as described above? Again the link is:
http://moi3d.com/forum/index.php?webtag=MOI&msg=5322.2

Please try those tips first to see if that trims enough memory consumption so that you can do your export properly or not.


> I guess it's because I don't have all day to sit there picking objects, exporting them and then hiding them away

Selecting just half the objects only takes a couple of seconds, not all day.

From your last reply it sounds like you did not apply any of the advice that I wrote about at all, please try doing all of those tips which involve adjusting a few settings that you will not have to mess with anymore after that and only doing one single selection trick of selecting half your objects at export time.

After doing those things, do you still run out of memory with the file where you were seeing that problem in, or do those tips make that work ok?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  TpwUK
5394.5 In reply to 5394.4 
Hi Micahel, if you remember you gave me the tip about mesh angle for the MoI display when I was doing the Lamborghini model, and yes it works well with speeding up the interface and for reducing memory consumption. What I have at the moment is a 290MB car model - Saving it from Moi reduced it by 60MB (rhino render meshes stripped out i assume), but the wheels are very high definition as are other areas of the model, but since the model is by a Brazilian chap, its layers/styles are all in Spanish/Latin American so I have no idea what the styles relate to as an object, trying to export the model is a pain and i have given up for now because of the time or lack of it that I have at my disposal, however it spawned another brain storm for reducing the amount of mouse clicks i have to do to get a part exported, and having to name each file for each export etc, I just thought, hmmm a batch export script would do just nicely about now. I am not complaining or moaning about MoI, it's just this model has something like 150 layers, and rather than guessing and trying to translate the object to what i think it is, i thought ahh copy the style name for the export file name and on and on it went - tedious as hell - lol

Martin
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5394.6 In reply to 5394.5 
Hi Martin, sorry I still don't understand if you have followed _all_ of that previous advice or not.

Again, the details on what to do are here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=4643.2


Did you Set Options > View > Mesh angle to a rough angle like 25 degrees and uncheck "Add detail to inflections".

Did you set [Mesh Export] ThreadLimit=1 in moi.ini ?

After doing those do you still run out of memory when doing the export where you were seeing running-out-of-memory problems?


If you are still seeing a problem at that point, what happens if you just select only roughly half of the model - you mention stuff about various styles, etc... - I'm not talking about selecting anything by styles, just simply drag a selection rectangle around roughly half the screen to approximately grab half of the objects and then export that.


When you do these steps, do you still run out of memory or does it export ok after doing these steps?


The first steps about setting the different options you only have to do one time.

The second step about doing a window select of roughly half your model takes only a couple of seconds to do and does not require elaborate scripts or reading through style lists or anything like that.


Please check if these steps solve the problem for you or not - there is no point on trying to cook up a fancy script to solve the problem if you can already solve it with these easy methods.


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  TpwUK
5394.7 In reply to 5394.6 
Hi Michael -I am sorry i don't seem to be able to get my problem across very well. Sorting the memory issue has been resolved, that was never too much of a problem, the problem is not really that much of a problem, like i said in the first post, it's not that deadly a requirement, just something for someone to play with - should they want to do it. Hi definition models, as you know result in high density poly meshes - when you have a load of foreign language that you cant translate, then you are left with select the style name, zoom in and see if it gives you a clue as to what it is, then export that part giving it a reasonable mesh density for your needs. Now if i don't do that, and if i spew the objects out ad hoc through the exporter by grabbing half of the model, i am going to end up with a 500MB plus IGES file or I am going to have wheels that look like a UK 50p piece hence the need to select from the style list. Selecting each object and setting mesh density is the only way i know of how to keep control of the final poly count, like i have said before there are many items that will look good with a low mesh density and others that won't. As time is of a premium to me, because of my other responsibilities, this task could be massively reduced by removing all the to-ing and fro-ing that this task involves.

As a hobbyist modeller and render freak, I sometimes want to render somebody else's work, just for fun or because i can get better results than them and they ask, but you look at the model, and imagine render camera angles, lighting etc for close-ups on details and the like, so you do mesh density according to how close you intend to go, and lesser density to parts that don't need it or that are not going to be seen at all, the under belly of a car for example that has no detailing provided don't need many polys.

Does this explain things any better ?

Martin
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
5394.8 In reply to 5394.7 
Hi Martin, ok thanks for the additional explanation!

I had thought previously that the problem involved running out of memory, because you wrote in the first message:

quote:
doing this export thing selecting one item at a time for exporting to try and prevent memory expiration issues is a time consuming job


So that's what all my replies were focused on...

But now it sounds like you're not actually worried about what you wrote there initially, if I understand you correctly now?

Sorry that I got focused on the wrong part of what you were asking about!

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All