Notifications
Clear all

[Closed] Material ID / Object ID randomizer?

also it will be better to go though renderable objects only. for other objects rendering doesn’t make any sense.

Holy moly…

thanks mate – works perfect.

One thing i have recognized is that although
we have now unique ObjIds
that some object got the same color
when rendering the objId render elements.

Seems that it does support only a few colors…

Thanks for dropping in Denis!

cheers NAIK

EffectsChannelSet
Script for management ID of materials and the objects, and also for the assign wirecolor of objects.
Also automated creation MultiMatteElement in Render Elements. (Vray only)
Update – Adds ability for randomize the material-id for selected objects.
EffectsChannel v1.3
-Adds ability for assign id for user choosen slot in Material Editor
-Adds ability for assign id Only for submaterials
-Adds ability for assign id Only for root materials
-Adds ability for assign id for All levels material
-Fixes issues with VrayMtlWrapper & Vray2SidedMtl

EffectsChannelSet included in TrackScripts pack
Download page

awesome script mate…

I use Mental Ray but the other functions are really good!

Thanks for the link.

I really appreciate it.

cheers

NAIK

what about these ?


     Node Common Properties, Operators, and Methods
   [b][b]
   getRenderID[/b][/b] <node>[i]
 Returns  the RenderID of the node. A value of 65535 is returned if the scene has not yet  been rendered, or the node is not renderable. The RenderIDs of the nodes are  output to the NODE_RENDER_ID g-buffer channel by the renderer.[/i]
   
   [b][b]setRenderID[/b][/b] <node>  <integer>[i]
 Sets the  RenderID of the node to the specified value. This value is not "sticky" - it is  not saved with the scene, and it will be replaced by the renderer when the next  render occurs.[/i]
   
 

[left]

EDIT

i found in MXS Help something that could be usefull :


<void>[b][b]maxOps.[/b][/b][b][b]colorById[/b][/b] <DWORD>id  <&color>color[b][b]
[i]color[/i][/b][/b][i] is Out parameter
Returns a specific  color for each unique ID passed. The result is written to the Out parameter by  reference. This method is used internally to generate colors representing  Material and Object IDs in the respective RenderElements. Available in  [b][b]3ds  Max 8 and higher[/b][/b].[/i]

for i = 0 to 9 do
(
   maxops.colorById i &theColor
  format "ID:% Color:%
" i theColor
)


         

[/left]

I added support for MatteRenderElement creation (Mental Ray RenderElement)

Hey guys sorry for the ultra late answer.

Track thanks for the new support.

Its very strange mate, but i seems that your script
is not able to distribute unique Object IDs to several
object.

Just create 10 sphere and select your script while pressing shift
for random distribution.

You can see that not every sphere is getting an unique Object ID.

Am i missing something??

cheers

NAIK

1 Reply
(@track)
Joined: 11 months ago

Posts: 0

Hello Naik.
For solution In “Object Id Randomise” rollout set the “Start Id”=0 and “End Id”=50.
Press “Assign” button.
The difference between the start and end must be greater than the number of objects.

Sorry mate,

its not working for me.

Just create 10 spheres and run your script.
If i set the start to “0” and the end to “30”
i get doulbe distribution…

cheers

NAIK

You can set biggest difference or
download TrackScriptsPack with new version of EffectsChannel
http://3d-kstudio.com/scripts/

Page 2 / 2