Isotropix Forums

Flow map

So you'd like something that's not there? Just tell us what, we'll see what we can do.

Flow map

Unread postby ayanik » Wed May 24, 2017 3:17 pm

Dear Clarisse developers,

Is there anything in Clarisse similar to flow maps used in game engines? If not, would it be possible to implement such feature in Clarisse or is it on the road map?
Would it be possible to use in combination with procedurals?

Some examples:
Image




Image
ayanik
 
Posts: 13
Joined: Wed Nov 26, 2014 10:10 pm

Re: Flow map

Unread postby xilofoton » Mon May 29, 2017 5:06 pm

Hi,

Here is a rough setup I've created to get this effect:
Code: Select all
#Isotropix_Clarisse_Clipboard_Serialization 0.93
Context "FlowMapRiverTemplate" {
    copy_from "project://scene/FlowMapRiverTemplate"
    GeometryPolygrid {
        name "polygridRiver"
        #version 0.9
        copy_from "project://scene/FlowMapRiverTemplate/polygridRiver"
        positions "project://scene/FlowMapRiverTemplate" 0 0
        translate 0.0 0.0 0.0
        uv_maps "parametric"
        uv_maps_loaded yes
        shading_groups "grid"
        materials "project://scene/FlowMapRiverTemplate/FlowMap/matte"
        clip_maps ""
        displacements ""
        sg_shading_variables ""
        visibles yes
    }
    Locator {
        name "locatorRiver"
        #version 0.9
        copy_from "project://scene/FlowMapRiverTemplate/locatorRiver"
        positions "project://scene/FlowMapRiverTemplate" 0 0
        translate {
            value[] {
                fcurve {
                    key 0 0.0 -1.17734409932464 0.0 0.0 0.0 -0.694374999999999 0.0 0.694374999999999 0.0 yes yes no yes
                    key 0 2.08333333333333 0.743557207582805 0.0 0.0 0.0 -0.694374999999999 0.0 0.694374999999999 0.0 yes yes no yes
                }
            }
            value[1] {
                fcurve {
                    key 0 0.0 0.434364386648571 0.0 0.0 0.0 -0.694374999999999 0.0 0.694374999999999 0.0 yes yes no yes
                    key 0 2.08333333333333 -0.159141010721805 0.0 0.0 0.0 -0.694374999999999 0.0 0.694374999999999 0.0 yes yes no yes
                }
            }
            value[2] {
                fcurve {
                    key 0 0.0 0.0 0.0 0.0 0.0 -0.694374999999999 0.0 0.694374999999999 0.0 yes yes no yes
                    key 0 2.08333333333333 0.0 0.0 0.0 0.0 -0.694374999999999 0.0 0.694374999999999 0.0 yes yes no yes
                }
            }
        }
        rotate 0.0 0.0 0.0
        rotate_offset 0.0 0.0 0.0
    }
    GeometryCylinder {
        name "cylinder"
        #version 0.9
        copy_from "project://scene/FlowMapRiverTemplate/cylinder"
        positions "project://scene/FlowMapRiverTemplate" 0 0
        translate 0.0186269720659777 0.0 0.0
        rotate 0.0 0.0 0.0
        uv_maps "parametric"
        uv_maps_loaded yes
        shading_groups "surface"
        materials "project://default/material"
        clip_maps ""
        displacements ""
        sg_shading_variables ""
        visibles yes
        radius 0.13
        height 0.11
        show_caps yes
    }
    Locator {
        name "locatorObject"
        #version 0.9
        copy_from "project://scene/FlowMapRiverTemplate/locatorObject"
        positions "project://scene/FlowMapRiverTemplate" 0 0
        translate 0.0215363012169886 -0.00639740640977518 0.0
        rotate 0.0 0.0 0.0
        shear 0.0 0.0 0.0
        scale 1 1 1
        rotation_order 4097
        parent "project://scene/FlowMapRiverTemplate/cylinder"
        scale_pivot 0.0 0.0 0.0
        rotate_pivot 0.0 0.0 0.0
        scale_pivot_offset 0.0 0.0 0.0
        rotate_pivot_offset 0.0 0.0 0.0
        translate_offset 0.0 0.0 0.0
        rotate_offset 0.0 0.0 0.0
        scale_offset 1 1 1
        rotation_offset_order 4097
    }
    Context "FlowMap" {
        copy_from "project://scene/FlowMapRiverTemplate/FlowMap"
        TextureReorder {
            name "reorder1"
            #version 0.9
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/reorder1"
            positions "mat_1" 330 -105 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            input {
                value 1 1 1 1
                texture "project://scene/FlowMapRiverTemplate/FlowMap/utility"
            }
            channel_order "rbg"
        }
        MaterialMatte {
            name "matte"
            #version 0.91
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/matte"
            positions "mat_1" 990 60 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            color {
                value 0.0 0.0 0.0
                texture "project://scene/FlowMapRiverTemplate/FlowMap/fractal_noise1"
            }
        }
        TextureConstantColor {
            name "constant_color"
            #version 0.91
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/constant_color"
            positions "mat_1" 114 29 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            color -0.1 0.2 0.0 1
        }
        TextureUtility {
            name "utility"
            #version 0.9
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/utility"
            positions "mat_1" -793 82 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            output 24
            item "project://scene/FlowMapRiverTemplate/locatorRiver"
        }
        TextureAdd {
            name "add"
            #version 0.9
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/add"
            positions "mat_1" 546 -60 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            input1 {
                value 0.0 0.0 0.0
                texture "project://scene/FlowMapRiverTemplate/FlowMap/reorder1"
            }
            input2 {
                value 0.0 0.0 0.0
                texture "project://scene/FlowMapRiverTemplate/FlowMap/multiply"
            }
        }
        TextureFractalNoise {
            name "fractal_noise1"
            #version 0.91
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/fractal_noise1"
            positions "mat_1" 742 37 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            projection 6
            uv_translate {
                value 0.0 0.0 0.0
                texture "project://scene/FlowMapRiverTemplate/FlowMap/add"
            }
            uv_scale {
                value 1 1 1
                texture "project://scene/FlowMapRiverTemplate/FlowMap/reorder"
            }
            color1 0.584313725490196 0.584313725490196 0.584313725490196
            color2 0.0125643983083429 0.0227671709975801 0.0745098039215686
            increment 0.915
            lacunarity 1.77
            octaves 6
            contrast 0.215
            turbulent yes
            normalize yes
        }
        TextureGradient {
            name "gradient"
            #version 0.91
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/gradient"
            positions "mat_1" 128 167 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            mode 4
            input {
                value 0.0
                texture "project://scene/FlowMapRiverTemplate/FlowMap/multiply1"
            }
            output {
                value[] {
                    key 0 0.0 0.948000000000001 0.0 0.0 0.0 -0.0527725 0.0 0.0527725 0.0 yes yes no yes
                    key 4 0.158333333333333 1.61003765153885 0.0 0.0 0.0 -0.0527725 0.0 0.02360875 0.0 yes yes no yes
                    key 4 0.229166666666667 0.27 0.0 0.0 0.0 -0.02360875 0.126083711057266 0.028469375 -0.152042122157291 yes yes no yes
                    key 4 0.314583333333333 0.11795787784271 0.0 0.0 0.0 -0.028469375 0.0271296397058824 0.065965625 -0.0628613602941177 yes yes no yes
                    key 4 0.5125 0.0 0.0 0.0 0.0 -0.065965625 0.0 0.065965625 0.0 yes yes no yes
                }
                value[1] {
                    key 0 0.0 0.0 0.0 0.0 0.0 -0.0527725 0.0 0.0527725 0.0 yes yes no yes
                    key 4 0.158333333333333 0.0 0.0 0.0 0.0 -0.0527725 0.0 0.02360875 0.0 yes yes no yes
                    key 4 0.229166666666667 0.0 0.0 0.0 0.0 -0.02360875 0.0 0.028469375 0.0 yes yes no yes
                    key 4 0.314583333333333 0.0 0.0 0.0 0.0 -0.028469375 0.0 0.065965625 0.0 yes yes no yes
                    key 4 0.5125 0.0 0.0 0.0 0.0 -0.065965625 0.0 0.065965625 0.0 yes yes no yes
                }
                value[2] {
                    key 0 0.0 0.0 0.0 0.0 0.0 -0.0527725 0.0 0.0527725 0.0 yes yes no yes
                    key 4 0.158333333333333 0.0 0.0 0.0 0.0 -0.0527725 0.0 0.02360875 0.0 yes yes no yes
                    key 4 0.229166666666667 0.0 0.0 0.0 0.0 -0.02360875 0.0 0.028469375 0.0 yes yes no yes
                    key 4 0.314583333333333 0.0 0.0 0.0 0.0 -0.028469375 0.0 0.065965625 0.0 yes yes no yes
                    key 4 0.5125 0.0 0.0 0.0 0.0 -0.065965625 0.0 0.065965625 0.0 yes yes no yes
                }
                value[3] {
                    key 0 0.0 1 0.0 0.0 0.0 -0.0527725 0.0 0.0527725 0.0 yes yes no yes
                    key 4 0.158333333333333 1 0.0 0.0 0.0 -0.0527725 0.0 0.02360875 0.0 yes yes no yes
                    key 4 0.229166666666667 1 0.0 0.0 0.0 -0.02360875 0.0 0.028469375 0.0 yes yes no yes
                    key 4 0.314583333333333 1 0.0 0.0 0.0 -0.028469375 0.0 0.065965625 0.0 yes yes no yes
                    key 4 0.5125 1 0.0 0.0 0.0 -0.065965625 0.0 0.065965625 0.0 yes yes no yes
                }
                ui_settings {
                    WidgetAttributeEditor_Selection "1"
                }
            }
        }
        TextureDistanceToObject {
            name "distance_to_object"
            #version 0.9
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/distance_to_object"
            positions "mat_1" -463 170 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            output 0
            target "project://scene/FlowMapRiverTemplate/locatorObject"
        }
        TextureMultiply {
            name "multiply"
            #version 0.9
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/multiply"
            positions "mat_1" 343 32 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            input1 {
                value 1 1 1
                texture "project://scene/FlowMapRiverTemplate/FlowMap/constant_color"
            }
            input2 {
                value 1 1 1
                texture "project://scene/FlowMapRiverTemplate/FlowMap/gradient"
            }
        }
        TextureReorder {
            name "reorder"
            #version 0.9
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/reorder"
            positions "mat_1" 529 229 2 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            input {
                value 1 1 1 1
                texture "project://scene/FlowMapRiverTemplate/FlowMap/gradient1"
            }
            channel_order "1g1"
        }
        TextureGradient {
            name "gradient1"
            #version 0.91
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/gradient1"
            positions "mat_1" 332 216 "project://scene" 0 0 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            mode 4
            input {
                value 0.0
                texture "project://scene/FlowMapRiverTemplate/FlowMap/multiply1"
            }
            output {
                value[] {
                    key 0 0.0645833333333333 0.0 0.0 0.0 0.0 -0.020136875 0.0 0.020136875 0.0 yes yes no yes
                    key 0 0.125 0.0 0.0 0.0 0.0 -0.020136875 0.0 0.01111 0.0 yes yes no yes
                    key 0 0.158333333333333 0.0 0.0 0.0 0.0 -0.01111 0.0 0.088185625 0.0 yes yes no yes
                    key 4 0.422916666666667 0.0 0.0 0.0 0.0 -0.088185625 0.0 0.088185625 0.0 yes yes no yes
                }
                value[1] {
                    key 0 0.0645833333333333 50 0.0 0.0 0.0 -0.020136875 0.0 0.020136875 0.0 yes yes no yes
                    key 0 0.125 2.798 0.0 0.0 0.0 -0.020136875 3.17527839091324 0.01111 -1.75187773291766 yes yes no yes
                    key 0 0.158333333333333 1.04612226708233 0.0 0.0 0.0 -0.01111 0.00581067931745935 0.088185625 -0.0461222670823336 yes yes no yes
                    key 4 0.422916666666667 1 0.0 0.0 0.0 -0.088185625 0.0 0.088185625 0.0 yes yes no yes
                }
                value[2] {
                    key 0 0.0645833333333333 0.0 0.0 0.0 0.0 -0.020136875 0.0 0.020136875 0.0 yes yes no yes
                    key 0 0.125 0.0 0.0 0.0 0.0 -0.020136875 0.0 0.01111 0.0 yes yes no yes
                    key 0 0.158333333333333 0.0 0.0 0.0 0.0 -0.01111 0.0 0.088185625 0.0 yes yes no yes
                    key 4 0.422916666666667 0.0 0.0 0.0 0.0 -0.088185625 0.0 0.088185625 0.0 yes yes no yes
                }
                value[3] {
                    key 0 0.0645833333333333 1 0.0 0.0 0.0 -0.020136875 0.0 0.020136875 0.0 yes yes no yes
                    key 0 0.125 1 0.0 0.0 0.0 -0.020136875 0.0 0.01111 0.0 yes yes no yes
                    key 0 0.158333333333333 1 0.0 0.0 0.0 -0.01111 0.0 0.088185625 0.0 yes yes no yes
                    key 4 0.422916666666667 1 0.0 0.0 0.0 -0.088185625 0.0 0.088185625 0.0 yes yes no yes
                }
                ui_settings {
                    WidgetAttributeEditor_Selection "1"
                }
            }
        }
        TextureFractalNoise {
            name "fractal_noise"
            #version 0.91
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/fractal_noise"
            positions "mat_1" -255 323 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            projection 6
            uv_translate {
                value 0.0 0.0 0.0
                texture "project://scene/FlowMapRiverTemplate/FlowMap/invert"
            }
            color1 1 1 1
            color2 0.705882352941176 0.705882352941176 0.705882352941176
        }
        TextureMultiply {
            name "multiply1"
            #version 0.9
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/multiply1"
            positions "mat_1" -67 307 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            input1 {
                value 1 1 1
                texture "project://scene/FlowMapRiverTemplate/FlowMap/distance_to_object"
            }
            input2 {
                value 1 1 1
                texture "project://scene/FlowMapRiverTemplate/FlowMap/fractal_noise"
            }
        }
        TextureInvert {
            name "invert"
            #version 0.9
            copy_from "project://scene/FlowMapRiverTemplate/FlowMap/invert"
            positions "mat_1" -399 450 2 "project://scene/FlowMapRiverTemplate/FlowMap" 0 0
            input {
                value 1 1 1
                texture "project://scene/FlowMapRiverTemplate/FlowMap/utility"
            }
        }
    }
}


