Page 1 of 1

Add a material to Ribbons op?

PostPosted: Tuesday, 12.June 2012, 21:58
by Skinnytorus
Hey, guys.
Maybe I'm dumb, but I don't see any way to apply a material to Ribbons. Always get 'Too many inputs' error.
It seems that no input is expected for this op. I can't even change the ribbon's color!!! ](*,)
Has anybody tried that?

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 06:28
by ikam
When you look in the wiki (button on top of param windows) ribbons doesn't have any Input. So I think it's not possible to assign it a material.

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 07:05
by Skinnytorus
hi, ikam.
Sorry to hear that, man. :( That makes such a nice op pointless...
Maybe something could be done with the source code?
At least we have a good example: yellow op 'Wave noise' or something called like that (i don't have wz4 on this PC)
that well accepts simple mat input.

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 07:24
by ikam
I''ve take a look into the code and add to ribbons a material to see...

there is 2 problems :

- texture are not correctly mapped (it's ok with a text2Dsurround)
- and the back sides of ribbons are not visible (you can turn on doubleside in material but the back remain black, maybe be a normals pb, however we can change black color with the modlight color parameters)

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 07:57
by Skinnytorus
Yeah, many thanks. At least something.
Will you post a pull request for this tweak?

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 08:15
by ikam
just need to clean the code and fix some stuffs.
I'll post a build here if you want test it ;)

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 08:26
by Skinnytorus
Cool. It would be just wonderful if you could add the same to Ribbons2 and add double normals
so that both sides of the ribbon could have a material. As for the build - please post it, though I will be able to test it
only in about 9 hours when I get home from work.

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 13:26
by ikam
Hi

Done for Ribbons and Ribbons2.
I've fixed UV coords, now text2d are correctly mapped on both.

I didn't found any solution to set by default visible backside (its' a backface face culling problem, and it's seems that the used material doesn't have a flag to specify no culling, maybe ryg know how to do...). However it is not annoying because you can set on doubleside in materials.

Here the build and an example.

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 14:28
by Skinnytorus
yeeey! thanks, man. =D>
i will check this out as soon as i'm home and revert to you asap.

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 18:39
by Skinnytorus
Hi!
I have checked out the build and your test file, went through several stacks I can think of and... yes! It just works as you described.
As for the face culling problem, I think we should ask ryg what can be done. So, we are ready for the pull request! Congrats. Well done! And... thank you! \:D/
PS Added some stacks to your example.

Re: Add a material to Ribbons op?

PostPosted: Wednesday, 13.June 2012, 20:05
by ikam
Thanks. Interesting examples.