Jump to content
3DCoat Forums

NODES: Replace 'Mapping' with 'XYZ Sliders'


Recommended Posts

  • Member

Replacing the MAPPING node with several 'XYZ Vector Slider' nodes - would be helpful - give more finite control if it were possible to configure the maximum-minimum values with an IMPUT data-value at each end of the slider.

See attachment:
Replace XYZ

ReplaceXYZ.gif

Link to comment
Share on other sites

  • Member

You can get the XYZ values of the UV by using a "Separate XYZ" node:

image.png.c1b2db42e6e6e8c407e399799ebaced9.png

But to adjust these nodes manually I guess you have to use a script node using an OSL script. I have no knowledge about writing OSL though. Maybe this can help you.

Another idea:

Create a Group with this setup (Create the node setup, select all and press Ctrl +G to group them:

image.png.f2bb640a5aec9b55ba50f535dbd9ff19.png

You can drag t he Group Output nodes to the second input of each Math node.

Maybe playing around with the Math node can help you out here. The final group can be used like this:

image.png.e1aefba643ba1bc1c1f3032733037da7.png

 

 

Link to comment
Share on other sites

  • Member

WOW~! Gee! These ideas are GREAT... brilliant ideas! Thank you! I was just wondering how difficult it is to learn Python to write these... ha-ha!

Here's my current configuration:

currentConfig.gif

Edited by fractionalist
adding Python Node Code
  • Thanks 1
Link to comment
Share on other sites

  • Member

I believe this is the code for writing a slider node for 3dCoat - Python?

http://effbot.org/tkinterbook/scale.htm

 

The Tkinter Scale Widget

The Scale widget allows the user to select a numerical value by moving a “slider” knob along a scale. You can control the minimum and maximum values, as well as the resolution.

Link to comment
Share on other sites

  • Member

Hi. Tkinter is Python's standard GUI Library. It will not work in Blender since Blender has it's own GUI Framework called GHOST that's developed with OpenGL calls.

I did not look into Blender's Python API that deep but the only way to come up with a single slider node seems to be OSL scripting.

Maybe someone at the official Stack Exchange has another idea. :)

BTW.: What do you mean with "3DCoat Python"? AFAIK 3D Coat has AngelScript support (or even direct C++ API). Please correct me if I am wrong. 

Edited by Haunted
Link to comment
Share on other sites

  • Member

I'd like to get code similar to this to add a NODE VECTOR SLIDER to 3dCoat - any ideas?

from Tkinter import *

master = Tk()

w = Scale(master, from_=0, to=100)
w.pack()

w = Scale(master, from_=0, to=200, orient=HORIZONTAL)
w.pack()

mainloop()

To query the widget, call the get method:

w = Scale(master, from_=0, to=100)
w.pack()

print w.get()

The default resolution is 1, which causes the widget to round all values to the nearest integer value. You can use the resolution option to specify another resolution; use -1 to disable rounding.

w = Scale(from_=0, to=100, resolution=0.1)
Edited by fractionalist
adding code content (link)
Link to comment
Share on other sites

  • Member

 

I'm in Mainland China - the Firewall here blocks the Java so I can't log into Stack Exchange... to post - perhaps someone else could see if there's a possibility to locate a vector slider - or the code?

ERROR MESSAGE 

Blender Stack Exchange requires external JavaScript from another domain, which is blocked or failed to load.

http://www.outpostpm.org/scripts/index.html  or here OSL Script node: Slider with value range between 0 and 1 (like Fac) https://blender.stackexchange.com/questions/48821/osl-script-node-slider-with-value-range-between-0-and-1-like-fac are some hope for blender slider code...?

PS I wrote 3dCoat - meant Blender!

This may be the answer: https://blender.stackexchange.com/questions/40770/possible-to-control-a-driver-from-a-group-node-input-slider

Edited by fractionalist
Link to Blender Vector Slider Node Code
Link to comment
Share on other sites

  • Member

Hi,

did your try posting your question here: http://www.blenderartists.org/ ?

Except my solution with groups to control each X Y Z value separate I posted above, I can't help you with the OSL. Maybe someone at blenderartists forum can help you out to get the math done the way you want.

Check out this one:

https://blender.stackexchange.com/questions/58426/use-another-node-to-control-vector-mapping/58428

 

Edited by Haunted
Link to comment
Share on other sites

  • Member

Hi Haunted,

Thanks for the tip! Actually, being behind the GREAT CHINESE FIREWALL makes it difficult to get onto Stack, or anywhere outside the Great Wall... however, after awhile I managed to get a post on the group you suggested, thanks again.

Cheers,

Ced

Link to comment
Share on other sites

  • Member

Iyad,

You're a genius, very nice work!

Instead of having one MAPPING Node which contains the Vector Slide commands ALL-IN-ONE, I'd prefer to have (3) texture VECTOR-SLIDER NODES, insomuch, what I'm after a proprietary NODE SLIDER for each of the following actions:

  1. DOLLY
  2. PAN
  3. ROTATE

You designed & built FOUR separate proprietary VECTOR SLIDER nodes for the above functions?

Something like this (See Attachment)

Thank you - a miracle!

 

panRotateDolly.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...