Hi, just wondering what everyone was using these days to view their NM'd models in realtime. I'm using one I found from Ben Cloward, its a 3 light source, spec map shader for MAX. Not sure what everyone thinks is the best for games these days so I'd thought I'd ask.
Replies
i am second, any body have free and nice directx shader,
what working with normal maps, alpha channel?
Ben Cloward's is probably better for larger map sizes though, it just seems crisper to me (and handles specular better - default DX shader seems to ignore colour spec). You can also use it to add opacity but it doesn't look all that good in the viewport due to some sorting issues.
http://www.jistyles.com/main.php?id=doc&page=hlsl#skinshader
MoP- How do you affect opacity?
This would be for environmental objects, fyi. I've got one from one of our clients, but opacity is a little wonky and it really isn't kosher to use outside of their project.
go jogshy!
http://www.lumonix.net/frames_shaderfx.html
Kees Rijnen and I made it. It will be ready for release in a couple of weeks.
is it gonna be free?
edit: just saw its gonna cost $249
(We're not interested in people who download the plugin and then we never hear from you again.)
-Ben
I'm in that category right this second, but I promise I've got a nice little .txt file I'm filling up with comments and feedback when I get the chance to use it
Not only that, but the end product of our system is a shader that's in the FX format - so anyone can use it. You don't need to the plugin to use the shaders - just to create them. That means that a game company only needs to buy one copy - for the artist that creates the shaders - and everyone else can benefit from it.
send me some info bdimonkey(HaT-)hotmail.com
I have a project I shall be texturing soon and a max node based shader sounds the perfect alternative for waiting for Unreal 3 to be released in some form.
rtzen
but I think rtzen has died or so...
also had another app in mind, a procedural texture generator which was similar
intend on doing something similar (graph based) for luxinia's shader editor in the future as well.
about the price, well considering that you need to build up some vector maths knowledge the 15 $ per hour thing would reach the 250 pretty fast, then again imo one doesnt come around this knowledge if he seriously wants to get into shaders. however as noone wants to code "shaders" as in max materials either, just build together some effects and play around, the graph-based stuff should boost the ability and the fun factor greatly.
sadly if you have an app like max which isnt exactly cheap, the 250 isn't much for a company, plus not all artists would need it, and I can understand them having the price a bit higher, after all you need to feed your familys somehow... and likely the people who warezed max wouldnt pay you a dime either
however I dont think the app will be alone for long, so get the cash in while the competition isnt out yet, or even more expensive good luck with it.
edit: on rtzen's death I quote someone from DICE who posted at beyond3d
[ QUOTE ]
RTzen was the only stand alone graph-based shader creation tool I knew about (it had both code and graph views) but it was IMO not very useful since it focused on just wrapping a single-pass FX shader commands into a graph instead of having a higher level abstraction that can handle multiple passes and arbitary lighting. This is of course very difficult to do if it's just a stand alone editor without a runtime system.
[/ QUOTE ]
just a question, what do you need max for actually ? I mean couldnt you sell it as standalone, as well ?
I never used rtZen, but from what I saw in the demo videos that they released it seemed a lot more technical that our system. Kees and I are trying to make ShaderFX as easy as possible for artists.
In theory it would be possible to make ShaderFX a stand-alone app - but one of the main strengths of the plugin is that it's tightly integrated into Max. You don't need to export your model to see it with the shaders applied, and you can see the results of the shader you're building update in real-time on your model. We're cutting out the extra step of taking your model out of Max to see the shader results.
Also, all of the nodes that are avaliable to add to your shader node network are written in MaxScript. The advantage there is that any tech artist that knows HLSL and MaxScript can add new nodes and extend the system without needing to compile anything or even restart Max. So there's some flexibility there for more advanced users that probably wouldn't be as easy to keep if ShaderFX were stand-alone.
Good luck adding your graph based editor to luxinia. They're really fun to play with like you said.
-Ben
any body have free and nice directx shader,
what working with normal maps, alpha channel?
[/ QUOTE ]
I've got a decent one posted on my web site here:
http://www.bencloward.com/shaders_NormalMapSpecular3lights.shtml
This version does diffuse and specular and normal mapping and supports three point lights. On that page you can grab the version that supports transparency, or the non-transparent version. Is that what you meant by "alpha channel" ? If there's anything else you'd like to see in the shader, let me know and I'll see if I can get it in for you.
The shaders are great no question, and a big help to check how the models look like with normalmaps applied, i love em
As far as the 2 sided thing goes, that's a really easy change. Just open the shader in Notepad and do a search for:
CullMode = none;
Replace that with:
CullMode = CW;
There are probably several places where the change needs to happen so just keep doing the search until it doesn't find it anymore. Let me know if you have an issue with it and I'll take a look.
I've got a decent one posted on my web site here:
http://www.bencloward.com/shaders_NormalMapSpecular3lights.shtml
This version does diffuse and specular and normal mapping and supports three point lights. On that page you can grab the version that supports transparency, or the non-transparent version. Is that what you meant by "alpha channel" ? If there's anything else you'd like to see in the shader, let me know and I'll see if I can get it in for you.
[/ QUOTE ]
Thanks, Ben. My biggest issue however is finding one that will display lightmaps on a separate UV channel in conjunction with diffuse/normal/spec/opacity. Lightmap should be some sort of multiply function to the diffuse, and UV layout will be different (no overlaps) than the UVs for the diffuse/spec/normal.
HLSLnormal_map_specular_3lights_trans_lightmap.fx
I hope this is what you wanted. Let me know how it goes and if you have any questions.
-Ben
Doesn't work well though unless the UVs are in channels 1 and 2... my mesh was using the 3rd and 4th channels, but the shader would then force the diffuse to share the same UV as the lightmap.
One thing that would be uber-helpful would be a 3d paint solution that let me paint into one UV, while showing 2 (or 3 or more!) UVs at once. Something like this:
AFAIK there is no painting tool that allows this. We're using bitmap masks more and more, as a replacement for vertex alpha.
I wonder if HLSL could dynamically update a texture that's in memory, like a bitmap being generated in RT by a painting script?
I've also been having issues lately with passing in UV coordinates or vertex colors when they're not in channel one. A lot of the time I just get garbage for UV coordinates (or a scrambled looking shadow map) when using channels other than one. Let me know if you see that problem. I want to let Autodesk know about it.
The tool you're proposing would be very cool! I don't think Max's implementation of HLSL and textures works like that. It does update textures when they're saved in an external app, but I don't think it can update real-time as you paint. I could be wrong.
re-uploading the texture, while a bit slow if the texture is big, as I dont think they do partial updates, should still work...
I am with you on the channel stuff, its really wonky, but I guess for them to improve such stuff they will either let middleware do it, or wait for max 10
I just looked at the DxStdMtl2.cpp file and they nowhere call the function which allows specification of texcoord channels (IRenderMesh->SetMappingData). but I guess one could hack that in yourself ?
also interesting that the function descriptors of IRenderMesh mention DirectX 10...
edit: ben, the numerical inputs you refer to, where do they show in the DxShader material I dont see anything ?
edit2: I digged a bit deeper and the "SetTextureParam" function of DxStdMtl2 doesnt actually use the last two parameters (mappingchannel) ?
although stuff like that is pretty SDK specific, I will have a look over at sparks
Peter Watje has a painter plugin that almost does what I'm looking for.
http://www.max3dstuff.com/max5/3dPainterPrototype/help.html
I'd love to see either of you guys tackle this one.
If I put his map in the Mix Amt slot of a Mix map, then put two other bitmaps in the #1 and #2 slots, I can paint my mask. If I turn on Show Map In Viewport at the Mix map level, I see the mask I painted.
Unfortunately tho, I have to manually toggle this off/on every time I want to update the Mix result in the viewport. If there was just an auto-update that worked, it'd be usable.
It also doesn't support more than one UV, though it does seem to support tiling within the individual map controls themselves.
and cool for digging that up, that was the painter I meant.
There is some Max specific code for binding a mapping channel to a specific texcoord input. Details can be found on this page:
http://sparks.discreet.com/knowledgebase...fect_format.htm
Basically when you create your texture as a UI element in the FX file, you do it like this:
texture colorTexture : DiffuseMap
<
string name = "default_color.dds";
string UIName = "Diffuse Texture";
int Texcoord = 0;
int MapChannel = 0;
>;
The "int texcoord" and "int MapChannel" bits tell Max which Map Channel to put into which incoming texcoord. This also creates a little spinner in the UI in the Material Editor that appears to allow you to set which map channel the texture should use, but as far as I've been able to tell, it only works when the value is set to what it does originally.
I am also just looking at the sourcecode of the "mix" map, the code was actually meant to support hardware blending of multiple textures (any multitexturing card with more than 2 units could render this in singlepass) but for some reason it looks like its not working at all (always shows only 1), I would have to debug it in detail to find out why... this bug is very old then. (because at the time it was written cards with 3 texture units were still new (that is pre geforce3)
another test I did was using the painter in a dummy material, and set the output texture of it, as input bitmap in another material. I could still paint but didnt see the immediate updates, only after the "painter" texture got saved, it was loaded from the bitmap material.
the reason for this is that I guess for performance sake the paintertexture only modifies the texture on video mem and then after you stopped your "paint" run it stores to disk.
to make this work with hlsl textures we would need a special non-standard bitmap texture support in the hlsl files, not sure if that is easily achieveable, I doubt it a bit, as the dx material was done very straight forward, it loads the textures itself and so on.
alternatively fix the "mix" material's realtime preview
although this is actually a autodesk job..
edit:
ben then I suspect the dxmaterial not calling the proper functions when the UI changes stuff... problem is a lot of the functions used in it are exported from max, ie no source available...
Here's the shader that does shadow mapping. It does everything that the shaders on my site do and also shadow mapping. If you want transparency, choose that technique from the Techniques drop-down.
HLSLnormal_map_specular_3lights_trans_lightmap.fx
I hope this is what you wanted. Let me know how it goes and if you have any questions.
-Ben
[/ QUOTE ]
I have a question about this shader - it looks like it's using 1bit opacity, is there something I can change to make it 8bit instead? Also the opacity doesn't self-uh...I'm not sure the term. I have an interior inside a car(imagine that), and want to make the windows transparent, and the transparency shows right through the model, hiding the interior. For now I'm just detaching the interior but what am I doing wrong?
edit: actually it is sometimes using 8bit alpha. With the interiors detached, if I have the Exterior selected, I can see the interior, and the windows are 8bit alpha. If I do not have the exteriors selected, or I have them all attached as one object, the interior vanishes, and the windows show straight through to viewport grey Except I can see other car exteriors through one exterior's windows. I'm guessing it's some goofy alpha-sorting thing where it is having difficulty with the enclosed objects (sorting by bounding box or something?) And the reason the interiors show up only when I have the cars selected is because Max draws everything that isn't selected, then draws the selection on top.
I don't know its 1:20 in the morning and the whole thing is confusing all I want is taxis so I can put them on a street and then blow them into bits