Chaos Corona Forum
Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: SRY on 2023-06-18, 07:45:58
-
cs = ChaosScatter()
cs.targetNodes = #(poolface) ---one plane
cs.modelNodes = #(ball01,ball02) ---two spheres
Cannot be displayed in max scene,and I can't find them in the Modify panel. But adding it manually is normal,
Am I overlooking something?
-
Hi, see:
https://forum.corona-renderer.com/index.php?topic=31583.msg189987#msg189987
Good luck
-
my corona version is 9.0,so it's properties are changed.The following code is not valid:
ScatteredObj= sphere radius: 1 position:[0,0,0] --ScatteredObj
b = plane length: 100 width:100 pos: [150,150,0] --distrib object
--SCATTER CREATION
Cscatter isselected: on iconsize: 50 pos: ScatteredObj.pos
--APPENDING
append $.distributionobjects b
append $.distributionobjectsdensity 1.0
append $.scatteredobjects ScatteredObj
append $.scatteredObjectsFrequency 1.0
max zoomext sel -- zooms scatter
now,they are "targetNodes" and "modelNodes", I'd like an expert to explain.
-
Hi, yes, property names may have changed meanwhile, will check tomorrow.
Good luck
-
Hi,
yes properties changed as well as the class name. Your script would look like this now (ChaosScatter v2.4):
ScatteredObj= sphere radius: 1 position:[0,0,0] --ScatteredObj
b = plane length: 100 width:100 pos: [150,150,0] --distrib objectp
ChaosScatter isselected:on iconsize: 50 pos: ScatteredObj.pos
--APPENDING
append $.targetFactors 1
append $.targetNodes b
append $.modelfrequencies 1
append $.modelNodes ScatteredObj
If you want to see all properties of a class, use 'showclass "<classname>*.*"', so for ChaosScatter: 'showclass "ChaosScatter*.*"'.
Good Luck
-
I succeeded, but there was one small problem, the scatter is not moved, Is that so ?
-
I create the scatter with maxscript, It cannot be modified again,Why?
-
Hi,
I succeeded, but there was one small problem, the scatter is not moved, Is that so ?
it is created where you requested it: at the position of "ScatteredObj", [0,0,0] that is. If you want the ScatterObject/Icon placed at the "pool"/b-plane, then you have to use instead:
ChaosScatter isselected:on iconsize: 50 pos: b.pos
I create the scatter with maxscript, It cannot be modified again,Why?
It can for sure, but your script does not save a reference to the ScatterObject for later use. You should store a reference into a variable (MyScatter=ChaosScatter isselected:on iconsize: 50 pos:b.pos) and change the variables properties instead of using the current selection:
ScatteredObj= sphere radius: 1 position:[0,0,0] --ScatteredObj
b = plane length: 100 width:100 pos: [150,150,0] --distrib objectp
MyScatter=ChaosScatter isselected:on iconsize: 50 pos: b.pos
--APPENDING
append MyScatter.targetFactors 1
append MyScatter.targetNodes b
append MyScatter.modelfrequencies 1
append MyScatter.modelNodes ScatteredObj
You can now change the properties of 'MyScatter' every time later on. Alternatively you can access the ChaosScatter object by name. These are very basic script topics (https://help.autodesk.com/view/MAXDEV/2023/ENU/?guid=GUID-4C14F474-CD23-4001-93DF-0F0F9A6025C7) though.
Good Luck
-
I mean I choose it in the max scene,and trying to change some parameters ,doesn't work.Although I also kept the reference, I sometimes fine-tuned it in the scene,no way to change it.
-
Works for me, no issues changing frequencies or adding/removing items. Can you attach the scene?
Good Luck