Matcap shader for Softimage
Plugins linking to this thread: (hide)
Matcap shader for Softimage
[..] I've banged together a Matcap shader (aka litsphere) in metaSL which works in the Softimage High Quality viewport.
You know how in Zbrush models look kind of like clay or other materials as you work
on them? That's Matcap shading.
It's provided "as-is" but since its metaSL it should work for everyone regardless of graphics card as well as look the same in HQ/real time, and mental ray. That's the theory, anyway.
local backup: litsphere_packaged.xsiaddon"
It's provided "as-is" but since its metaSL it should work for everyone regardless of graphics card as well as look the same in HQ/real time, and mental ray. That's the theory, anyway.
local backup: litsphere_packaged.xsiaddon"
Re: Matcap shader for Softimage
Thanks!
Re: Matcap shader for Softimage
yeah I remember when decent matcaps first came out on zbrush, 28th May 2007 it was. tried them as images applied to the greyball type shader in SI from that very repository and was like 'meh' seems they have come back again! think it was just the MR shader version though so do not recall a realtime one, not had the pleasure of it in the viewport. I see it like the spongebob squarepants replacement skin for the viewcube. really cool to try a few of the different skins out but the novelty soon wears off. think last time I got as far as green Jelly or tomato. the clay one is the best and as Andy says there is a lot of potential for NPR type stuff. but I dont do any sculpting much in the viewport so I may be biased and viewcube is OFF.
Gossip is what no one claims to like, but everybody enjoys.
Re: Matcap shader for Softimage
You have a point, a clay MetCap would be useful. I'll still use it occasionallyTekano wrote:yeah I remember when decent matcaps first came out on zbrush, 28th May 2007 it was. tried them as images applied to the greyball type shader in SI from that very repository and was like 'meh' seems they have come back again! think it was just the MR shader version though so do not recall a realtime one, not had the pleasure of it in the viewport. I see it like the spongebob squarepants replacement skin for the viewcube. really cool to try a few of the different skins out but the novelty soon wears off. think last time I got as far as green Jelly or tomato. the clay one is the best and as Andy says there is a lot of potential for NPR type stuff. but I dont do any sculpting much in the viewport so I may be biased and viewcube is OFF.
Re: Matcap shader for Softimage
Hi thanks for the shader.
Helge Mathee also did a MatCap shader 2009 I think. Which I used a bit. So I attached it if anyone wants to take a look.
I got a collection of textures. The zip got 13MB so I would need a filehoster if anyone is interested, its over the limit of the forum attachments.
PS: Is there a way to install the msl over a workgroup ?
Just putting it in Application\phenolib\msl on a workgroup didn´t work.
Moderator edit: Filehoster? Ha! - HB
The aforementioned file in three pieces...
MatCap_materials.part1.rar
MatCap_materials.part2.rar
MatCap_materials.part3.rar
Helge Mathee also did a MatCap shader 2009 I think. Which I used a bit. So I attached it if anyone wants to take a look.
I got a collection of textures. The zip got 13MB so I would need a filehoster if anyone is interested, its over the limit of the forum attachments.
PS: Is there a way to install the msl over a workgroup ?
Just putting it in Application\phenolib\msl on a workgroup didn´t work.
Moderator edit: Filehoster? Ha! - HB
The aforementioned file in three pieces...
MatCap_materials.part1.rar
MatCap_materials.part2.rar
MatCap_materials.part3.rar
- Attachments
-
- Helge Mathee_MatCap_shader.7z
- (1.74 KiB) Downloaded 371 times
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Matcap shader for Softimage
Perhaps - I haven't tested this however - equivalent/analogous to the workgroup location of (unsupported legacy) cgfx files in a new folder "[workgroup]\Application\msl\".Firebird wrote:PS: Is there a way to install the msl over a workgroup ?
Just putting it in Application\phenolib\msl on a workgroup didn´t work.
Spoiler alert: THIS IS HOWEVER PURELY GUESSWORK ;)
Stay safe, sane & healthy!
Re: Matcap shader for Softimage
Softimage crashes everytime I use this shader on High Quality Viewport
I did what the readme states, I connected this shader to the surface port on the material, wait a few seconds, Softimage crashes.
Here is the Matcap shader as seen on a sphere, which surprisingly enough didn't crash softimage, although I doubt it should look like a texture image is applied to the sphere, even if it is meant to be a reflection map, unless I'm missing something, there is no reflection port on the material node ?
I did what the readme states, I connected this shader to the surface port on the material, wait a few seconds, Softimage crashes.
Here is the Matcap shader as seen on a sphere, which surprisingly enough didn't crash softimage, although I doubt it should look like a texture image is applied to the sphere, even if it is meant to be a reflection map, unless I'm missing something, there is no reflection port on the material node ?
Re: Matcap shader for Softimage
Not sure why you are experiencing crashes, but I suspect it has to do with graphics card issues, I have a machine which has crashed with the shader a fair bit, using an AMD card, while others with nVidia cards seem solid.
The texture you see there is just a stand-in texture I pointed at since everyone should have it (I should make it the noicon img.... There are no matcap textures included and I didn't want to package this as an addon just to install one. You'll need to DL one and replace the texture, or use one from this forum.
It's perfectly ok to use the matcap in the diffuse slot of a material like a constant, if that is stable for you. It should still look right, and you can then do interesting stuff like make the surface reflective, which might look cool. Or you can use it with other combinations, the shader is just outputting color.
So the image you show may be working right, and only need a matcap image instead of that one. That's all a matcap really is, it's a texture of a particular type, mapped to the object according to the relationship between the surface normals and the camera. That's why it is such a good choice for tools like zBrush which have to shade millions of polygons in real time - they can make meshes look like they have cool lighting with almost no processing cost.
I hope that helps a little!
The texture you see there is just a stand-in texture I pointed at since everyone should have it (I should make it the noicon img.... There are no matcap textures included and I didn't want to package this as an addon just to install one. You'll need to DL one and replace the texture, or use one from this forum.
It's perfectly ok to use the matcap in the diffuse slot of a material like a constant, if that is stable for you. It should still look right, and you can then do interesting stuff like make the surface reflective, which might look cool. Or you can use it with other combinations, the shader is just outputting color.
So the image you show may be working right, and only need a matcap image instead of that one. That's all a matcap really is, it's a texture of a particular type, mapped to the object according to the relationship between the surface normals and the camera. That's why it is such a good choice for tools like zBrush which have to shade millions of polygons in real time - they can make meshes look like they have cool lighting with almost no processing cost.
I hope that helps a little!
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Matcap shader for Softimage
Hi Andy, thanks for the shader.
You forgot to mention your previous blog on this subject which is very interesting too so to put them together:
http://andy.moonbase.net/archives/1037
http://andy.moonbase.net/archives/651
Always liked your blog. Keep it coming!
Cheers!
Dan
You forgot to mention your previous blog on this subject which is very interesting too so to put them together:
http://andy.moonbase.net/archives/1037
http://andy.moonbase.net/archives/651
Always liked your blog. Keep it coming!
Cheers!
Dan
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Matcap shader for Softimage
It worked beautifully on a sphere using one of the MetCap images that firebird had uploaded. It failed on every other object, rather Softimage crashed. I loaded a character mesh, made sure the Subdivide level was at zero, applied the shader, high quality viewport was on, Softimage crashes. All this on a nVidia card, makes no sense, ATi, yes, not nVidiaMatic wrote:Not sure why you are experiencing crashes, but I suspect it has to do with graphics card issues, I have a machine which has crashed with the shader a fair bit, using an AMD card, while others with nVidia cards seem solid.
The texture you see there is just a stand-in texture I pointed at since everyone should have it (I should make it the noicon img.... There are no matcap textures included and I didn't want to package this as an addon just to install one. You'll need to DL one and replace the texture, or use one from this forum.
It's perfectly ok to use the matcap in the diffuse slot of a material like a constant, if that is stable for you. It should still look right, and you can then do interesting stuff like make the surface reflective, which might look cool. Or you can use it with other combinations, the shader is just outputting color.
So the image you show may be working right, and only need a matcap image instead of that one. That's all a matcap really is, it's a texture of a particular type, mapped to the object according to the relationship between the surface normals and the camera. That's why it is such a good choice for tools like zBrush which have to shade millions of polygons in real time - they can make meshes look like they have cool lighting with almost no processing cost.
I hope that helps a little!
Re: Matcap shader for Softimage
Thanks Hirazi that worked.Hirazi Blue
Perhaps - I haven't tested this however - equivalent/analogous to the workgroup location of (unsupported legacy) cgfx files in a new folder "[workgroup]\Application\msl\".
Spoiler alert: THIS IS HOWEVER PURELY GUESSWORK
Sadly I also got some random crashes with the shader.
Didn't had much time to test when and why, the HQV worked most of the time (sometimes I got a crash when changing the texture image, but I think thats HQV relatet) but the mr render failed (renders black, or crash to Desktop).
Also on Nvidia here. 580GTX.
Re: Matcap shader for Softimage
@daniel thanks for the kind words!
Re: crashes
I'll look into it. As far as I can tell I'm not doing anything I shouldn't in the shader, which is pretty tiny. But clearly there's an issue somewhere.
I planned on a better version eventually with a bit more to it - maybe I'll avoid metaSL entirely, I'm wondering if its crashing during the compilation phase. It would be nice if we could have matcaps in a normal shaded/texture view, too... I hate waiting for the HQ viewport when you first enter it.
Re: crashes
I'll look into it. As far as I can tell I'm not doing anything I shouldn't in the shader, which is pretty tiny. But clearly there's an issue somewhere.
I planned on a better version eventually with a bit more to it - maybe I'll avoid metaSL entirely, I'm wondering if its crashing during the compilation phase. It would be nice if we could have matcaps in a normal shaded/texture view, too... I hate waiting for the HQ viewport when you first enter it.
Re: Matcap shader for Softimage
I also have regular crashes when I go to render in MR. Not every time but about half the time. It gives and error, I'll record it next time. Also noticed the texture mapping is not the same in MR as in the viewport. I'll get some samples.
This shader has really made the viewport far easier to work with in the modeling phase, It actually made the HQV useful
If possible it would be nice to have it in the other modes as well (because of the HQV delay) but overall I really like this shader.
This shader has really made the viewport far easier to work with in the modeling phase, It actually made the HQV useful
If possible it would be nice to have it in the other modes as well (because of the HQV delay) but overall I really like this shader.
Re: Matcap shader for Softimage
I don't know if this helps but I get this error with the render region:
// WARNING : SHDB 0.2 7 MB warn 732777: W216 C:\Program Files\Autodesk\Softimage 2013 SP1\Application\phenolib\msl\litsphere.msl(16): warning: useless explicit cast to "float"
// WARNING : SHDB 0.2 7 MB warn 732777: W216 C:\Program Files\Autodesk\Softimage 2013 SP1\Application\phenolib\msl\litsphere.msl(16): warning: useless explicit cast to "float"
// ERROR : API 0.2 7 MB error 301099: while defining texture "MI_default_texture_relief_map_1_height.dds": failed to open texture file relief_map_1_height.dds
Here's a couple renders as well, MR and viewport (bottom). The texture projection is definitely different somehow. Perhaps something isn't translating there.
// WARNING : SHDB 0.2 7 MB warn 732777: W216 C:\Program Files\Autodesk\Softimage 2013 SP1\Application\phenolib\msl\litsphere.msl(16): warning: useless explicit cast to "float"
// WARNING : SHDB 0.2 7 MB warn 732777: W216 C:\Program Files\Autodesk\Softimage 2013 SP1\Application\phenolib\msl\litsphere.msl(16): warning: useless explicit cast to "float"
// ERROR : API 0.2 7 MB error 301099: while defining texture "MI_default_texture_relief_map_1_height.dds": failed to open texture file relief_map_1_height.dds
Here's a couple renders as well, MR and viewport (bottom). The texture projection is definitely different somehow. Perhaps something isn't translating there.
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Matcap shader for Softimage
The errors ring a bell ....I don't know if this helps but I get this error with the render region:
// WARNING : SHDB 0.2 7 MB warn 732777: W216 C:\Program Files\Autodesk\Softimage 2013 SP1\Application\phenolib\msl\litsphere.msl(16): warning: useless explicit cast to "float"
// WARNING : SHDB 0.2 7 MB warn 732777: W216 C:\Program Files\Autodesk\Softimage 2013 SP1\Application\phenolib\msl\litsphere.msl(16): warning: useless explicit cast to "float"
// ERROR : API 0.2 7 MB error 301099: while defining texture "MI_default_texture_relief_map_1_height.dds": failed to open texture file relief_map_1_height.dds
MetaSL specification.
http://www.nvidia-arc.com/fileadmin/use ... ar2011.pdf
For those interested in coding MetaSL shaders, here is a resource site
http://www.metasl.org/
MetaSL Shaders Library
http://materials.mentalimages.com/
@Matic
I'll have a look at your code.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Re: Matcap shader for Softimage
The crashes are annoying, one thing I noticed MetaSL shaders don't respond to light reaction.
- Daniel Brassard
- Posts: 878
- Joined: 18 Mar 2010, 23:38
- Location: St. Thomas, Ontario
- Contact:
Re: Matcap shader for Softimage
@ ActionArt and Matic,
I modified the program a bit, try this one and let me know how it work. Modification made:
@ Falam
Correct, the light interaction will have little influence on the Matcap, this is intended and the correct behaviour. See it as a baked light texture.
The shader is intended for use in modeling/sculpting ala Mudbox/ZBrush.
I modified the program a bit, try this one and let me know how it work. Modification made:
- Removed the hardcoded texture "relief_map_1_height.dds".
Modify the soft_range parameter by removing the float type inside the parenthesis
some cleanup of the code.
@ Falam
Correct, the light interaction will have little influence on the Matcap, this is intended and the correct behaviour. See it as a baked light texture.
The shader is intended for use in modeling/sculpting ala Mudbox/ZBrush.
- Attachments
-
- litsphere_v1_1.zip
- (783 Bytes) Downloaded 160 times
Last edited by Daniel Brassard on 22 Feb 2013, 22:45, edited 1 time in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif
set "Softimage" "true"
$endif
Who is online
Users browsing this forum: No registered users and 18 guests