Chaos Scatter > [Scatter] I need help!

Convert to Max Geometry Multiple Scatters

<< < (3/4) > >>

CharlyRT:

--- Quote from: Frood on 2024-02-06, 11:21:04 ---
Here is another (ugly) one for you: select the scatter objects you want to convert and then run this snippet, I hope it works for you:


--- Code: ---(
AInterface =  (dotNetClass "Autodesk.Max.GlobalInterface").Instance
cPanel= (windows.getHWndData (AInterface.UtilGetCoreInterface16()).CommandPanelRollup.Hwnd)[7]
max modify mode
sObjects=for o in selection where (classof o==ChaosScatter) collect o
for o in sObjects do (
format "Processing '%'\n" o.name
select o
ConvertButton=windows.getChildHWND cPanel "Convert to Max geometry"
windows.sendMessage ConvertButton[1] 0x201 0 0
windows.sendMessage ConvertButton[1] 0x202 0 0
-- optional, deletes the scatter object after creating meshes:
-- delete o
)
)

--- End code ---

Good Luck

--- End quote ---

Ohhhhh myyyyyy Goooooood
Thank u so much Frood!!!!
This worked beautifully
Of course it took a little while converting 240 objects, but man it didnt matter, Preferable to wait 2 min instead of 1 full day doing this manually.

CharlyRT:

--- Quote from: Aram Avetisyan on 2024-02-05, 10:20:20 ---The question was not coming out from curiosity, but from trying to understand what you are after, and trying to be helpful.

--- End quote ---

I dont know why its so difficult to understand "I need to convert multiple scatters into mesh", but ok


--- Quote from: Aram Avetisyan on 2024-02-05, 10:20:20 ---Converting Scatter geometry to Max, even for one scatter object, can be very taxing for the scene - even if the instanced mesh can be simple, creating a large number of objects in the scene, which the conversion does, will most probably lead to scene freeze. I am not talking about hundreds of scatters. This will surely be the same for ForestPack conversion (if it does not attach all the scattered geometry into one object).

--- End quote ---

You are assuming that because of this, we dont need to convert scatters on mesh? Of course that we would consider that this will provoque frezzes or even crashes, but I wouldnt mind if this works in the end, ForestPack takes some cautions to this, placing new objects on new layer and displays as box or even hiding them, but it can be done.


--- Quote from: Aram Avetisyan on 2024-02-05, 10:20:20 ---Unfortunately there is not way to do this in batch. I was trying to create a batch script for you with maxscript for this, but seems there is no way to do it.
This will be registered as a feature request, but this is not something that is regularly done, I believe.
If having the geometry "on place" was the end goal (given the screenshots, I think these are linear scatters), maybe other ways of modeling could be beneficial, e.g. the array modifier (which has solid scattering options too), which would later be easily converted into mesh.

I don't see any other option than to convert them one by one, I am afraid.

--- End quote ---

Thank u to take your time to try this, fortunately Frood achieve this beautifuly, here are some suggestions from Corona Developers.

Use the script that Frood wrote, test it, make it your own if you will and create a button on the toolbar, put some advice that will provoque frezzes or crashes or whatever. But please add it!!!

Here is the ressult, there were 240 scatters, it didnt took too much time to convert them and it didnt frezzes or crashes.

Aram Avetisyan:
I am very happy that Frood's script help you a lot. He cracks it when it seems un-doable.

Please understand that all the communication and questions are for trying to be helpful to the users.

On the other note: Where the objects created by having 240 separate splines and 240 separate scatters? Wouldn't it be easier to attach all the splines and have 1 spline, and just 1 scatter? From the attached screenshots, I think that would very well work and there would have not been a need to convert so many scatters.

For the other requests - yes, we are aware of them, and it would be great to have proper host application language (maxcript) support for all the tools. This relates to the development process and everything is thoroughly considered and prioritize, to meet the release cycles too. Important part of this is what has been requested by many users and what would bring the biggest impact for as many Corona users as possible.

Frood:
Hi,


--- Quote from: RTstudio on 2024-02-07, 00:05:34 ---Use the script that Frood wrote, test it, make it your own if you will and create a button on the toolbar

--- End quote ---

You can do that by your own if you like (just put the code into a macroscript). But that way of "programming" is not the way to go at all, even if it works. What is does, is simply "emulate" being a user who selects the scatters and clicks that "convert" button. If the Corona team would decide to rename the button, it would not work any more. This is all crap, we need a proper maxscript interface for doing it correctly. But in this case (scatter object), that option would perfectly fit into the Corona listener. No need for any additional button, and it would process the scatters way faster.


--- Quote from: Aram Avetisyan on 2024-02-07, 08:28:21 ---For the other requests - yes, we are aware of them, and it would be great to have proper host application language (maxcript) support for all the tools.

--- End quote ---

My point is, that nothing should be developed without initially(!) having in mind to publish important features to maxscript - and doing so :)


Good Luck



CharlyRT:

--- Quote from: Frood on 2024-02-07, 08:56:21 ---Hi

You can do that by your own if you like (just put the code into a macroscript). But that way of "programming" is not the way to go at all, even if it works. What is does, is simply "emulate" being a user who selects the scatters and clicks that "convert" button. If the Corona team would decide to rename the button, it would not work any more. This is all crap, we need a proper maxscript interface for doing it correctly. But in this case (scatter object), that option would perfectly fit into the Corona listener. No need for any additional button, and it would process the scatters way faster.


--- End quote ---

I know, I already did that, but not many people will read this post, it will be really useful if they decide to take a look into it and improve it like you said, I hope that Corona Team take notice of this kind of details in the future.

Thanks again for your script, I dont care if it works slow and its not the way to go but it just helps the porpuse that I had in mind.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version