Diagonal Gradient

Diagonal Gradient


I'm building a 3D periodic table, starting with Hydrogen.
With the help of posts from Frank and Pat88, I've almost got it.

I want the gradient running diagonally but I can't figure
out how to do it without also rotating the image nodes. :confused:

 

Attachments

  • Non Metals.zip
    140.1 KB · Views: 344
  • Hydrogen01.jpg
    Hydrogen01.jpg
    66.2 KB · Views: 450
  • Hydrogen nodes.jpg
    Hydrogen nodes.jpg
    155.6 KB · Views: 458
  • Periodic Table02.jas.zip
    36.3 KB · Views: 349
Hey there,
A bit tricky, but also straight forward. I think you sent us a file that was a work in progress. The material node in the file was not the same as the screen capture, and the UVs were kinda mixed up. But I was able to recreate everything.

The remedy for a Diagonal gradient across a transparent cube with nodes takes two steps.

First - I added some math to the node to capture diagonal movement. I simply Added X and Y together and then subtracted 1.0 - this sent an appropriate Position value to the Gradient Node to create a diagonal gradient.

Well this only get's you part of the way there. If you drop this material on a default Cube - each face will have the same diagonal gradient for that face. I am guessing since this is a transparent cube, you were wanting a Diagonal gradient for the cube.

So, the second step is to go into the UV editor. Select all polys. Activate the UV Mapper. In the TOOL tab, Change the "Mapping type" to FLAT. Hit OK on "Write UV Coords." That's pretty much it. But there are some limitations. With this setup you won't be able to place the Periodic Info on all sides. With this setup there is a very specific FRONT & BACK to the cube and you will not be able to place the periodic info on the top, bottom or sides. To guarantee that the Periodic info is on one face I created two materials (one with text and one without) and applied them appropriately.

If you want the Periodic info on all sides WITH a diagonal gradient for the cube - I would have to ponder that more. Be sure to show us your final.

Cheers.
 

Attachments

  • Diag-Cube2.jpg
    Diag-Cube2.jpg
    24.8 KB · Views: 431
  • Periodic Table-Diag.jas.zip
    34.6 KB · Views: 329
  • Screen Shot 2014-09-07 at 11.53.24 PM.jpg
    Screen Shot 2014-09-07 at 11.53.24 PM.jpg
    114.9 KB · Views: 438
Here´s a much simpler version which uses the UV-rotation property for the diagonally gradient - hopefully it´s working for you. ;)

Cheers
Frank
 

Attachments

  • PeriodicTable Draft.zip
    94.1 KB · Views: 332
  • Hydrogen.jpg
    Hydrogen.jpg
    38.1 KB · Views: 429
  • DiagonallyGradient.png
    DiagonallyGradient.png
    53.3 KB · Views: 427
Hey there,
A bit tricky, but also straight forward. I think you sent us a file that was a work in progress. The material node in the file was not the same as the screen capture, and the UVs were kinda mixed up. But I was able to recreate everything.

The remedy for a Diagonal gradient across a transparent cube with nodes takes two steps.

First - I added some math to the node to capture diagonal movement. I simply Added X and Y together and then subtracted 1.0 - this sent an appropriate Position value to the Gradient Node to create a diagonal gradient.

Well this only get's you part of the way there. If you drop this material on a default Cube - each face will have the same diagonal gradient for that face. I am guessing since this is a transparent cube, you were wanting a Diagonal gradient for the cube.

So, the second step is to go into the UV editor. Select all polys. Activate the UV Mapper. In the TOOL tab, Change the "Mapping type" to FLAT. Hit OK on "Write UV Coords." That's pretty much it. But there are some limitations. With this setup you won't be able to place the Periodic Info on all sides. With this setup there is a very specific FRONT & BACK to the cube and you will not be able to place the periodic info on the top, bottom or sides. To guarantee that the Periodic info is on one face I created two materials (one with text and one without) and applied them appropriately.

If you want the Periodic info on all sides WITH a diagonal gradient for the cube - I would have to ponder that more. Be sure to show us your final.

Cheers.

Thanks Rene, I lack an understanding of many of the
math nodes, so your info is most welcome.
I want the info only on one side so it's fine this way.

As usual, Frank has a simple solution that makes
all the complications I created unnecessary.

 

Attachments

  • Hydrogen04.jpg
    Hydrogen04.jpg
    71.7 KB · Views: 414
Here´s a much simpler version which uses the UV-rotation property for the diagonally gradient - hopefully it´s working for you. ;)

Cheers
Frank

Beautiful and simple, that's how I like it.
Thanks a bunch Frank.

Question: I noticed your avatar on the forum,
fades away at times. What's up with that?

 
While the blackness of the text is a bit rude you can soften it by reducing the "Mix:"-value at the image-node.

Cheers
Frank
 

Attachments

  • HydrogeneMixValue.png
    HydrogeneMixValue.png
    98.7 KB · Views: 412
