Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I get a completely randome object ID from stand-ins instance?

13 REPLIES 13
Reply
Message 1 of 14
tearcandy
1416 Views, 13 Replies

How can I get a completely randome object ID from stand-ins instance?

1. Prepare object to bake to ass.

2. Bake ass and then plug into its path to the already created dummy sphere's Path Attrib which switched the Arnold Translator one. (polymesh to procedural)

3. Paint dummy sphere using MASH Placer node onto base plane.

4. Rendering with Arnold and check the object ID at the debug shading mode.

5. And here we get object ID from the instance stand-ins.

128-figure05.jpg

6. Why can't I getting object ID like this? (It is not procedural mode. Just polymesh mode.)

129-figure06.jpg

Tags (1)
Labels (1)
  • ass
13 REPLIES 13
Message 2 of 14
Stephen.Blair
in reply to: tearcandy

The id is a parameter of the object. If you're instance that object, every instance of the object has the same id.



// Stephen Blair
// Arnold Renderer Support
Message 3 of 14
alanfish
in reply to: tearcandy

Hi, @Sum-Hui Lee

May I know what the Geometry Type of your MASH is?

If you are using Instancer type, you can have a try the aiColorJitter.

Remember to specify the range of hue, saturation, and gain (HSV) for the random colors under "Procedural".

Cheers~

Alan

130-xxdxt.png
Message 4 of 14
tearcandy
in reply to: tearcandy

Hi, @Alan Lam

Thank you for reply but, I'm using Arnold 4 and instance mode with MASH.(not repo mesh)

I have alJitterColor instead but it is not contains "Procedural" Attrib.

Take care

ssseom

Message 5 of 14
donovanSWXK6
in reply to: tearcandy

This is the same problem I am trying to solve. I would like to use the power of the Mash Instance with the aiStandIn to make the leanest scene possible, but I need to override the ID's of object created to apply the aiJitter. Every combo I have looked at, seems to rely on the ID being created up-front. Any solutions out there?

Message 6 of 14
joie
in reply to: tearcandy

Any solution then?

The non caching of instances doesn't seem to work

Message 7 of 14

Bumping this topic since I got a lot of trees to render. The tree leaves have their own shader and variation can be done using aiColorJitter but only if Auto Instancing is turned off. I understand the problem but is there a solution to it using Auto Instancing?

Message 8 of 14

Is there any solution to this? I have a lot of trees to render and color variation on auto instanced procedurals would be great.

Message 9 of 14

Maybe an operator to set a random user data int ?



// Stephen Blair
// Arnold Renderer Support
Message 10 of 14

Tried to do this but failed miserably. Is there an example scene anywhere I can start from? Thanks!

Message 11 of 14

yeah, the operator didn't work

I had to put user data (mtoa_constant attributed) on the aiStandins in Maya, that was the only way I got it to work



// Stephen Blair
// Arnold Renderer Support
Message 12 of 14
madsd
in reply to: matthias.richter

Random IDs works fine on a bunch of spheres saved out as an .ass file, here.
I use 3DS MAX, maybe your plugin version is bugged.


I dont have any difference whether auto instance is on or off, I assign the shader after I load the .ass file, I dont bring in a shader.

Message 13 of 14
matthias.richter
in reply to: madsd

I use the latest MtoA 4.2.2 and I already got it to work using simple Maya instances.

Since it's trees there are different shaders involved that are already in the .ass file that are assigned per component. I'll try Stephen's solution first and in case I don't succeed I'll try yours.

Thanks

Message 14 of 14

Thanks. That worked. I put an aiUserDataInt to the aiJitter.dataInput, named the attribute jitterID and added the attribute as mtoa_constant_jitterID to the standins. put it some random numbers et voila, every standin instance has its unique color.

Thanks!

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

Post to forums  

Autodesk Design & Make Report