Home Technical Talk

[Redshift] Linear 3D gradient ramp

polycounter lvl 6
Offline / Send Message
BTDarmstad polycounter lvl 6
Hi!

I'm relatively new to Reshift, and I've been searching high and low for an answer to how to make a specific kind of material that literally takes less than 2 minutes to set up in Cinema 4D's material editor:

A linear 3D gradient ramp set in world space. Here's an example:





That's all there is to it, along with some reflection. I'm going to use this for a 3D animation of a logo that has a gradient color, so it's important that I get to control where in world space this gradient starts and ends in the relevant axis. The reason I'm trying to set this up in Redshift is because Cinema 4D's physical renderer is unbelievably slow when it comes to rendering DOF and motion blur, and DOF map After Effects just doesn't cut it (it just creates sharp edges and halos when cranking up the blur radius).

Any suggestions?

Replies

  • RN
    Options
    Offline / Send Message
    RN sublime tool
    Hi. Try using the Triplanar Shader in Redshift and set the projection mode to World-Space.
    You can usually find that in other renderers too.

    They specifically mention the result has the colors "swimming" over the object surface: https://docs.redshift3d.com/display/RSDOCS/Tri+Planar?product=cinema4d
  • BTDarmstad
    Options
    Offline / Send Message
    BTDarmstad polycounter lvl 6
    RN said:
    Hi. Try using the Triplanar Shader in Redshift and set the projection mode to World-Space.
    You can usually find that in other renderers too.

    They specifically mention the result has the colors "swimming" over the object surface: https://docs.redshift3d.com/display/RSDOCS/Tri+Planar?product=cinema4d

    Thanks for the suggestion. It's a good start, at least I'm getting that "swimming" that I was looking for with world space. However, from what I can tell, it's still stuck with the object's UV map, so the ramp is swimming through the object, rather than the object swimming through the ramp.



    I need the ramp to exist in 3D space and not 2D, and work completely independently from the object's UV map, if I've understood this correctly. Also, if there's a way to make a ramp appear within certain coordinates in 3D space and not an arbitrary "scale" value like the triplanar node uses, I'd like to know.
  • RN
    Options
    Offline / Send Message
    RN sublime tool
    Hm, you're right, it does look different. I don't have a way to test w/ Redshift in here, so I can only suggest things for you to try.

    I'd try using the Rotation setting (check that docs page, it's in the Coordinates group) to spin each side so they line up like your original example, something like this (it's a mockup):

    For the 3D location of the gradient I'd try the other Coordinates settings. Assuming the default values make it map 1 UV unit to 1 3D unit, you can use the Scale and Offset to place the UVs where you want them in the scene.
    You also have to make sure that the ramp gradient cannot wrap or tile -- it needs to be clamped so that when the object moves away the gradient can't be seen again.
    I don't know how you'd do that in Cinema4D. Triplanar mapping generates UVs, you'd have to plug those UVs into some UV transformation / clamping node, then plug them into the ramp shader.
  • throttlekitty
    Options
    Offline / Send Message
    For what you want with the gradient, I'd stick with your original setup, unless Redshift can't use that for some reason. I'm not a C4D user, but I'd be very surprised if they didn't support it or provide a similar node. Either way it should be a matter of connecting the output from the ramp to the RS material wherever you need it; it's common to use stock materials/nodes alongside the renderer-specific ones if that was something you hadn't thought about.

    The RS Triplanar node doesn't really do a whole lot for you in this exercise, I think. You'd have to go to some extra lengths to convert a lower and upper transform into the scale value. And doing a secondary UV channel blend as @RN mentions.
Sign In or Register to comment.