Glossy Material GhShaderNodes

Why does my mirror look like a knuckled tinfoil plate?

My guess is that you just need to toggle the Raytraced viewport to say wireframe and back (that is restart Raytraced). It looks like overlapping geometry that didn’t get nicely cleaned up.

Also note that showing backfaces isn’t doing very well with glossy materials - you’ll get too much reflection. I had it once fixed prior to the latest update of Cycles last autumn.

Anyway, attach your GH definition with internalized data so I can have a look.

1 Like

Thanks, I’ll try that when I get to my PC. Actually, since I closed Rhino it should work well next time I load that :slight_smile:

I remember reading about that bug. Isn’t it possible to add a Restart Raytraced button next to the pause and padlock buttons? Sometimes if the graphics card is overloaded (youtube, movie, video game, etc.) and you use Raytraced the change of rhino display modes is kind of glitchy.

Hi @nathanletwory,

I still see some weird lines on the mirror. It might as well be my setup, environment, lights and stuff.
Here’s the Rhino file and gh file:
Untitled.3dm (51.8 KB)
CyclesTST-basics.gh (8.8 KB)

That looks like z-fighting, i.e. double geometry in same location. I’ll look at your def in an hour or so.

1 Like

I tried hiding everything else that didn’t help yesterday.

The original geometry you are referencing still exists in the scene. With the custom preview component you get also the GH generated geometry, so you end up with two in the same place.

You should hide the original Rhino geometry if you create GH geometry in the exact same location with the exact same form.

Also, it is probably better to just directly assing a material to rhino geometry instead of going through GH to assign.

That wasn’t the case, I internalized the geometry in GH just prior to uploading the file here. Also, I hid all Rhino geometry before doing the rendering above

Note that many inputs have a range from 0.0 - 1.0, except IOR which is the index of refraction, so essentially 1.0 and up (to about 3.0 I guess for most materials). I think that your initial settings screwed a bit with how things looked. Setting to a sane IOR value the glass looks much better. Same for its roughness to something lesser than 1.0, since 1.0 means full transmission roughness.

And yes, I did the testing and investigation on the Mac - GhShaderNodes work there too :slight_smile:

CyclesTST-basics.gh (18.5 KB)

And after some tweaks in the Rhino file (point light with light intensity 0%, skylight turned off, background set to solid black)

1 Like

Yeah, about that, is it possible that you add the range of these parameters in the hint? When you hover over the input to see of what range it should be, also a balloon warning would be nice if you go out of range.

Don’t really care about these machines :wink: I saw in your youtube videos you use mac.

Could these settings have a separate component in GhShaderNodes since they are that important?

I don’t know if it is possible. If @DavidRutten says it is, and maybe hints at how to do so, then sure.

The correct way would be for me to have a good way to add a custom light manager that allows me to tell Rhino when an object functions as a light (because it has an emissive material on).

If it works similar to python compiled components you should. You can even modify the slider attached to your components setting it’s minimum and maximum and default value :slight_smile:

I used it in my component PointCurveLength (zooid | Food4Rhino)

You basically check the SliderGUID that’s connected to that input and access it’s min and max values.
This was shared on the forums I do not remember who posted it though (for that I appologize):
GUID.of.connected.components.gh (7.8 KB)

You can also access the balloon values. I don’t “speak” csharp but I doublt it’s much different. I think ghenv is Grasshopper.Environment that isn’t directly accessible from ghpython.

from Grasshopper.Kernel import GH_RuntimeMessageLevel as RML

if x <= limit_1 and x > 0:
    ghenv.Component.AddRuntimeMessage(RML.Remark, "Slightly Larger!") #grey-ish bubble
    print("Slightly Larger!")
elif x > limit_1 and x <= limit_2:
    ghenv.Component.AddRuntimeMessage(RML.Warning, "Large!") #orange bubble
    print("Larger!")
elif x > limit_2:
    ghenv.Component.AddRuntimeMessage(RML.Error, "Way too large!")#red bubble
    print("Way too large!")
else:
    ghenv.Component.AddRuntimeMessage(RML.Blank, "Within limits!") #no bubble
    print("Within limits!")

Something ain’t right :frowning:

This is your GH file with point light with light intensity 0%, skylight turned off, background set to solid black

Ok, after turning the sun on and just slightly moved every slider it happened.

I don’t know

When just assigning the Cycles XML materials you sometimes just need to F5. No doubt I’ll get that fixed someday.

I could do that probably eventually. But that means that the (soft-) limit information has to be in CCSycles library, since the components are mostly autogenerated, much of the magic happens in

I’d love to learn how to do that, but that’s beyond my understanding as of now :frowning:

I found a way to add material from ghpython, but Cycles.xml is an xml not generated with System.Drawing.Color

I’ll create another thread for that.