|
created Stylistic CGFX Shader
on 10-05-2010 07:58 AM
Hey guys,
I'm preparing for a Shader course I'm going to hold and I wanted to make a showcase video to inspire the students for a stylistic shader project assignment.
Thought I'd share my results with you.
Please do give me some feedback. I'm still open for modifying this. If anyone wants to play around with it I can make the project available.
Last edited by kodde; 10-05-2010 at 08:02 AM..
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
PLEASE MAKE THIS SHADER WORKING WITH MAXS!!!11!!11
|
, triangle,
379 Posts,
Join Date Jun 2009,
|
Looks awesome, I'd love to see this working in Max as well. :p
|
, polycounter,
1,231 Posts,
Join Date Feb 2010,
Location Florianópolis - Brazil
|
There's really nothing that should be Maya specific about it, and if there is I can try the "3D Studio Max" export preset from Mental Mill.
I'll share the project for you guys tomorrow when I'm at work. Don't have the files here.
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
Wish I was in your course Kodde  Looking good.
WebGL Project - In a state of constant flux so might be down when you check it. Pretty old now.
Junior Technical Artist at Digital Extremes.
|
, dedicated polycounter,
1,859 Posts,
Join Date Nov 2009,
Location Toronto
|
it would be cool to see some experimentation with computational methods (instead of relying on texture). there are some good examples from renderman.
google search result:
http://www.cs.unc.edu/~feasel/classes/238/238hw4.html
|
, spline,
196 Posts,
Join Date Nov 2009,
Location Boston, MA
|
haiddasalami> I'd welcome you if there was a way. Have been contemplating on doing some Mental Mill tutorials. But I doubt that many would find them useful as Mental Mill does not seems that widespread. It's not something every enthusiast has in their arsenal of software.
chronic> That seems mighty fancy. I'm going to look into it a bit. Seems like a good way to go if you know exactly what type of crosshatch you want. Do you figure this is less performance requiring? First thing that struck me was "this sounds expensive". But I have only breezed through it.
The nice part about having it a texture as it is now is your end user artist can play around with whatever tileable pattern they like.
Last edited by kodde; 10-05-2010 at 11:13 PM..
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
Alright here's two exported versions, one CGFX for Maya and one FX for Max. I have not been able to confirm if the Max version works. I exported with the 3D Studio Max preset from Mental Mill. There's also some crosshatches and two ramps included if you want to try them out. The hatches aren't all perfectly tiling.
Download link
One important thing to set up correctly is the UV set for the hatch texture. It uses a different UV set than the base texture. Texcoord0 is for the base texture and texcoord3 is for the hatch texture. You probably need to manually change the texcoord3 parameter when loading the shader.
My Mental Mill had crashed yesterday so I had to redo a few features, also included normal map support and two additional directional lights in this version.
Please let me know if this works in Max. Also, please do share any cool results you might get out of this
Also tried three new crosshatch patterns.
One idea I have is to use several different hatch patterns for different levels of luminosity.
Last edited by kodde; 10-06-2010 at 12:03 AM..
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
now mix them hatching by the amount of blackness in the shading ^^
so it gets hatched on light shading, crosshatched on darker values and very tight crosshatched on the very dark parts! very nice work man 
|
, veteran polycounter,
3,192 Posts,
Join Date Sep 2006,
Location Berlin Germany
|
Quote:
Originally Posted by Neox
now mix them hatching by the amount of blackness in the shading ^^
so it gets hatched on light shading, crosshatched on darker values and very tight crosshatched on the very dark parts! very nice work man 
|
Working on it as we speak!
If I implement this, will you try it for me in Max? ;)
Want to know if the Mental Mill export works well with Max.
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
when i'm at home i can definitely do it, hm menta mill, does that mean you could even render it? that'd be great ^^
|
, veteran polycounter,
3,192 Posts,
Join Date Sep 2006,
Location Berlin Germany
|
This would probably look better with hand drawn hatches. Right now it's just my test textures. Unfortunately does not have flexibility to set your own amount of hatches. You don't have to use all three levels/hatches though.
Download Link
This version retains same functionality as the first one if you don't want to use multiple hatches.
neox> Would be nice if you could render this(suppose you mean offline render?). I think it should be possible. But I'm not sure how. I can save as .xmsl files or export to .cgfx/.fx. I think Mental Mill is supposed to save to a native format for 3DSMax. Does max load .xmsl files?
Last edited by kodde; 10-06-2010 at 02:35 AM..
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
Looks really nice, I wonder if somehow screen space normal could be used to warp the hatching to follow the form a bit. Maybe too fiddly. hmm.
|
, polycounter,
776 Posts,
Join Date Jan 2006,
Location UK
|
cw> My initial idea was to get the feel of a 2D comic in that the crosshatch would not wrap around the form, it would always be planar aligned with the camera. That's also what I'm doing at the moment through a planar projection in Maya. Feeding the camera values to the projection and thereby making the hatch follow the camera.
You could just use a regular static UV set for this, but you would have problems with seams. Is this the look you mean? Or some hybrid between a planar projection following the camera but being a bit bent?
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
Yeah I was trying to think of a cunning way not to use the uvs of the model as is because of any pixel density problems or seam problems. I shall stop criticising now! 
|
, polycounter,
776 Posts,
Join Date Jan 2006,
Location UK
|
Quote:
Originally Posted by cw
Yeah I was trying to think of a cunning way not to use the uvs of the model as is because of any pixel density problems or seam problems. I shall stop criticising now! 
|
Sorry if I came of sounding defensive about the matter. Please do share ideas and suggestions. I still have your idea in the back of my head, not sure how what to do with it yet.

