is there any possible way to switch numbering of an image sequence inside an rgbimage node´s filename parameter by a vertex attribute?
e.g. it´s perfectly possible to do something like
C:/filename_`padzero(3,$F)`.tga
for shure, but how to use an attribute instead of "$F"?
any ideas highly welcome!
& many thanks in advance!!
OSL is not working for this right? As i would need to select out of 50+ images
best
jn
any way to switch rgbimage of sequence by attribute
Moderator: juanjgon
i now have part of the solution,
i got an OSL Texture shader to display one image out of a sequence, triggered by a value,
as shown in the screenshot
but when i plug in a vertex attribute with the same value it stops working ...
but WHY?
(i used a vector value because i learned that osl doesn´t understand float vertex input somehow)
and also there seems to be no string format() function in OCTANE OSL ...!?!
i tried the following instead of using the hscript index-replacement, but with no success:
format("$HIP/FOOTAGE/seq/test_%i.png",int(idx[0]));
many thanks for any ideas!!
best
jn
i got an OSL Texture shader to display one image out of a sequence, triggered by a value,
as shown in the screenshot
but when i plug in a vertex attribute with the same value it stops working ...
but WHY?
(i used a vector value because i learned that osl doesn´t understand float vertex input somehow)
and also there seems to be no string format() function in OCTANE OSL ...!?!
i tried the following instead of using the hscript index-replacement, but with no success:
format("$HIP/FOOTAGE/seq/test_%i.png",int(idx[0]));
many thanks for any ideas!!
best
jn
Sorry, currently Octane doesn't support string attributes, and I'm not even sure if OSL supports input parameters from attributes. Perhaps you could create an OSL shader including all your texture files and a float input to select them from a float attribute, but as I've said you should check if OSL supports inputs from attributes, I'm not sure about this right now.
Thanks,
-Juanjo
Thanks,
-Juanjo
hi juanjo,
thanks for your reply!
i think you`re right,... load all tex into osl and then select by attrib should work...
by now i can tell that vertex attribs work in osl but only VECTOR not float (don`t know why)..
as in the following setup:
shader OSLTexture(
color a=0,
color b=0,
color c=0,
color index = 0,
output color out = 0
){
color indx[3] = {a,b,c};
out = indx[int(index[0]*3)];
}
best
jan
thanks for your reply!
i think you`re right,... load all tex into osl and then select by attrib should work...
by now i can tell that vertex attribs work in osl but only VECTOR not float (don`t know why)..
as in the following setup:
shader OSLTexture(
color a=0,
color b=0,
color c=0,
color index = 0,
output color out = 0
){
color indx[3] = {a,b,c};
out = indx[int(index[0]*3)];
}
best
jan