Everything related to the integration for Rhinoceros.
User avatar
By Edwin C
Anyone know how to achieve bubbles in glass, ice or water ? I have made a solid shape with bubbles in the solid as you can see in the first image but when rendered it comes out without them. My hunch is that it is rendering the space in the bubble as if it is glass and therefore glass inside glass you see glass?? How do I make the bubbles negative space in the volume?
User avatar
By Jeremy D. Hill
Your instinct is correct -- to compute this properly the normals need to point in the proper directions, to describe where the glass is, and where it isn't. Which means the bubbles need to be part of the same mesh as the cube, with normals facing inward -- so you need to extract meshes from the bubbles, flip their normals, and then join them with a mesh extracted from the cube.
User avatar
By Nasok
That's right :)
Alternatively you can assign a different material to bubbles with different index of refraction and use a nested priority to define what is being cut-out from what.

for instance here, I have a glass, a liquid, an ice and a bubbles all done as a separate geometry and all have different materials with different properties (not just different index of refraction but also surface properties) and to define what is what when is looked through the transparent object - I used nested priority feature (pretty cool feature btw)

The way it works is that the lower the value of nested priority the more power over other objects this current object has.

For example in my case I've assigned nested priority of:
"0" to the glass and to the ice cubes (since those never intersect, as I've positioned them manually)
then liquid (well, whiskey) inside the glass had to be gutted out by, pretty much, everything (glass, ice, bubbles) so I gave it a nested priority of "3"
then bubbles got nested priority of "1".

So basically glass and ice, whenever intersected with bubbles or liquid - will win (read - you will see properties of glass / ice)
then bubble will loose to glass and ice but will win over liquid.
It might sounds complex but once you logically think - it's pretty simple and straightforward.

Hope it helps, feel free to reach out if you got more questions :)

P.S. - yep - I've used Maxwell scatter for those bubbles .. ..and used density map to define where exactly I want those bubbles to be :)
You do not have the required permissions to view the files attached to this post.
Hi Edwin,

JD and Artem explained You both options in detail.
Artem`s version of nested dielectrics can be explained in few words - If more objects with different materials share the same volume, they will behave as material with higher priority (0 is the highest). You should set the number in material options (in default all materials have the same number). With this solution it is better to make overlapping objects (object of liquid overlaps inside surface of glass, because this nested dielectrics solution behaves like rendertime booleans).

In Rhinoceros 6 there is another option to make liquid with bubbles as one object (don`t need to flip bubble normals). With two comands - "NonmanifoldMerge" and then "CreateRegions".

P.S.: Jeremy - nice to see You back here :-) .
User avatar
By Edwin C
Thanks to you both for the suggestions . However I am at a bit of a loss. In Rhino you can not flip the normals on a solid. So I then converted it to a mesh which I could flip the normals . In Rhino I have tried all the Boolean functions for meshes and I can not seem to join the geometry into one unit.
Also I can not fine in Rhino the function "nested priority " .......
Some time later inspired by your suggestions I made the bubbles material from the Maxwell material for water then turning the Index of Refraction to 1.1 and using the standard Maxwell HQ Glass material I got some joy :D. Ok hear with a flat cube the bubbles look quite flat but in a curved object they look good
User avatar
By Nasok
Edwin, nested priority is a part of Maxwell plugin - technically it has nothing to do with Rhino itself. So once you assign Maxwell material to an object in general section you have a nested priority number. In your case just make the bubbles nested priority number lower than the volume (i.e. bubbles - 1, volume - 2)

Technically your bubbles don't have to be a boolean-ed from the main volume. As long as they are a separate object within the volume and their normals are inverted - you're fine ... - keep in mind that this approach will not give you a good result if you'll decide to do the floating bubbles, like when half of the bubble is inside the volume and other half is above. As for that you'll need to use nested priority :)

Thanks Patrik - that's exactly what I've meant :))
User avatar
By Edwin C
I do not find "Priority " in the Maxwell Plugin for Rhino 6! So I thought I would have a look at it in The Rhino 5 Plugin.
I saved my Rhino 6 file as a Rhino 5 file and opened it up in R5
However no materials had been saved in the file ..... .Mmm!! we need to get Fernando on this!!
I then brought in the materials an and sure enough it is there in plugin material editor so setting this is easy.
Back in the R6 there is no way to do it in the model file , you have to open the Maxwell Editor and set the "Priority " there and save material for good measure delete the material in the R6 model and re-import the material you updated.
Right now the Maxwell plugin for Rhino 6 is just not stable enough to use on a daily workflow and loosing all material assignments in a save as R5 version is a big issue
By Marton Day8
Hello Edwin,

I am working on the V6 plugin, but I don't understand your last sentences about the V6 part. This one:
Back in the R6 there is no way to do it in the model file , you have to open the Maxwell Editor and set the "Priority " there and save material for good measure delete the material in the R6 model and re-import the material you updated.

Could you elaborate it? Why do you have to delete the material in R6 and re-import?

User avatar
By Edwin C
Hi Márton
My apologies for the delay reply. I have been on vacation. What I mean is in R5 you can edit the material in the plugin so if a material has not got the required "Priority " setting you can change it in the Rhino file Maxwell material.
In R6 all you have is a un-editable material you need to get info the Maxwell Material editor change the "Priority " there save then bring in the updated material as a new material.

I had some very strong highlights in some material[…]


Thanks everyone! I didn't want to use volumetrics […]

opening V5 files in v6

just installed latest version for Rhino V6 when I[…]

I hope someone can help me! This is almost certain[…]