Isotropix Forums

How to use textured attribute values?

Discuss about expressions in Clarisse

How to use textured attribute values?

Unread postby atnreg » Sun Aug 18, 2019 1:04 pm

Hi!

Is it possible to use expressions to read textured values?

create light, make some instances
-custom attr 'exp_master'
-custom attr 'exp_adjust'
-expression exposure=get_double("exp_master")+get_double("exp_adjust")
-localize: exposure, exp_adjust

This works so that using exp_master I can adjust all light instances' exposures and then individually adjust the instance lights with exp_adjust.
BUT even if the exp_adjust is texturable, the texture (even constant_color) has no effect on expression, the direct value still does the adjusting so I was wondering if there is limit in expressions and textured values? Or is there some trick to get the textured value instead of direct value? :)

Thank you!
Antti
AMD Ryzen Threadripper 2990wx (32c/64t),64GB RAM,NVIDIA GTX 1080ti,Win10
Clarisse 4.0SP3,Blender2.80,Fusion360,ZBrush,Onyx,Houdini,SubstPnt...
Started: Clarisse 2016/10 (Py 2017/01), Python 2016/11
No business, just fun :)
atnreg
 
Posts: 507
Joined: Mon Sep 19, 2016 4:20 pm
Location: Helsinki, Finland

Re: How to use textured attribute values?

Unread postby dboude » Mon Aug 26, 2019 11:06 am

Hi,

I guess you cannot texture a double attribute. But I'm not 100% sure. dcourtois will be back soon (holiday) and will confirm (or not) that.

Cheers ;)
Démian
Isotropix
Technical Artist - Clarisse Specialist
User avatar
dboude
 
Posts: 1079
Joined: Mon Jul 03, 2017 10:51 am

Re: How to use textured attribute values?

Unread postby atnreg » Mon Aug 26, 2019 1:14 pm

Hi!

Ok, thanks, I just noticed that it does not work with color attribute either so the double may not be the problem.
To clarify things, here is example project which shows the problem :)

Please see the attached project:
box1: uses box1_mat material
box2: uses box2_mat material
box1_mat: base_color value is red (1,0,0) but texture comes from constant_color that has blue (0,0,1) color
box2_mat: base_color uses expressions get_vec3("box1_mat.base_color")[0], get_vec3("box1_mat.base_color")[1] etc.
constant_color: used as textured color for box1_mat
checker: not used but if used as texture for box1_mat, same result

Box2 should be blue but it is red.

How to get it correct or does the expressions really ignore textured values (which would be very sad but may be unavoidable because of how expressions work)? :shock:

Thank you :)
Attachments
textured_color_expression_problem.project
(55.17 KiB) Downloaded 6 times
Antti
AMD Ryzen Threadripper 2990wx (32c/64t),64GB RAM,NVIDIA GTX 1080ti,Win10
Clarisse 4.0SP3,Blender2.80,Fusion360,ZBrush,Onyx,Houdini,SubstPnt...
Started: Clarisse 2016/10 (Py 2017/01), Python 2016/11
No business, just fun :)
atnreg
 
Posts: 507
Joined: Mon Sep 19, 2016 4:20 pm
Location: Helsinki, Finland


Return to Expressions