Random instances transformation

Forums: Random instances transformation
Rhino 3D (Export script developed by SamPage; Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

Random instances transformation

Postby roy_orengo » Thu Apr 02, 2020 9:04 am

roy_orengo Thu Apr 02, 2020 9:04 am
Hello,
I'm using blocks instances with Random textures colour inside the material. So I can see different colours for each block instance. Now I would like to know if there is some way to transform randomly the position of the texture too. Or some other way to make others change between the instances appearance from a single material applied to all.
Thanks, Roy
roy_orengo
Licensed Customer
Licensed Customer
 
Posts: 65
Joined: Tue Nov 06, 2018 9:06 am

Re: Random instances transformation

Postby face_off » Thu Apr 02, 2020 10:59 am

face_off Thu Apr 02, 2020 10:59 am
Hi Roy

A block instance will assign an "Instance Id" for each instance of the block. So you can use the Instance Range node to set the color for each instance.

Paul
Attachments
rhino instance.png
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15483
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: Random instances transformation

Postby roy_orengo » Thu Apr 02, 2020 9:50 pm

roy_orengo Thu Apr 02, 2020 9:50 pm
Hi Paul,
thank you for you message. It seems to me similar to random colours or I'm wrong? It could be possible in some way to randomize the UV position of each instance?
Roy
roy_orengo
Licensed Customer
Licensed Customer
 
Posts: 65
Joined: Tue Nov 06, 2018 9:06 am

Re: Random instances transformation

Postby face_off » Fri Apr 03, 2020 5:29 am

face_off Fri Apr 03, 2020 5:29 am
roy_orengo wrote:Hi Paul,
thank you for you message. It seems to me similar to random colours or I'm wrong? It could be possible in some way to randomize the UV position of each instance?
Roy
I don't you could do this via Octane. Instead you would need to convert the instances to individual meshes, and re-UV those meshes in Rhino.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15483
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: Random instances transformation

Postby roy_orengo » Fri Apr 03, 2020 7:46 am

roy_orengo Fri Apr 03, 2020 7:46 am
Ok Paul, thank you.
Another question, please.
In this image, all the objects have the same material (with random colour texture applied). The cubes are instances so they show correctly the different colours.
The planks are not blocks, only some copy of the same object, so they are different Polysurfaces in Rhino. There is some way to apply to that planks too one single material with variations as the instances doing? I mean, each single planks have their ID, why they don't show the random colours?
Roy
Attachments
random colors no instances.png
roy_orengo
Licensed Customer
Licensed Customer
 
Posts: 65
Joined: Tue Nov 06, 2018 9:06 am

Re: Random instances transformation

Postby face_off » Fri Apr 10, 2020 11:10 am

face_off Fri Apr 10, 2020 11:10 am
roy_orengo wrote:Ok Paul, thank you.
Another question, please.
In this image, all the objects have the same material (with random colour texture applied). The cubes are instances so they show correctly the different colours.
The planks are not blocks, only some copy of the same object, so they are different Polysurfaces in Rhino. There is some way to apply to that planks too one single material with variations as the instances doing? I mean, each single planks have their ID, why they don't show the random colours?
Roy
Hi Roy - as the planks are not instances, they will not have an ID - so therefore the random color texture will not work. You could randomize them with a texturemap that is applied in world space with a Projection mapping such as Box (in practice you would probably use this as an input to a Mix Texture to mix things up).

Paul
Attachments
box projection.png
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15483
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: Random instances transformation

Postby roy_orengo » Fri Apr 10, 2020 5:46 pm

roy_orengo Fri Apr 10, 2020 5:46 pm
Hi Paul,
thanks for your message.
Nice idea, but this is not exactly what I'm trying to do...
I send you a link to the general forum where I'm talking with Beppe Gullotta to try to use his wonderful OSL...
Do you have any suggestion?
Thanks,
Roy

viewtopic.php?f=9&t=74294
roy_orengo
Licensed Customer
Licensed Customer
 
Posts: 65
Joined: Tue Nov 06, 2018 9:06 am

Re: Random instances transformation

Postby face_off » Sat Apr 11, 2020 11:54 am

face_off Sat Apr 11, 2020 11:54 am
roy_orengo wrote:Hi Paul,
thanks for your message.
Nice idea, but this is not exactly what I'm trying to do...
I send you a link to the general forum where I'm talking with Beppe Gullotta to try to use his wonderful OSL...
Do you have any suggestion?
Thanks,
Roy

viewtopic.php?f=9&t=74294

To use the OSL texture, you would need to change the OctaneMaterial type the NodeGraph. Then edit the node graph to edit the material as you would in Octane Standalone.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15483
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: Random instances transformation

Postby roy_orengo » Sun Apr 12, 2020 4:05 am

roy_orengo Sun Apr 12, 2020 4:05 am
Hi Paul,
yes, this is working good now. The OSL works well if I have a block with instances, until now not with single different objects. But because in CInema 4d it works with singles objects too, I'm trying to use it in Rhino too, if possible. Thanks,
Roy
roy_orengo
Licensed Customer
Licensed Customer
 
Posts: 65
Joined: Tue Nov 06, 2018 9:06 am

Re: Random instances transformation

Postby face_off » Tue Apr 14, 2020 12:53 am

face_off Tue Apr 14, 2020 12:53 am
roy_orengo wrote:Hi Paul,
yes, this is working good now. The OSL works well if I have a block with instances, until now not with single different objects. But because in CInema 4d it works with singles objects too, I'm trying to use it in Rhino too, if possible. Thanks,
Roy

Hi Roy

If you are using different object in Rhino, you need to use World Coordinate Space rather than Local Space.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15483
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia
Next

Return to Rhinoceros 3D


Who is online

Users browsing this forum: No registered users and 22 guests

Fri Apr 26, 2024 4:16 pm [ UTC ]