Jump to content
3DCoat Forums

Shaders


Andrew Shpagin
 Share

Recommended Posts

  • Advanced Member
Problem solved. :)

It was in mcubes_rt.hlsl like:

int i =(int)(Depth * 255.0);

When compiling for Geforce 6 and 7 series cards, it becomes:

int i =ceil(Depth * 255.0);

That causes this issue. So I replaced all "(int)" with "floor"(already done in glsl code) then the problem was gone.

akira.

usage:

Extract the attached file into Shaders folder to replace the old one.

I tried it and I still get the circles on my Dell XPS, Nvidia 7950 GX2 card. :(

I have not tried it at home on my Mac Pro Nvidia 7300 card.

I hope we can get this working for all cards as well as rendering which does not work as well (I wonder if it is related in some way)

Link to comment
Share on other sites

  • Advanced Member
I tried it and I still get the circles on my Dell XPS, Nvidia 7950 GX2 card. :(

I have not tried it at home on my Mac Pro Nvidia 7300 card.

I hope we can get this working for all cards as well as rendering which does not work as well (I wonder if it is related in some way)

Sorry to hear that :(

I'll keep on looking for a solution for this.

Does these circles appear in GL version too?

Link to comment
Share on other sites

  • Advanced Member

Haha, your great. I noticed the darkside bug again and was about to post about it and here you are. Too fast for me. Thanks Akira! I also made my first own picmat shader yesterday evening based on Dave's bone shader but the highlight was much too harsh so i didnt post it. Very easy to do though just like you said. :)

3dioot

PS

Also bit sorry to say i still have rings on certain materials. :(

Link to comment
Share on other sites

  • Advanced Member
Ok, really I forgot to include new shaders. But now I have copied to distributive folder.

Thanks for great work!

About circles - my friend has PC with 6600, I will visit him soon.

Sorry I wasn't clear, not only the new shaders, but all of the PicMat shaders need to be updated.

I've corrected the darkside issue for these shaders in Oct.10 shader pack, please update them, thanks a lot. :)

regards,

akira.

Link to comment
Share on other sites

  • 4 months later...
  • Advanced Member

[unofficial] New shader: Cook-Torrance

Finally I've got some time to make shaders :).

I've implemented the well known Cook-Torrance shading model in 3DC, most of the time I just copy and paste the shader code described here:

http://wiki.gamedev.net/index.php/D3DBook:...)_Cook-Torrance

Installation:

Extract this file into 3D-Coat-3-00-ALPHA\Shaders\Custom, it will create a folder named "Cook-Torrance"

Usage:

1. Use the "red channel" of foreground color to control "roughness"

2. Use the "green channel" of foreground color to control "reflectance at normal incidence"

3. Use "background color" to change diffuse color value.

4. Other sliders act as their default function.

Some examples:

post-751-1234431661_thumb.jpg

Have fun!!

akira.

Cook_Torrance.rar

Link to comment
Share on other sites

  • Applink Developer

Thanks so much. I'm excited to play with your shaders. It is really nice shader. I really like how you can control the shader quite well. Where we can found all the function that we can use

to control our shaders. Like in this example BackColor would be perfect to control Spec color, but right now it is sacrifed to control spec intensity. can I ask you what Vdir and N means in the code?

Link to comment
Share on other sites

  • Applink Developer

Hi! nice update. The 3d-coat GL version there something wrong because when press increase resolution button it creates black circle. It's like toon shade which is nice but I don't think it is planned and if you hit increase gain the black cirlce gets bigger.Also in DX mode when you press increase resolution it dosen't work correctly anymore. It seems that how far camera is from object effect on this behavior.

Link to comment
Share on other sites

  • Advanced Member

Ok, solved the problem about black circle in GL version, please update files again and thank you for testing.

But I can do nothing about the clamped highlight problem now, it's because the view angle of camera(FOV) is set too high when increasing resolution,

it will be solved automatically the time when Andrew let us adjust FOV ourselves :).

Current walk around is to view in ortho-projection mode if you want to see the correct result in close-up view.

akira.

Cook_Torrance_V2.01.rar

Link to comment
Share on other sites

  • Applink Developer

Thanks! I have found an interesting problem. If you create two layers and in both layers there is sculpts that are using your shader. You can change spec intensity by indivitual layer, but when it comes to diffuse color(backcolor) it is the same to both layers. Is is maybe how the program works. Or can you change your shader code to fix it.

Link to comment
Share on other sites

  • Advanced Member
Thanks! I have found an interesting problem. If you create two layers and in both layers there is sculpts that are using your shader. You can change spec intensity by indivitual layer, but when it comes to diffuse color(backcolor) it is the same to both layers. Is is maybe how the program works. Or can you change your shader code to fix it.

I'm afraid I can't fix it.

Hey Andrew, can you please store BackColor individually for each node of the voxel tree like you did for CurrColor? I think it is the only way to solve this problem.

akira.

Link to comment
Share on other sites

  • Advanced Member

A naive question about shaders from a non Zbrush/Mudbox guy:

I see that those are useful for an attractive realtime-display and allow for good -looking work in progress renderings.

Glossy shaders can help to judging if smooth areas are already smooth enough and rough/ dull ones can give us indication when we don't need to spend more work on certain areas.

But that are also their limits, right?

Or is it common practice to make the actual texture from a custom shader by painting it directly onto the mesh and fixing the seams of the box-projection.

What I basically would like to know - are they just display-helpers or can they do more?

Thanks, Holger

Link to comment
Share on other sites

It is mainly visual feature. BUT. Now there is "Quadrangulate and paint". There is only one step (2 days of work) between shaders and dropping rendered result from multiple views to painting mode.

Algoritm to be used:

Render mesh in some projection, bring points from projection to texture (weight is more for forward - oriented faces), repeat this step from multiple projections.

But of course it are dreams... But they can become real...

Link to comment
Share on other sites

  • Advanced Member
It is mainly visual feature. BUT. Now there is "Quadrangulate and paint". There is only one step (2 days of work) between shaders and dropping rendered result from multiple views to painting mode.

Algoritm to be used:

Render mesh in some projection, bring points from projection to texture (weight is more for forward - oriented faces), repeat this step from multiple projections.

But of course it are dreams... But they can become real...

That again... sounds very interesting indeed... :)

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.

 Share

×
×
  • Create New...