Ramp texture

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

Re: Ramp texture

Post by clintonman »

ramp01.jpg
Removed unused Position input
Changed Interpolation and Type from number inputs to word selection inputs.
Added a clickable key indicator - click near to select a key
Added a remove key button - it only works on the last key added
Reset/Clear the texture connection when removing a texture

InterpolationS only valid values are "Linear" and "None"
TypeS only valid values are "V Ramp" and "U Ramp"
Limited to 16 color keys
First 8 keys can be textures
Attachments
Ramp.RsObj
(117.71 KiB) Downloaded 188 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Ramp texture

Post by trueBlue »

Nice! Now I need to figure out how to use it.
Made a U Ramp and V Ramp D3D Materials
Removed due to update
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Ramp texture

Post by trueBlue »

U Ramp
With the RampBitmap/Clickable Bitmap Control, I am getting errors!
If I change to code as follows, I do not get errors.

Code: Select all

Node.Value("%THIS_NAME%" + "/add new key" , "Position") = "%MOUSE_X%/" + Node.Value("%THIS_NAME%","SizeX");
color = System.CreateDO("Common Data Package/Color Data");
color.SetRed('%COLOR_R%')
color.SetGreen('%COLOR_G%')
color.SetBlue('%COLOR_B%')
Node.Value("%THIS_NAME%" + "/add new key" , "ColorIn") = color
Activity.Run("%THIS_NAME%" + "/add new key")
User avatar
clintonman
Captain
Posts: 5430
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: 11 Feb 2020, 21:51 U Ramp
With the RampBitmap/Clickable Bitmap Control, I am getting errors!
If I change to code as follows, I do not get errors.

Code: Select all

Node.Value("%THIS_NAME%" + "/add new key" , "Position") = "%MOUSE_X%/" + Node.Value("%THIS_NAME%","SizeX");
color = System.CreateDO("Common Data Package/Color Data");
color.SetRed('%COLOR_R%')
color.SetGreen('%COLOR_G%')
color.SetBlue('%COLOR_B%')
Node.Value("%THIS_NAME%" + "/add new key" , "ColorIn") = color
Activity.Run("%THIS_NAME%" + "/add new key")
That doesn't work. Error must be from something else.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Ramp texture

Post by trueBlue »

For me it is mostly Line 335 Type mismatch when scrubbing the CurrentPosition slider.
Line 335 Type mismatch.PNG
Line 335 Type mismatch.PNG (8.94 KiB) Viewed 3275 times
How about a color picker?
ColorPicker.PNG
User avatar
clintonman
Captain
Posts: 5430
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: 12 Feb 2020, 00:38 For me it is mostly Line 335 Type mismatch when scrubbing the CurrentPosition slider.
Line 335 Type mismatch.PNG
How about a color picker?
ColorPicker.PNG
I can slide all day long and not get an error. Are you sure there are no other steps to reproduce the error?
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Ramp texture

Post by trueBlue »

Maybe if you create a ramp below the highest ramp?
If I just create a few ramps, then I can scrub all day long too!

If I take your button script into a JScript and run a syntax check, you'll see why I suggested a change from the previous post.
ButtonScript.PNG
User avatar
clintonman
Captain
Posts: 5430
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: 12 Feb 2020, 01:14 Maybe if you create a ramp below the highest ramp?
If I just create a few ramps, then I can scrub all day long too!

If I take your button script into a JScript and run a syntax check, you'll see why I suggested a change from the previous post.
ButtonScript.PNG
%MOUSE%, %COLOR_R% etc. don't work inside scripts. They only work in the script section of the UI tools.
I copied and pasted your earlier code and it didn't work. That's why I said it doesn't work.

What does it mean to create a ramp below the highest ramp? I'm guessing this is giving you errors?
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Ramp texture

Post by trueBlue »

Here is the Ramp object with error
Attachments
Ramp.RsObj
(616.07 KiB) Downloaded 182 times
User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Ramp texture

Post by clintonman »

Thanks.
Clinton Reese

http://clintons3d.com
Post Reply