Just paste it into your project and use as basis, needs tweaking and you can replace the right side fractal to your wave texture. I've animated the river locator X and Y direction to have some action. There is turbulence depending on the distance.

The new I-dont-remember-the-name feature borrowed from Dneg coming in 3.5 may be better than using locator + distance to object. Or using AO for arbitrary object, but sampling problem may occur.
VFX Artist, Clarisse Specialist
https://scivfx.wordpress.com/
xilofoton
 
Posts: 198
Joined: Tue Jul 21, 2015 2:29 pm

Re: Flow map

Unread postby ayanik » Mon May 29, 2017 9:15 pm

Wow that's awesome! I didn't know you could texture the uv transform channels. This makes texturing so much more powerful!
Thank you very much for your help!

I'll definitely upgrade to 3.5 when it comes out.
ayanik
 
Posts: 13
Joined: Wed Nov 26, 2014 10:10 pm

Re: Flow map

Unread postby xilofoton » Wed May 31, 2017 1:35 pm

It was a pleasure, you're welcome. I've seen this earlier in Unreal Engine and was interested how to achieve similar for noninteractive content, but just for myself I didn't had enough motivation ;)

Yes, every parameter which are listed in the material editor can be connected to a compatible one.
VFX Artist, Clarisse Specialist
https://scivfx.wordpress.com/
xilofoton
 
Posts: 198
Joined: Tue Jul 21, 2015 2:29 pm

Re: Flow map

Unread postby paq » Wed May 31, 2017 11:56 pm

Thanks for sharing Xilo !
User avatar
paq
 
Posts: 306
Joined: Sat Jan 26, 2013 12:33 am
Location: Montréal


Return to Feature Requests