Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: khazuma on 2024-11-28, 07:12:46

Title: Corona Multimap Script
Post by: khazuma on 2024-11-28, 07:12:46
When using “CoronaMultimap” with more than 26 maps, the node does not show the 26th map and the message “further color maps are accessible via maxscript” is displayed.
I can't find it on the official site. Does anyone know how I can adjust the map after the 26th map?
Title: Re: Corona Multimap Script
Post by: Frood on 2024-11-28, 08:46:52
Hi,

what do you mean by "adjust"? You can add a map to a slot in the material editor (up to 100), but you cannot change the parameters there. Maybe this helps:

Code: [Select]
-- get a reference to the map, assuming to find it in diffuse of the selected object and using a CoronaPhysicalMtl:
Multimap=$selection[1].Material.baseTexmap

-- show all properties:
show Multimap

-- Choose a slot:
indexToChange=14

-- list parameters of the slot:
format "Frequency: %\n" Multimap.frequency[indexToChange] as string
format "Texmap: %\n" (if Multimap.texmaps[indexToChange]==undefined then "-none-" else Multimap.texmaps[indexToChange].name)
format "Texmap on: %\n" Multimap.texmapsOn[indexToChange]
format "Color: %\n" Multimap.colors[indexToChange]
format "Texmap on: %\n" Multimap.texmapsOn[indexToChange]

--set frequency and color:
Multimap.frequency[indexToChange]=0.2
Multimap.colors[indexToChange]=color 128 64 64



Good Luck



Title: Re: Corona Multimap Script
Post by: khazuma on 2024-11-28, 09:20:58
Thank you for your reply.
Sorry, my problem is not the adjustment, but the fact that I want the 26th and later slots to appear in the “CoronaMultiMap” node.

Do you know how to do that?
Title: Re: Corona Multimap Script
Post by: Frood on 2024-11-28, 09:37:25
Hi,

as said, you can plug maps into the slots (up to 100) using SME. But they do not appear in the parameter editor, only in SME view. All parameters above slot 25 can only be changed by script (example above). It is not possible to change that behavior (questionable anyway) by script.


Good Luck



Title: Re: Corona Multimap Script
Post by: khazuma on 2024-12-02, 06:07:03
Sorry for the late reply, but it's done! Thank you.