Author Topic: MDL - where is component selector etc...  (Read 651 times)

Where is the component selector?  --
ie.. a(float3) 
a.x 
a.y
a.z

same goes for every class of varible...


Where is the color conversion
color -> HLS   
HLS -> color

and of cource the color component selectors
HLS.h
HLS.l
HLS.s

etc...

IN fact -- would it be too much to ask for a script node so we can just type in code directly.


Have you seen the function graph or pixel processor? While it's not a perfect solution, it does contain the answer to your questions.

EDIT: Apologies, missed the MDL header.
Last Edit: June 19, 2018, 10:33:03 pm

Quite familar with Function Graph and Pixel processor -- completly different things which dont address my current tests.

MDL stands out as an anomaly (and opportunity) in SD at present -- it's a shader authoring feature -- something SD has not had before... but it appears to be missing substantial and neccessary functionality in this first implimentation.

There's a float<234>(float,float,...).x function/node (and y, and z and w with float3 and float4 respectively).
There's also a float<234>@(float,int) array operator to get components from their index (0 based) (see MDL specification 6.8.3).
You can access both with the spacebar menu or when creating a link from a vector node. I think they were omitted in the "right click->Add Node" menu because listing all functions defined by the MDL spec in that menu would have made it huge and unpractical (although admittedly omitting those operators was a bit too much).

You can't access color components directly though, you have to convert them to a float3 first (per MDL specification, 6.8.1 and 6.11).

Rhanks Cyrille  -- I'll give those a trial tonight.

FYI -- I am loking into the usability of MDL for protyping shaders that may then get implimented elsewhere as HLSL etc.