|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
No I didn't take it that way, honestly, I just have a habit of never being satisfied with awesome things, and thinking of twiddles and tweaks. It's so ingrained in my nature these days. 
|
, polycounter,
776 Posts,
Join Date Jan 2006,
Location UK
|
bloody hell the warp placement ramp is the missing piece i needed for getting it to work in unreal back when i tried doing this effect for airborn! so simple so great, haha
|
, veteran polycounter,
3,192 Posts,
Join Date Sep 2006,
Location Berlin Germany
|
dude! this is awesome!
|
, triangle,
379 Posts,
Join Date Jun 2009,
|
zxman> Thanks!
Did you or anyone else for that matter the Max version a try? Does it work well? All the parameters and slots show up properly and function well?
I'm a Maya user and don't really have access to 3DSMAX, curious to know if Mental Mill easily exports to Max as well. Would be nice to publish for a broader mass.
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
Hi kodde, your shader looks awesome!..I give it a try in Max 2010 and here is the screen grab of the material editor parameter...
First of all, some of the text got crop off by the texture slot..probably you can shorten the name/ text by removing the "msl_Sketchy_1_" on the text, leaving only the the "base/ ramp/ etc". I don't know how it suppose to looks like in Maya, so I can't really tell is there any missing part on the parameter or not.
Second, it seems like put the shade on the highlighted area (probably my fault not putting the correct map on correct slot though)..
*Model download from the internet.
Based on the list position top to bottom..
msl_Sketchy_1_bas ............. [ robbie.tga ] ---> base texture
msl_Sketchy_1_ram ............. [ ramp05.png ]
msl_Sketchy_1_ram ............. [ rampSketch05.png ]
msl_Sketchy_1_nor ............. [ skethDanny.004.png ]
msl_Sketchy_1_dar ............. [ hatchDark01.png ]
msl_Sketchy_1_med ............. [ hatchMedium01.png ]
msl_Sketchy_1_ligh ............. [ hatchLight01.png ]
The rest of the setting is still the default..
And owh, it's a mirrored UV..the right one you notice the seam in the middle.
Looking forward for more updates on this!
_Revel
|
, triangle,
362 Posts,
Join Date Apr 2010,
Location Kuala Lumpur, Malaysia
|
Revel>
Thank you for trying it out.
There's one parameter missing in your screenshot there which shows up in Maya, which is called "invertY". What it does is pretty much turn the ramp textures upside down if you check it. I think that's why you would need to enable judging by your screenshot. The reason for the parameter not showing is probably because it doesn't have any UI code.
The reason for the long names comes from Mental Mill's naming conventions. That's what I dislike the most about working in that program, it doesn't give you any clean and working UI code when exporting to Max/Maya. I'll add a new version asap which should fix these issues. Should just be some tweaking in a text editor.
Concering the mirrored UV. Did you use the texcoord3 UV set slot with a new UV set for the hatch? Do you have any slots called "texcoord0", "texcoord1", "texcoord2" and "texcoord3" in your material editor? You need to make a secondary UV set for the purpose of the hatch and link that to the texcoord3 slot. This enables you to eliminate any potential seams and also make a dynamic UV projection that follows the camera like I have in my example video (I suppose this is possible in Max as well).
Last edited by kodde; 10-07-2010 at 09:54 PM..
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
This download has an updated version for Max which should have a better UI with proper names and the invertY attribute showing up properly. That is unless I forgot some semi colon or something alike when editing it in Notepad++
Download link (Maya 002 and Max 003 versions)
|
, dedicated polycounter,
1,366 Posts,
Join Date Dec 2004,
Location Malmö, Sweden
|
Thread HIJACK
I did a quick and dirty conversion of the renderman shader from my previous post - here is that in Maya. not gonna take this further, no free time for it - but those interested should also check out the Nvidia Shader Library, there are similar shader examples.
Edit: Im not gonna share this cgfx shader cause its just a pure copy of someone else's work - doesn't feel right, but it functions as a 'proof of concept'.
|
, spline,
196 Posts,
Join Date Nov 2009,
Location Boston, MA
|
The new 003 version is much organize UI there kodde 
Here it is if you haven't saw it before..
Btw, the invertY checkbox is named wrongly, it said "Hatch Pattern Tiling", same like the parameter above it..heheh..
Another thing I notice is that when I apply my normal map to my character, the face orientation/ normal is flipped and I have to purposely flip the normal of all the face in order for it to show the texture (I know it's not a mesh error because when I check it suing Max's xView "face orientation" feature it highlighting all the polys, means all polys flipped)
Is there anything that I should prepare before using your shader to display the hatch pattern?..because I still can't get a result like in your video..and..erm..I'm not sure I quite understand about the "texcoord UV set slot" or "secondary UV set" that you mention in your previous reply..Hope some other Max user can confirm about it working properly in Max or not.
_Revel
|
, triangle,
362 Posts,
Join Date Apr 2010,
Location Kuala Lumpur, Malaysia
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Copyright 1998-2012 A. Risch
|