Chaos Corona Forum
Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: ce89 on 2015-03-03, 22:32:17
-
How do I gain access to the properties of certain render elements via maxscript. I would like to write a script that adds the render element "CShading_RawComponent" but sets it's component to use "Reflect" instead of the default "Diffuse".
Can anyone point me in the write direction. Is there a maxscript function that can expose all the properties of all the corona elements?
Also I tried to login to the "https://corona-renderer.com/wiki" but it seems like a different login and i cant see where i can actually register?
Thanks.
-
its properties can be accessed via maxscript (but I dont know how exactly, there is probably some global variable for it).
There is no need to log in the wiki, you can read everything there is without logging in.
-
You can simply type;
show (CShading_RawComponent())
This will print out all properties in the listener
To print out all REs you can use this:
(
REs = stringstream ""
apropos "*ESSENTIAL*" to:REs
apropos "*CGeometry*" to:REs
apropos "*CMasking*" to:REs
apropos "*CShading*" to:REs
apropos "CTexmap" to:REs
elems = filterstring (REs as string) "\n"
classnames = for i in elems collect (filterstring i " ")[1]
for i in classnames do(
format "----------------------\n"
format (i + "\n")
show (execute (i + "()"))
)
)
-
DeadClown,
Many thanks, Much appreciated.
-
Sorry for bombing this topic, i have a small question that's not worth new topic creation.
I want to make a button that simply creates Corona Sun and Sky. With the help of macrorecorder i managed to achieve Sun object's creation, but Sky isn't catched by macrorecorder unfortunatelly. Should someone kindly provide script code for that, i'd be very thankful.
-
parameters to taste
macroscript Corona_Sun_and_Sky category:"corona" tooltip:"Create Sun&Sky" (
coronasun isstandalone:true
environmentmap = coronasky name:"CoronaEnvSky"
)
-
Thanks a lot!
If i'm not asking too much, is it possible to add sky to Corona's enviroment and to set global exposure to -4.0.
-
Thanks a lot!
If i'm not asking too much, is it possible to add sky to Corona's enviroment and to set global exposure to -4.0.
here...
environmentMap = coronasky()
renderers.current.colorMap_simpleExposure = -4
-
Thank you. Actually i want to add CoronaSky to Corona enviroment. I execute this code:
renderers.current.bg_texmapUseMain = on
renderers.current.bg_texmap = coronasky name:"EnvMap"
and it creates Sky map, but do not changes enviroment from max's to Corona's. What i'm doing wrong?
-
Thank you. Actually i want to add CoronaSky to Corona enviroment. I execute this code:
renderers.current.bg_texmapUseMain = on
renderers.current.bg_texmap = coronasky name:"EnvMap"
and it creates Sky map, but do not changes enviroment from max's to Corona's. What i'm doing wrong?
you miss one line of code...
renderers.current.bg_texmapUseMain = on
renderers.current.bg_texmap = coronasky name:"EnvMap"
renderers.current.bg_source = 1
-
That's it! Thank you very much!
-
I dont know anything about coding these Scripts, could you save´n´share a script-file containing
the automatic load for Corona Sky, enviroment and why not that EV -4 also :)
-
Neither do i, but everything you need is in this topic. Just collect all lines of code into one file and you should be fine :]
Alternatively you can drag&drop attached file to max's viewport and make a button via customize user interface.
-
That's it! Thank you very much!
glad to be of help...
-
Again like above i'm not sure if it's worth starting another thread, also keeps a number of maxscript questions together.
Just a quick one really. Is there a function for starting interactive rendering? I would like to create my own dialogue and this is a function I would like to add.
Many thanks
-
CoronaRenderer.CoronaFp.startInteractive()
-
Thanks Headoff, much appreciated!