Notifications
Clear all

[Closed] Changing creation/rendering/sorting order

I’m doing lots of work with my realtime shaders in Max, and I’m having issues with alpha sorting. I know what you make in max first renders first, and if you have a multi-sub material, early materials on that object render before later materials. I was hoping/thinking there’d perhaps be a way to access or change this property on a node (like having a ‘send to back, send to front, move backwards, move forwards’ tool), so that I could change this myself.

In the likely case this is impossible, any other ideas? I’ve thought of copying all objects in selection to an array, and then deleting the originals, and then replacing with the copies… may try this if I can’t get anything else to work.

3 Replies

I’ve not seen any controls for dealing with the internal ordering… The copy and delete does work however… This inverts the order of all the objects in the $objects array.


(
local totObjs = Objects.count
for i = totObjs to 1 by -1 do
	(
	maxops.cloneNodes Objects[i] newNodes:tn
	Objects[Objects.count].name = Objects[i].name
	delete Objects[i]
	)
)

I’m sure a more controlled version of this would get you what you’re looking for… maybe load the names into a listview, allow user reordering, and use the the list from the control for the copy order… delete the originals…

Good luck

1 Reply
(@bobo)
Joined: 11 months ago

Posts: 0

This is really a brute force approach. Much easier (and documented in the MAXScript Reference – See “How To … Sort TrackView Alphabetically”) is to parent the object to a dummy and unlink it immediately (or link back to its original parent) – this will move it to the end of the object database, or to the end of the childrens list of the respective original parent.

Sorry for the delay, was at GDC… I will use those ideas and see if I can figure something out and post what I come up with here, thanks!