Ramp texture

clintonman
Captain
Posts: 3541
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Ramp texture

Post by clintonman »

ramp1.jpg
Ramp texture for truespace. Image shows result from 3dbuzz maya fundamentals project 2, the beach ball object.
Both ramps are set for no interpolation and one ramp feeds the other as a texture.

Press init to start out with 2 keys of white for key 0 at position 0 and black for key 1 at position 0.1.
The current color is selected with the previous and next buttons. They cycle through the keys in the order they are created, not their position on the ramp.
To add a new key click in the ramp then change the color with the current color input and the position with the slider. Keys can be added in any order but it's easier next and previous buttons if the keys are added bottom to top or left to right.

Interpolation of 0 means hard lines, no interpolation. 1 means linear interpolation
Type 0 creates a vertical ramp, type 1 is horizontal.

To assign an image to a key press the add texture button, the area of the key will be filled with noise. Switch to the Exp tab to assign the actual texture to be used. When the ramp type is set to 1/horizontal the image will be reversed left for right. Hmm, seems a little broken not working for the last key.
The remove a texture press the remove texture button.

There is no way to remove a key yet.
Don't use the CurrentKey number input, it only works with the previous and next buttons.
Attachments
ball.RsObj
(351.82 KiB) Downloaded 31 times
Ramp.RsObj
(200.52 KiB) Downloaded 30 times
Clinton Reese

http://clintons3d.com

clintonman
Captain
Posts: 3541
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Ramp texture

Post by clintonman »

alienEyeRamp.jpg
Alien eye made with ramp and voronoi texture. Same 3dbuzz project.
Clinton Reese

http://clintons3d.com

User avatar
trueBlue
Captain
Posts: 2977
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Ramp texture

Post by trueBlue »

Awesome Clinton!
Are you able to do something like this?
https://www.google.com/url?sa=t&rct=j&q ... ymwKkyeEcZ

User avatar
Finis
Captain
Posts: 4814
Joined: 21 May 2009, 18:26
Type the number ten into the box: 0
Location: America!
Contact:

Re: Ramp texture

Post by Finis »

Good feature for trueSpace! Color ramps are awesome. Blender people use them for an amazing variety of effects. I used a color ramp in Blender to color the ornament particles on the Christmas tree (https://www.united3dartists.com/forum/v ... 999#p56999). Outside the environment background of stars is a noise texture sent through a color ramp.

User avatar
MikomDude
Captain
Posts: 1781
Joined: 04 Oct 2010, 11:12
Type the number ten into the box: 0
Location: Verona, Italy
Contact:

Re: Ramp texture

Post by MikomDude »

Ohh, yeah ramps are super useful! Couldn't make a material in Blender without one.

clintonman
Captain
Posts: 3541
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Ramp texture

Post by clintonman »

trueBlue wrote:
05 Feb 2020, 18:50
Awesome Clinton!
Are you able to do something like this?
https://www.google.com/url?sa=t&rct=j&q ... ymwKkyeEcZ
I don't think so except maybe to make a uv planar projection in the second uv channel and use it in place of the projection node he uses in the video.
Clinton Reese

http://clintons3d.com

User avatar
trueBlue
Captain
Posts: 2977
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Ramp texture

Post by trueBlue »

Wanting to add your Ramp material to the updates.
Does this UI make sense?
RampUI.PNG
Attachments
D3D Ramp.RsObj
(271.9 KiB) Downloaded 32 times

clintonman
Captain
Posts: 3541
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Ramp texture

Post by clintonman »

trueBlue wrote:
08 Feb 2020, 21:11
Wanting to add your Ramp material to the updates.
Does this UI make sense?
RampUI.PNG
I'll have to get back to you. For now I think Position isn't used, but I'm not sure.
Initiate should be Initialize or Reset
The Next and Previous buttons should be closer to the ramp than the Add and Remove texture buttons. Or maybe Add/Remove should be closer to the color since it replaces the color.
I plan to replace Interpolation and Type with drop down lists
Also plan to add key position indicators.
Clinton Reese

http://clintons3d.com

User avatar
trueBlue
Captain
Posts: 2977
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Ramp texture

Post by trueBlue »

Okay, I'll wait until your finished.

I like the Vertical or Horizontal Combo Control idea!
Wonder though if it should be two different materials?
One for Horizontal and one for Vertical.

Looking at your Ball.RsObj, I'm guessing that it should be a Component verses a Material?

With your Ball.RsObj, I was getting an error from the data script.
Something about the newkey being undifined:

Code: Select all

	var curkey = CurrentKey;
	if(curkey < 9) {
		curkey = "0" + curkey ;
	} else {
		curkey = "" + newkey;
	}
If I remember correctly, I just clicked on the ramp bitmap control.

clintonman
Captain
Posts: 3541
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Ramp texture

Post by clintonman »

That reminds me, it's also probably limited to adding less than 10 keys and there's no way to delete keys.
Clinton Reese

http://clintons3d.com

Post Reply