public BocsNodeGlassBsdf()
        {
            //NodeType* type = NodeType::add("glass_bsdf", create, NodeType::SHADER);

            //SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
            //SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
            //SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);

            //static NodeEnum distribution_enum;
            //distribution_enum.insert("sharp", CLOSURE_BSDF_SHARP_GLASS_ID);
            //distribution_enum.insert("beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID);
            //distribution_enum.insert("GGX", CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID);
            //distribution_enum.insert("Multiscatter GGX", CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID);
            //SOCKET_ENUM(distribution, "Distribution", distribution_enum, CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID);
            //SOCKET_IN_FLOAT(roughness, "Roughness", 0.0f);
            //SOCKET_IN_FLOAT(IOR, "IOR", 0.3f);

            //SOCKET_OUT_CLOSURE(BSDF, "BSDF");

            NodeTitle = "Glass BSDF";
            NodeName  = "glass_bsdf";

            Slots.Add(new BocsSlotClosure(this, "BSDF", "bsdf", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "distribution", "distribution", BocsSlotBase.BocsSlotType.Value, 2);

            bsl.List = new string[] { "sharp", "beckmann", "GGX", "Multiscatter GGX" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotColor(this, "Color", "color", BocsSlotBase.BocsSlotType.Input, Color.white));
            Slots.Add(new BocsSlotFloat(this, "Roughness", "roughness", BocsSlotBase.BocsSlotType.Input, 0));
            Slots.Add(new BocsSlotFloat(this, "IOR", "IOR", BocsSlotBase.BocsSlotType.Input, 1.45f));
            Slots.Add(new BocsSlotClosure(this, "Normal", "normal", BocsSlotBase.BocsSlotType.Input));
        }
        public BocsNodeToonBsdf()
        {
            //NodeType* type = NodeType::add("toon_bsdf", create, NodeType::SHADER);

            //SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
            //SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
            //SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);

            //static NodeEnum component_enum;
            //component_enum.insert("diffuse", CLOSURE_BSDF_DIFFUSE_TOON_ID);
            //component_enum.insert("glossy", CLOSURE_BSDF_GLOSSY_TOON_ID);
            //SOCKET_ENUM(component, "Component", component_enum, CLOSURE_BSDF_DIFFUSE_TOON_ID);
            //SOCKET_IN_FLOAT(size, "Size", 0.5f);
            //SOCKET_IN_FLOAT(smooth, "Smooth", 0.0f);

            //SOCKET_OUT_CLOSURE(BSDF, "BSDF");

            NodeTitle = "Toon BSDF";
            NodeName  = "toon_bsdf";

            Slots.Add(new BocsSlotClosure(this, "BSDF", "bsdf", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "component", "component", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "diffuse", "glossy" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotColor(this, "Color", "color", BocsSlotBase.BocsSlotType.Input, Color.white));
            Slots.Add(new BocsSlotFloat(this, "Size", "size", BocsSlotBase.BocsSlotType.Input, .5f));
            Slots.Add(new BocsSlotFloat(this, "Smooth", "smooth", BocsSlotBase.BocsSlotType.Input, 0));

            Slots.Add(new BocsSlotClosure(this, "Normal", "normal", BocsSlotBase.BocsSlotType.Input));
        }
示例#3
0
        public BocsNodeNormalMap()
        {
            //NodeType* type = NodeType::add("normal_map", create, NodeType::SHADER);

            //static NodeEnum space_enum;
            //space_enum.insert("tangent", NODE_NORMAL_MAP_TANGENT);
            //space_enum.insert("object", NODE_NORMAL_MAP_OBJECT);
            //space_enum.insert("world", NODE_NORMAL_MAP_WORLD);
            //space_enum.insert("blender_object", NODE_NORMAL_MAP_BLENDER_OBJECT);
            //space_enum.insert("blender_world", NODE_NORMAL_MAP_BLENDER_WORLD);
            //SOCKET_ENUM(space, "Space", space_enum, NODE_TANGENT_RADIAL);

            //SOCKET_STRING(attribute, "Attribute", ustring(""));

            //SOCKET_IN_NORMAL(normal_osl, "NormalIn", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL | SocketType::OSL_INTERNAL);
            //SOCKET_IN_FLOAT(strength, "Strength", 1.0f);
            //SOCKET_IN_COLOR(color, "Color", make_float3(0.5f, 0.5f, 1.0f));

            //SOCKET_OUT_NORMAL(normal, "Normal");

            NodeTitle = "Normal Map";
            NodeName  = "normal_map";

            Slots.Add(new BocsSlotClosure(this, "Normal", "normal", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "space", "space", BocsSlotBase.BocsSlotType.Value, 1);

            bsl.List = new string[] { "object", "tangent", "world", "blender_object", "blender_world" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotString(this, "attribute", "attribute", BocsSlotBase.BocsSlotType.Value));

            Slots.Add(new BocsSlotFloat(this, "Strength", "strength", BocsSlotBase.BocsSlotType.Input, 1));
            Slots.Add(new BocsSlotColor(this, "Color", "color", BocsSlotBase.BocsSlotType.Input, Color.gray));
        }
        public BocsNodeAnisotropicBsdf()
        {
            //NodeType* type = NodeType::add("anisotropic_bsdf", create, NodeType::SHADER);

            //SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
            //SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
            //SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);

            //static NodeEnum distribution_enum;
            //distribution_enum.insert("beckmann", CLOSURE_BSDF_MICROFACET_BECKMANN_ANISO_ID);
            //distribution_enum.insert("GGX", CLOSURE_BSDF_MICROFACET_GGX_ANISO_ID);
            //distribution_enum.insert("Multiscatter GGX", CLOSURE_BSDF_MICROFACET_MULTI_GGX_ANISO_ID);
            //distribution_enum.insert("ashikhmin_shirley", CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ANISO_ID);
            //SOCKET_ENUM(distribution, "Distribution", distribution_enum, CLOSURE_BSDF_MICROFACET_GGX_ANISO_ID);

            //SOCKET_IN_VECTOR(tangent, "Tangent", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TANGENT);

            //SOCKET_IN_FLOAT(roughness, "Roughness", 0.2f);
            //SOCKET_IN_FLOAT(anisotropy, "Anisotropy", 0.5f);
            //SOCKET_IN_FLOAT(rotation, "Rotation", 0.0f);

            //SOCKET_OUT_CLOSURE(BSDF, "BSDF");

            NodeTitle = "Anisotropic BSDF";
            NodeName  = "anisotropic_bsdf";

            Slots.Add(new BocsSlotClosure(this, "BSDF", "bsdf", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "distribution", "distribution", BocsSlotBase.BocsSlotType.Value, 1);

            bsl.List = new string[] { "beckmann", "GGX", "Multiscatter GGX", "ashikhmin_shirley" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotColor(this, "Color", "color", BocsSlotBase.BocsSlotType.Input, Color.white));
            Slots.Add(new BocsSlotFloat(this, "Roughness", "roughness", BocsSlotBase.BocsSlotType.Input, .2f));
            Slots.Add(new BocsSlotFloat(this, "Anisotropy", "anisotropy", BocsSlotBase.BocsSlotType.Input, .5f));
            Slots.Add(new BocsSlotFloat(this, "Rotation", "rotation", BocsSlotBase.BocsSlotType.Input, 0));

            Slots.Add(new BocsSlotClosure(this, "Normal", "normal", BocsSlotBase.BocsSlotType.Input));
            Slots.Add(new BocsSlotClosure(this, "Tangent", "tangent", BocsSlotBase.BocsSlotType.Input));
        }
        public BocsNodeSubsurfaceScattering()
        {
            //NodeType* type = NodeType::add("subsurface_scattering", create, NodeType::SHADER);

            //SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
            //SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
            //SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);

            //static NodeEnum falloff_enum;
            //falloff_enum.insert("cubic", CLOSURE_BSSRDF_CUBIC_ID);
            //falloff_enum.insert("gaussian", CLOSURE_BSSRDF_GAUSSIAN_ID);
            //falloff_enum.insert("burley", CLOSURE_BSSRDF_BURLEY_ID);
            //SOCKET_ENUM(falloff, "Falloff", falloff_enum, CLOSURE_BSSRDF_BURLEY_ID);
            //SOCKET_IN_FLOAT(scale, "Scale", 0.01f);
            //SOCKET_IN_VECTOR(radius, "Radius", make_float3(0.1f, 0.1f, 0.1f));
            //SOCKET_IN_FLOAT(sharpness, "Sharpness", 0.0f);
            //SOCKET_IN_FLOAT(texture_blur, "Texture Blur", 1.0f);

            //SOCKET_OUT_CLOSURE(BSSRDF, "BSSRDF");

            NodeTitle = "Subsurface Scattering";
            NodeName  = "subsurface_scattering";

            Slots.Add(new BocsSlotClosure(this, "BSSRDF", "bssrdf", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "falloff", "falloff", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "burley", "cubic", "gaussian" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotColor(this, "Color", "color", BocsSlotBase.BocsSlotType.Input, Color.white));
            Slots.Add(new BocsSlotFloat(this, "Scale", "scale", BocsSlotBase.BocsSlotType.Input, 1));
            Slots.Add(new BocsSlotVector3(this, "Radius", "radius", BocsSlotBase.BocsSlotType.Input, new Vector3(1, 1, 1)));
            Slots.Add(new BocsSlotFloat(this, "Texture Blur", "texture_blur", BocsSlotBase.BocsSlotType.Input, 0));

            Slots.Add(new BocsSlotClosure(this, "Normal", "normal", BocsSlotBase.BocsSlotType.Input));
        }
        public BocsNodeHairBsdf()
        {
            //NodeType* type = NodeType::add("hair_bsdf", create, NodeType::SHADER);

            //SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
            //SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
            //SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);

            //static NodeEnum component_enum;
            //component_enum.insert("reflection", CLOSURE_BSDF_HAIR_REFLECTION_ID);
            //component_enum.insert("transmission", CLOSURE_BSDF_HAIR_TRANSMISSION_ID);
            //SOCKET_ENUM(component, "Component", component_enum, CLOSURE_BSDF_HAIR_REFLECTION_ID);
            //SOCKET_IN_FLOAT(offset, "Offset", 0.0f);
            //SOCKET_IN_FLOAT(roughness_u, "RoughnessU", 0.2f);
            //SOCKET_IN_FLOAT(roughness_v, "RoughnessV", 0.2f);
            //SOCKET_IN_VECTOR(tangent, "Tangent", make_float3(0.0f, 0.0f, 0.0f));

            //SOCKET_OUT_CLOSURE(BSDF, "BSDF");

            NodeTitle = "Hair BSDF";
            NodeName  = "hair_bsdf";

            Slots.Add(new BocsSlotClosure(this, "BSDF", "bsdf", BocsSlotBase.BocsSlotType.Output));

            BocsSlotStringList bsl = new BocsSlotStringList(this, "component", "component", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "reflection", "transmission" };
            Slots.Add(bsl);

            Slots.Add(new BocsSlotColor(this, "Color", "color", BocsSlotBase.BocsSlotType.Input, Color.white));
            Slots.Add(new BocsSlotFloat(this, "Offset", "offset", BocsSlotBase.BocsSlotType.Input, 0));
            Slots.Add(new BocsSlotFloat(this, "RoughnessU", "roughness_u", BocsSlotBase.BocsSlotType.Input, .2f));
            Slots.Add(new BocsSlotFloat(this, "RoughnessV", "roughness_v", BocsSlotBase.BocsSlotType.Input, 1));

            Slots.Add(new BocsSlotClosure(this, "Tangent", "tangent", BocsSlotBase.BocsSlotType.Input));
        }
示例#7
0
        public BocsNodeDisneyBsdf()
        {
            //NodeType* type = NodeType::add("disney_bsdf", create, NodeType::SHADER);
            NodeTitle = "Disney BSDF";
            NodeName  = "principled_bsdf";

            //SOCKET_OUT_CLOSURE(BSDF, "BSDF");
            Slots.Add(new BocsSlotClosure(this, "BSDF", "bsdf", BocsSlotBase.BocsSlotType.Output));

            //static NodeEnum distribution_enum;
            //distribution_enum.insert("GGX", CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID);
            //distribution_enum.insert("Multiscatter GGX", CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID);
            //SOCKET_ENUM(distribution, "Distribution", distribution_enum, CLOSURE_BSDF_MICROFACET_MULTI_GGX_GLASS_ID);
            BocsSlotStringList bsl = new BocsSlotStringList(this, "distribution", "distribution", BocsSlotBase.BocsSlotType.Value, 0);

            bsl.List = new string[] { "Multiscatter GGX", "GGX" };
            Slots.Add(bsl);

            //SOCKET_IN_COLOR(base_color, "Base Color", make_float3(0.8f, 0.8f, 0.8f));
            Slots.Add(new BocsSlotColor(this, "Base Color", "base_color", BocsSlotBase.BocsSlotType.Input, Color.white));

            //SOCKET_IN_COLOR(subsurface_color, "Subsurface Color", make_float3(0.8f, 0.8f, 0.8f));
            Slots.Add(new BocsSlotColor(this, "Subsurface Color", "subsurface_color", BocsSlotBase.BocsSlotType.Input, Color.red));
            //SOCKET_IN_FLOAT(subsurface, "Subsurface", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Subsurface", "subsurface", BocsSlotBase.BocsSlotType.Input, 0));
            //SOCKET_IN_VECTOR(subsurface_radius, "Subsurface Radius", make_float3(0.1f, 0.1f, 0.1f));
            Slots.Add(new BocsSlotVector3(this, "Subsurface Radius", "subsurface_radius", BocsSlotBase.BocsSlotType.Input, new Vector3(1, 1, 1)));

            //SOCKET_IN_FLOAT(metallic, "Metallic", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Metallic", "metallic", BocsSlotBase.BocsSlotType.Input, 0));

            //SOCKET_IN_FLOAT(specular, "Specular", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Specular", "specular", BocsSlotBase.BocsSlotType.Input, 0.5f));
            //SOCKET_IN_FLOAT(specular_tint, "Specular Tint", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Specular Tint", "specular_tint", BocsSlotBase.BocsSlotType.Input, 0));

            //SOCKET_IN_FLOAT(roughness, "Roughness", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Roughness", "roughness", BocsSlotBase.BocsSlotType.Input, 0.5f));

            //SOCKET_IN_FLOAT(anisotropic, "Anisotropic", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Anisotropic", "anisotropic", BocsSlotBase.BocsSlotType.Input, 0));
            //SOCKET_IN_FLOAT(anisotropic_rotation, "Anisotropic Rotation", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Anisotropic Rotation", "anisotropic_rotation", BocsSlotBase.BocsSlotType.Input, 0));

            //SOCKET_IN_FLOAT(sheen, "Sheen", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Sheen", "sheen", BocsSlotBase.BocsSlotType.Input, 0));
            //SOCKET_IN_FLOAT(sheen_tint, "Sheen Tint", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Sheen Tint", "sheen_tint", BocsSlotBase.BocsSlotType.Input, 0.5f));

            //SOCKET_IN_FLOAT(clearcoat, "Clearcoat", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Clearcoat", "clearcoat", BocsSlotBase.BocsSlotType.Input, 0));
            //SOCKET_IN_FLOAT(clearcoat_gloss, "Clearcoat Gloss", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Clearcoat Gloss", "clearcoat_gloss", BocsSlotBase.BocsSlotType.Input, 1));

            //SOCKET_IN_FLOAT(ior, "IOR", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "IOR", "ior", BocsSlotBase.BocsSlotType.Input, 1.45f));
            //SOCKET_IN_FLOAT(transparency, "Transparency", 0.0f);
            Slots.Add(new BocsSlotFloat(this, "Transparency", "transparency", BocsSlotBase.BocsSlotType.Input, 0));

            //SOCKET_IN_FLOAT(refraction_roughness, "Refraction Roughness", 0.0f);
            //_slots.Add(new BocsSlotFloat(this,"Refraction Roughness","refraction_roughness",BocsSlotBase.BocsSlotType.Input,0));

            //SOCKET_IN_NORMAL(normal, "Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
            Slots.Add(new BocsSlotClosure(this, "Normal", "normal", BocsSlotBase.BocsSlotType.Input));
            //SOCKET_IN_NORMAL(clearcoat_normal, "Clearcoat Normal", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_NORMAL);
            Slots.Add(new BocsSlotClosure(this, "Clearcoat Normal", "clearcoat_normal", BocsSlotBase.BocsSlotType.Input));
            //SOCKET_IN_NORMAL(tangent, "Tangent", make_float3(0.0f, 0.0f, 0.0f), SocketType::LINK_TANGENT);
            Slots.Add(new BocsSlotClosure(this, "Tangent", "tangent", BocsSlotBase.BocsSlotType.Input));

            //SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
        }