Community
3ds Max Shading, Lighting and Rendering
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Render Elements not updating paths

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
MkbartA9
708 Views, 3 Replies

Render Elements not updating paths

Hi,

 

I'm using Max 2024.1 and Corona 10 Hotfix 1. 

 

The issue that has been present for many years now - Render Elements paths are very often not updated after the main Render Output file is changed. Sometimes the elements don't even appear in Asset Tracking. This causes many problems especially with animations, using services like Pulze and Rebus. 

Unlike VRay, Corona doesn't handle saving its elements, instead relies on a 3ds system which is STILL buggy.

 

I have multiple elements with masks, lightmix, etc. setup, so I can't afford to simply remove and add them again. Is there any other way of fixing this?

3 REPLIES 3
Message 2 of 4
darawork
in reply to: MkbartA9

Hi,

 

There is a list of Maxscript relating to Corona here: https://wiki.corona-renderer.com/maxscript

I have used some of this to create Corona Render Elements, Clear existing paths etc...
You might be able to create something similar so as to not rely on 3DSMax updating the paths for you.

Here is the code I found/edited to create a list of new Elements:

 

(
	-- set a list of render elements.
	elementlist = #(CESSENTIAL_Reflect, CESSENTIAL_Refract, CESSENTIAL_Translucency, CMasking_ID, CShading_Albedo, CShading_Alpha, CShading_Lightmix, CShading_Lightselect, CShading_Shadows, CMasking_WireColor, CTexmap)
	 
	re = maxOps.GetCurRenderElementMgr() -- get the current render element manager
	re.removeallrenderelements() -- remove all renderelements
	re.numrenderelements() -- get number of render elements
	 
	theManager = maxOps.GetRenderElementMgr #Production
	theManager.numrenderelements()
	rendoutputfilename = "c:\\test.tif"
	-- adds all renderelements to be rendered.
	for n in elementlist do
	(
	re.addrenderelement (n elementname:("Dara_" + (n as string)))
	format "\nAdded % renderelement" n
	)
	rendsavefile = true
	setsilentmode true -- used to avoid error message when checking the filename of element
	renderSceneDialog.open() -- open Render Dialog -- get all render elements set and return name of render element and output filename
	for n = 0 to (theManager.numrenderelements () - 1) do
	(
	el = re.getrenderelement n
	format "\nGetting % render element" el.elementname
	format "\nRender element outputfilename: %" (re.GetRenderElementFileName n)
	)
)

 


Here is the code to clear existing paths:

 

re = maxOps.GetCurRenderElementMgr()
for i = 0 to re.NumRenderElements()  do re.SetRenderElementFilename i ""

 

 

I have these set up as custom buttons in Max now.


If you get stuck, maybe ask over in the 3DSMax Programming Forum, or the Corona Max forum. Hope fully you should be able to come up with some sort of workaround.

Regards,

Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760

Message 3 of 4
MkbartA9
in reply to: darawork

Thank you. I will definitely try this. However, clearly, this is a workaround for an existing bug - what would be the best way to report this as one?

Best,
Message 4 of 4
darawork
in reply to: MkbartA9

Hi, 

To report a bug: help menu -> submit feedback

 

Regards, 

Darawork
AutoDesk User
Windows 10/11, 3DS Max 2022/24, Revit 2022, AutoCad 2024, Dell Precision 5810/20, ASUS DIY, nVidia Quadro P5000/RTX 5000/GTX760

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report