Jump to content

Constant shader with pscale/alpha?


Recommended Posts

Hi all,

 

Ok, this is really confusing me.

 

I'm trying to render a pointcloud (as points under the Render>Geo tab of object) with a constant type shader which inherits the alpha & pscale value per point.

I'm doing this because I don't really want to light the scene (at all) to save render time - and the points just need to be graphical representations, rather than look like anything 'real'.

My issues are:

a: Point color always seems to be washed out in the render view compared to viewport. (Because of auto headlight generation I'd assume?)

b: The 'constant' shader doesn't allow for a per-point alpha (as far as I can tell), and must be lit to be seen.

 

What I'd like to a achieve:

I'd like a shader solution that inherits my user defined pscale & alpha & doesn't need to be lit.

 

Any suggestions? :)

 

(Massive apologies if this is a rookie thing, as I suspect it probably is. Maybe I'm not searching the correct terms in the help docs/here. I found this post about additive point rendering, but it's not quite what I'm looking for.)

Link to comment
Share on other sites

1 hour ago, meldrew said:

...

a: Point color always seems to be washed out in the render view compared to viewport. (Because of auto headlight generation I'd assume?)

b: The 'constant' shader doesn't allow for a per-point alpha (as far as I can tell), and must be lit to be seen.

...

file?

a: probably gamma difference, check your Edit/Color Settings/Color Correction and make sure all checkboxes are checked, as you want the same LUT to be applied everywhere if you want to see it correctly

b: constant material by default uses Cd attribute as a multiplier of Color parm, and Alpha attribute to multiply Opacity parm, so as long as you have any of them present on your geometry constant material will use it (you can as well disable this behaviour by unchecking Tint With Point Color and Use Point Alpha)

here is the example of points with pscale, Cd and Alpha attributes rendered with constant material

constant_mat_controlled_by_Cd_Alpha.hip

Link to comment
Share on other sites

20 hours ago, anim said:

file?

a: probably gamma difference, check your Edit/Color Settings/Color Correction and make sure all checkboxes are checked, as you want the same LUT to be applied everywhere if you want to see it correctly

b: constant material by default uses Cd attribute as a multiplier of Color parm, and Alpha attribute to multiply Opacity parm, so as long as you have any of them present on your geometry constant material will use it (you can as well disable this behaviour by unchecking Tint With Point Color and Use Point Alpha)

here is the example of points with pscale, Cd and Alpha attributes rendered with constant material

constant_mat_controlled_by_Cd_Alpha.hip

Hi Tomas,

 

Thanks for the response - Couldn't share a file before, but I now have a scene where I have a version of your setup with constant shader effecting alpha, alongside a version of my setup where it is not working.

 

I honestly can't tell what's wrong in the scene, I have replicated you process & I just can't get it rendering with the constant shader at all.

 

(my result is a blank C channel, with all points visible in alpha channel, with the same alpha value (or at least very similar).)

 

Sorry for being a little slow here... Is there something obvious I'm missing? This is really frustrating me.

 

Thanks for your time! :)

broken_const_shader.hip

Link to comment
Share on other sites

well, you have surface shader property added to your Object, which is overriding the actual material

so select your Object, go to cog menu/Edit Parameter Interface

scroll down and find Surface Shader (shop_surfacepath) parameter, select, delete, Accept, Done

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...