PDA

View Full Version : Changing creation/rendering/sorting order


RobGalanakis
02-16-2008, 02:20 PM
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.

Kramsurfer
02-20-2008, 10:27 PM
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

RobGalanakis
02-24-2008, 03:24 AM
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!

Bobo
02-24-2008, 03:46 AM
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.


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.

CGTalk Moderation
02-24-2008, 03:46 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.