Jump to content

Reading a CHOP into shader


Hazoc

Recommended Posts

Hello.

I was wondering if there's a method for SHOPs to read in a signal modeled in CHOPS while calculating displacement or some other shading ?

The thing is, I want to make a displacement shader for dew drops and I want to model the displaced profile of a water drop in CHOPs, instead of using a ramp parameter. I create the index (in this case the distance from a drop's center to the point being shaded) inside the shader and need to use that for sampling displacement values from the CHOP.

I guess at the end I could bake signals into 1d textures if nothing else works..

Link to comment
Share on other sites

Offhand, I don't see an easy way to do that. My first thought is to create as many ramp points as the number of samples and then adding in chopf() expressions in the ramp marker value parameters. For this approach, scripting will be necessary for any thing more than a few samples. Without thinking it too much, baking the textures in COPs and then using them in your shader might be easier.

Link to comment
Share on other sites

Thanks. The only reason I don't want to use ramp is that making slopes that are more like 1x1 than 10x1 is unintuitive. Plus I find it hard to get that nice dome-like form anyway with ramp knots. I was wondering if the new motion effects feature could be extended to support ramp modeling in the future.

post-1686-1240385642_thumb.jpg

Link to comment
Share on other sites

Yep, but the index value that I need to evaluate a channel at a given sample point is being produced inside a shader so it cannot be used to drive expressions set in the shader's parameters:) That's my problem.

Link to comment
Share on other sites

Yep, but the index value that I need to evaluate a channel at a given sample point is being produced inside a shader so it cannot be used to drive expressions set in the shader's parameters:) That's my problem.

I suppose you could bake your channel to an array. Rather crazy but doable...

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.

×
×
  • Create New...