Last edited:
Much as I love pure gradient solutions, I have to say that simply using an image to control the gradient seems like a better way to achieve this result. You could use a greyscale image to control lookup of a gradient node if you want one image to control a bunch of different materials (e.g. different colors for the various groupings, such as actinides, noble gases, halogens, rare earths, etc.).

An image would let you get exactly what you want interactively, rather than fiddling around with properties and rendering to see if you got what you wanted.

A more complex option would be to superposition rgb gradients and use the components to control different things (e.g. specularity) or to simply use more than one greyscale image.
 
Much as I love pure gradient solutions, I have to say that simply using an image to control the gradient seems like a better way to achieve this result. You could use a greyscale image to control lookup of a gradient node if you want one image to control a bunch of different materials (e.g. different colors for the various groupings, such as actinides, noble gases, halogens, rare earths, etc.).

An image would let you get exactly what you want interactively, rather than fiddling around with properties and rendering to see if you got what you wanted.

A more complex option would be to superposition rgb gradients and use the components to control different things (e.g. specularity) or to simply use more than one greyscale image.

Thanks Tonio, the thought occurred to me. I must test
out the image based solution and see how that works.

I need ten color gradients for all the non-metals, metals and
metaloids, so your idea of the grayscale image is very
interesting. Can you Illustrate the way? Thanks again.

 
This example is more complex than usual because I used a subtraction node to flip the gradient. I used a radial gradient because I can. Also note that the size/resolution of the gradient shouldn't be critical since the sampling should be smoothed (as long as the resolution of the gradient isn't horrible, it should work fine for any size render).
 

Attachments

  • Screenshot 2014-09-08 11.37.27.png
    Screenshot 2014-09-08 11.37.27.png
    133.3 KB · Views: 331

That's working nicely, a simple diagonal grayscale image of 500 x 500
and a gradient, applied via UV Mapper with flat mapping to all.

The text applied to the front polygon selection the same way.

Thanks Tonio, as always I appreciate your insight.

Also, a thank you is due Rene, and Frank. I always learn something new from you guys.

I'll post some more as I go.

 

Attachments

  • Lithium.jpg
    Lithium.jpg
    66.2 KB · Views: 305
  • Alkali Metals.jpg
    Alkali Metals.jpg
    53.7 KB · Views: 313
  • Lithium Lable nodes.jpg
    Lithium Lable nodes.jpg
    52.7 KB · Views: 311

That's working nicely, a simple diagonal grayscale image of 500 x 500
and a gradient, applied via UV Mapper with flat mapping to all.

The text applied to the front polygon selection the same way.

Thanks Tonio, as always I appreciate your insight.

Also, a thank you is due Rene, and Frank. I always learn something new from you guys.

I'll post some more as I go.


:icon_thumbup:
That's Looking VERY NICE Zoo!!!
Can't wait to see the rest!

Regards,
ALinCAL
 

Thanks Al, I'm setting up all the labels first, column by column.
It got a little tight when I got to Rutherfordium and Darmstadtium,
and the hard to pronounce Roentgenium, but I'm on Chlorine now so I'm getting there.

Check this out: 115 Uup Ununpentium. :lol:

 

Thanks Al, I'm setting up all the labels first, column by column.
It got a little tight when I got to Rutherfordium and Darmstadtium,
and the hard to pronounce Roentgenium, but I'm on Chlorine now so I'm getting there.

Check this out: 115 Uup Ununpentium. :lol:


:eek: Good Luck!


Regards,
ALinCAL
 

Getting good results so far, I came up with a trick to
get the cube "clean" up front, and blurred out the back.

The colored material is blurred by .03 and UV
Mapped Flat to the full cube from front to back.

The text on glass was UV Mapped Flat to the
polygon selection on the front of the cube.

Combined with the material setup, I used another trick
to get the subtle gradient at the bottom of the cube.

I have a large disc underneath, with a Render Tag
on it with Visible for primary rays unchecked.

Although the disc is invisible in the render, it shows
up in the blurred material through the back of the cube.
It's better than using a texture solution in that
it becomes an optical effect with camera motion.

 

Attachments

  • PT test 01.jpg
    PT test 01.jpg
    78.4 KB · Views: 269

Getting good results so far, I came up with a trick to
get the cube "clean" up front, and blurred out the back.

The colored material is blurred by .03 and UV
Mapped Flat to the full cube from front to back.

The text on glass was UV Mapped Flat to the
polygon selection on the front of the cube.

Combined with the material setup, I used another trick
to get the subtle gradient at the bottom of the cube.

I have a large disc underneath, with a Render Tag
on it with Visible for primary rays unchecked.

Although the disc is invisible in the render, it shows
up in the blurred material through the back of the cube.
It's better than using a texture solution in that
it becomes an optical effect with camera motion.


Looking Good!

Regards,
ALinCAL
 
Back
Top