Shader Mixer with vMaterials Version 1.3.0

OK I have been playing with the .mdl files from NVidea and have seemed to run into a problem.
I'm having some issues with the nodes. I understand that

C - Color
F - Float
N - Normal
P - Point
V - Vector
S - U coordinate, i.e., horizontal
T - V coordinate, i.e., vertical

as stated in the documentation. I ahve also figured that V in the User Parametters Brick is essentially an auto add feature.
MT = the output to the MDL Surface Material.

I am having issues with some additional nodes namelt those labled F2. In most cases these tend to be translate and scale nodes from the custom mdl provided by NVidea but when I attempt to attach them to the user parameter node they do nothing. I get the marquee that would make me assume it can connect, but it doesn't.

So I am at a loss.

Comments

  • Richard HaseltineRichard Haseltine Posts: 102,770

    A lot of the MDL bricks have complex data structures, as far as I know you can't attach anything to a User Parameter brick that dosn't ahvea  corresponding DS UI widget.

  • mjc1016mjc1016 Posts: 15,001

    If you expand all the available options, you'll find that F2 is conspiculously missing...F3 is there, but not F2.

  • MCDLabsMCDLabs Posts: 33

    I found a few float2 options in some bricks, but they also will not connect. for example there is a Lookup Float2 Inputs Brick. it has inputs of T2 (which would match up with the Color and Bump Textures of the NVidea MDL Brick. a (P) input labled Coord. The output is an F2. Theres also a Texel Float2 Brick

     

  • MCDLabsMCDLabs Posts: 33

    ok decided to do some digging
    ON the left in the image is the vMaterials Concrete Black MDL brick, the Right is the Concrete.mdl from DAZStudio. (also by nVidea)
    The vMaterial Brick is MDL 1.3 while the Concrete MDL is 1.0

    note BOTH have similar features as I have color coded with circles The big one that has been troubleing me is the F2 Scale in the vMaterials compared to the F2 Texture Tiling of the DAZ file.
    the code actually inside the MDL reads:


     uniform float2 texture_scale = float2 ( 1.f)
        [[
            anno::display_name("Scale"),
            anno::description("Larger numbers increase the texture size."),
            anno::in_group("Transform")
        ]],

    ::nvidia::core_definitions::flex_material(
        base_color:  ::nvidia::core_definitions::file_texture(
            texture:  color_texture,
            mono_source:  ::base::mono_average,
            brightness:  1.f,
            contrast:  1.f,
            scaling:  float2 ((1.f/ texture_scale.x) * 0.5f , (1.f/texture_scale.y) * 0.5f),
            translation:  texture_translate,
            rotation:  texture_rotate,
            clip:  false,
            texture_space:  uv_space_index,
            invert:  false).tint,
        diffuse_roughness:  0.1f,
        is_metal:  false,
        reflectivity:  0.9f,
        reflection_roughness:  reflection_roughness,
        anisotropy:  0.f,
        anisotropy_rotation:  0.f,
        transparency:  0.f,
        transmission_color:  color ( 1.f , 1.f , 1.f),
        volume_color:  color ( 1.f , 1.f , 1.f),
        transmission_roughness:  0.f,
        base_thickness:  0.1f,
        ior:  1.4f,
        thin_walled:  false,
        normal:  ::nvidia::core_definitions::file_bump_texture(
            texture:  bump_texture,
            bump_source:  ::base::mono_average,
            scaling: float2 ((1.f/texture_scale.x) * 0.5f , (1.f/texture_scale.y) * 0.5f),
            translation:  texture_translate,
            rotation:  texture_rotate,
            clip:  false,
            factor:  bump_strength *  4.f,
            texture_space:  uv_space_index));

    in the vMaterials, and

        uniform float2 texture_tiling = float2(1.,1.)
        [[
            anno::display_name("Texture tiling"),
           anno::description("Defines how often to repeat the texture")
        ]],

    = let{   
        base::texture_coordinate_info coordinate = base::transform_coordinate(
         transform: base::rotation_translation_scale(0.0,0.0,float3(texture_tiling.x,texture_tiling.y,1.))
        );
        base::texture_return diffuse_map = base::file_texture(
            texture: diffuse_texture,
            uvw: coordinate
        );  
        base::texture_return gloss_map = base::file_texture(
            texture: bump_texture,
            uvw: coordinate
        );

        bsdf diffuse_bsdf = df::diffuse_reflection_bsdf(
            roughness: 0.0,
            tint: diffuse_map.tint
        );
       
        bsdf glossy_bsdf = df::simple_glossy_bsdf(
            mode: df::scatter_reflect,
            tint: gloss_map.tint,
            roughness_u: roughness
        );

    } in material(
        surface: material_surface(
            scattering: df::fresnel_layer(
                ior: color(coating_ior),
                weight: glossy_weight,
                layer: glossy_bsdf,
                base: diffuse_bsdf
            )
        ),
        geometry: material_geometry(
            normal: base::file_bump_texture(
                    texture: bump_texture,
                    factor: bump_amount,
                    uvw: coordinate
           )
        )
    );

     

    Im going to look atr the full material and go from there

    concrete.png
    458 x 352 - 17K
  • MCDLabsMCDLabs Posts: 33

    OK even BETTER looking at the Concrete Shader from DAZ It is tge simplist fix. Using the Float2 2 Inputs brick setting the reult frequency to UNIFORM..it bridges beutifully.
     

    fixed.png
    1665 x 931 - 308K
Sign In or Register to comment.