PDA

View Full Version : bump map on dielectric material


aanimate
08-05-2004, 05:43 PM
CAn anybody tell please if it's possible to apply bump map to dielectric material. I can not find a way. The only thing I can do is change the color of the glass. Trying to make frosted/sand blasted glass.
Thank you!

bmcaff
08-05-2004, 05:52 PM
this can be done (in 5.0.1) by creating a phenomena that lists the bumpmap network before the dielectric shader. You can download an example of this exact phem here (http://www.bmcaff.com)
Look in download section under phenomena. There probably is an easier method in 6
See example:
http://www.bmcaff.com/shaders/dielectricbumpSample.jpg

aanimate
08-12-2004, 09:50 PM
Thank you for your help! Fo rsome reason I can not find the example, when I click on it it brings me on you site and I can not find it there. Nice images you have !!!!
DO you have a problem with dielectric shader, sometimes it givs me noise and square artifacts, I have to turn off ior out then it works but I don't know if it simulates like a real glass?

pixelmonk
08-13-2004, 02:15 AM
Thank you for your help! Fo rsome reason I can not find the example, when I click on it it brings me on you site and I can not find it there. Nice images you have !!!!
DO you have a problem with dielectric shader, sometimes it givs me noise and square artifacts, I have to turn off ior out then it works but I don't know if it simulates like a real glass?
turn up the sampling quality

pixelmonk
08-13-2004, 02:17 AM
Thank you for your help! Fo rsome reason I can not find the example, when I click on it it brings me on you site and I can not find it there. Nice images you have !!!!
DO you have a problem with dielectric shader, sometimes it givs me noise and square artifacts, I have to turn off ior out then it works but I don't know if it simulates like a real glass?
how can you not find it? English > downloads > MR Phenom > Dialectric/bump

look a bit more.

MunCHeR
08-13-2004, 05:13 AM
Heres the link to download all of brendans MR shaders:

http://www.bmcaff.com/shaders/UsefulPhen.zip

Great stuff:thumbsup:

MunCH

Kabab
08-13-2004, 05:30 AM
Thank you for your help! Fo rsome reason I can not find the example, when I click on it it brings me on you site and I can not find it there. Nice images you have !!!!
DO you have a problem with dielectric shader, sometimes it givs me noise and square artifacts, I have to turn off ior out then it works but I don't know if it simulates like a real glass?
This shader has bugs it will under some circumstances have artifacts regardless of how high the sampling values are..

Search the forums there is plenty of discussion about this

Splin
09-01-2004, 04:57 AM
Hey bmcaff, thank you very much, those seem to be real timesavers.
Tho I have a problem with installing.
First I copied all the .mi's to Include dir as normaly. But as I launch maya I get following error in script editor:

// parsing /usr/aw/maya6.0/mentalray/include/dgsbump.mi
// error (line 1): parse error

So then I went and took a look into files and found out that bmcaff is using windows cuz the first line states:
$include "C:/Program Files/AliasWavefront/Maya5.0/mentalray/include/base.mi"

I changed it to: $include "/usr/aw/maya6.0/mentalray/include/base.mi"

But to my surprise they still give same error :shrug:
Any ideas, MunCHeR maybe?

MunCHeR
09-01-2004, 06:08 AM
Heya Splin, I shall have a look at it tomorrow, no guarentees though :D

Cheers

MunCH

alex.ongaro
09-01-2004, 06:26 AM
The Phenomenon is a solution, but Francesca Luce has provided the community with a very useful node "bump combiner" you can download on highend3d that allow you to use also maya procedural texture.

http://www.highend3d.com/files/dl.3d?group=mayashaders&file_loc=bumpCombiner_v1-v1.3-.3b.rar&file_id=2996

MunCHeR
09-01-2004, 03:08 PM
Hey Splin, did you install them as root user? If so you will need to do:

chmod -R 777 /usr/aw/maya6.0/mentalray

and did you put the icons in /usr/aw/maya6.0/icons ?

also I found the dgs fresnel has :

$include "C:/Program Files/AliasWavefront/Maya5.0/mentalray/include/ReflectionUtility.mi"

would you need to install the reflection utility if you're running maya 6?

Cheers

MunCH

Splin
09-01-2004, 04:13 PM
yup MunCHeR, I've installed shaders before. My mentalray folder is chown'ed for a regular user to make the whole game with shader installation abit easier.
All the Phenomenas appear in the mental ray tab and seems like it is working.
Also I added node id's to disable mr giving temporary id's to them.

But still I get parsing errors for all of them as I launch maya:

// parsing /usr/aw/maya6.0/mentalray/include/dgs_fresnel.mi
// error (line 1): parse error
// generating nodes ...
// parsing /usr/aw/maya6.0/mentalray/include/dgs_fresnel_bump.mi
// error (line 1): parse error
// generating nodes ...
// parsing /usr/aw/maya6.0/mentalray/include/dgsbump.mi
// error (line 1): parse error
// generating nodes ...
// parsing /usr/aw/maya6.0/mentalray/include/dielectricbump.mi
// error (line 1): parse error
// generating nodes ...
// parsing /usr/aw/maya6.0/mentalray/include/filter.mi
// error (line 1): parse error
// generating nodes ...
// parsing /usr/aw/maya6.0/mentalray/include/fullblinn.mi
// error (line 1): parse error
// generating nodes ...
// parsing /usr/aw/maya6.0/mentalray/include/opacity_material.mi
// error (line 1): parse error
// generating nodes ...
// parsing /usr/aw/maya6.0/mentalray/include/opacity_shadow.mi
// error (line 1): parse error
If I try to ignore them and render anyway, MR wont render and gives the basic declaration error. Like when you install shader and dont add it to the maya.rayrc file.

Did you try to install them and did they work fine for you?
I just cant figure out why it doesnt like the first line. As far as code is concerned it should be platform independent..

MunCHeR
09-01-2004, 04:17 PM
Hey Splin, I wasn't accusing you of never installing shaders or anything dude :D I often over look very simple things(thats why I have a keyboard imprint on my forehead sometimes LOL), my maya box is at a clients office at the moment so I will try and install them tomorrow, well in about 6 hours hehe, and see how I do, is mental ray assigning a temp id a problem at all?

Cheers

MunCH

Splin
09-01-2004, 04:47 PM
hehe no no mate, you got me wrong. Before I posted I kind of triple checked if all the small nuancies are ok.
Didnt add additional info cuz I was pretty sure that small details are ok, it must be something with the phenomenas itself. Of course it happens often with me too, a missing comma here or there. And cause of that I now quadro-checked and reinstalled them again. But still same errors :shrug:

If you dont assign a fixed id maya wont let you to save into .mb format, thats all. Plus I kinda like it when all is tidy and clean.

bmcaff
09-01-2004, 05:40 PM
Guys, I have not tried these on 6 (my maya 6 is on the way from Madrid as we speak..with health dose of maņana, maņana:)) so there may of course be problems with how maya 6 interprets these phens. I can tell you that I get the same error (not to mention redeclaration errors when rendering) in 5 but they all seem to work fine. Could be to do with node ids and such and I will try to post an update next week when I get 6 up and running. The error comes from the include line but in 5 it won't work without it. (see this link http://alienbit.com/mrfmtut3.htm) . I compiled these over a year ago to get effects that were frequently needed but were time consumming to set up. But there has since been a bunch of new shaders written (properly) that more or less cover the same ground.

Splin
09-01-2004, 06:46 PM
Blurp, Forest Gump was right! Stupid is what stupid does. My apologies go out. Thanks bmcaff for explanation and links. As I started to get errors I dint bother to go on and try to make some tests. All of them work perfectly fine, altough they give you every kind of imaginable errors. Basically issue is resolved with that. Thanks again bmcaff for releasing them to community, handy little utilities to make fast tests.

Still one question remains, is the ReflectionUtility really neccesary with Maya6. It works perfectly fine with it but. Anyway, going to do some tests.

Thx MunCHeR for the willingless to help out, now heading back to that Linux thread. I got couple of questions about slack for you ;)

bmcaff
09-01-2004, 10:00 PM
I'll check out 6 when it arrives and see what the capabilities are with it. Chances are that most of these phens will be redundant with new features but some may still be usefull (like the bumps and filter nodes), we'll see. I incorporated ref util to allow fresnel reflections and fast blurred reflections. Now I know that maya 6 has blurry refs built in (and I am a fan of using the maya nodes before mr nodes) but I'm not sure if a fresnel function has been added or not.

I'll be updating my website in the next week or so (could be on spanish time for this one ;) ) so I'll try to an update for maya 6 then (if it arrives in time). I'll also be adding some of this years commissions and that start of a useful textures and things (tuts, shaders, articles, etc.) collection. Obviously these will be focused on architcture/product design which is my main interest but maybe somebody will find it useful.

Daniel Whitton
09-04-2004, 06:09 AM
Hey BMCAFF

I also tried downloading your phenoms and got api errors. I was wondering if you could also post the shading network for the fresnel DGS so I can se how you connected everything. IF you used the reflection utility or sampler info from sandstorm's site. Better yet if it might be a sweet shader for fresnel car paint.:)hehe.

Thanks.

Dan

bmcaff
09-04-2004, 12:23 PM
Hi, Dan

Are you on Maya 6, if so then I'll be posting an update soon. They work fine in Maya 5.
I used reflection utility for the fresnel effect... do you have the link to sandstorm's site, I saw it before but can't find it now.

If by the shader network you mean how I used the MRphenomenen node to create the interfaces etc., then unfortunately I can't. I did start off using this but i made about 10 phens and after the first two just started making them in MS notepad. Once I understood what was going on this worked much easier and quicker to edit, correct or add additional interfaces and features.

This could be the basis for a car paint shader and I have written another phen for this precise job (basically it has dgs diffues, ref util blurry reflections for metallic flake reflection and then a fresnel reflection for lacquer layer all combined using one of the composition nodes), it looks reallly cool but takes an age to render. Since I normally work to really tight schedules I just scraped it and went for a simpler Maya network and rendered in passes. I worked on the this a few months ago while doing a commission of 5 illustrations for the new Peugeot 907 concept. Project timeline was 10 days, so the pedal was to the metal... this included a bunch of data conversion (big pain) and additional modelling. Anyway you could always try to make this phen and see how it works out for you. I may add it the the UsefulPhen set later if I get time, but it hardly falls under the heading of useful:wise:.

BTW I saw your other Dielectric indicator light problem and I think that you should try using a shader with more of a diffuse component like normal blinn shader or even DGS. I have tried to do the same thing before but ran into the same problems. I generally use dielectric for clear or slightly tinted glass only and even then just in limited situations (works well in architectural applications or for bottles, glasses etc). When the glass is deeply coloured the dielectric always looks too dark. If you need to use dielectric then I suggest that the chrome should be reflecting some thing very bright like sky. The sample you have has the chrome reflecting a dark floor so this is not reeally helping the situation. (should prob. post this in the correct thread, eh?)

I hope this helps in some way.
B.

Daniel Whitton
09-04-2004, 09:24 PM
Bmcaff

Thanks for your reply. I'm getting better results with DGS although I need to play around with the amount of trans and diffuse to get the right results. Thank You.

I read the mi files of your shaders to get a looksee and tried to recreate the network in maya. Got so far, but for DGS fresnel I used reflect utility, DGS, and Color mix, although I cannot use the color mix as a shader I tried pipping it into a Mix8layer.
I actually I am getting alot faster and better results using a Maya Ramp shader, I'm just trying now to figure out if fresnel is built in or what to do for that.

Here is Sandstorms link. http://www.sandstrom.on.to/

He has added many Maya like utilities to his download section, should make creating phenoms alot easier. I have downloaded them, but not actually created a sucssefull network for a Car shader, crap.

I'll hopefully post a pic on my post tonight with the results that you told me.

Thank you very much.

Dan

bmcaff
09-13-2004, 10:37 PM
Ok Guys, Maya 6 finally arrived on Friday:D and I have now updated these phenonena for version 6.0.1.

They can be downloaded from my website www.bmcaff.com (http://www.bmcaff.com) in the download section (MunCHerR's link is also updated). I have also updated my Website with a new look and some new projects (should also be able to upload the 907 concept illustrations I did for Peugeot maybe later in the week, I'm still looking for clearance on this one). I have added 3 new models and the start of a useful textures section (only one for now but I'll get some more up soon).

Anyway as well as getting these working in Maya 6 I also tackled some problems with the original set. These are the include statement which is no longer needed, compilation into one mi file so you don't have to clutter you rayrc file, new hypershade fti icons and node IDs (just arbitrary ones for now) and updating of the readme with new installation instructions.
I still find some of these useful even in Maya 6 and I hope that some of you will too.

B.

MunCHeR
09-14-2004, 06:56 AM
Cool Brendan, many thanks, they will be very handy :thumbsup:

MunCH

ush
10-31-2004, 12:54 PM
I want to say thank you for bmcaff first,and I'm one of big fan of this phenomenaized shader.

I wonder it's too late to ask this now,but about a month ago I updated Maya 5.0 to 6.0.
sicne then I'm gradually transporting my mentalray shaders to 6.0.
I downloaded newest version of this shader(for 6.0 ver)and installed but,
I could'nt make it work.It used to work fine at Maya 5.0.

error says (not every thing just part of it,but others are almost same)
*******************************************************************
mental ray for Maya 6
mental ray: version 3.3.1, 12 Mar 2004
API 0.0 error 301031: C:/Program Files/Alias/Maya6.0.1/mentalray/include/usefulPhen.mi,
line 28: while defining phenomenon declaration "dgsbump": call to undeclared function "mib_texture_vector"
API 0.0 error 301031: C:/Program Files/Alias/Maya6.0.1/mentalray/include/usefulPhen.mi,
line 36: while defining phenomenon declaration "dgsbump": call to undeclared function "mib_texture_remap"
API 0.0 error 301031: C:/Program Files/Alias/Maya6.0.1/mentalray/include/usefulPhen.mi,
line 52: while defining phenomenon declaration "dgsbump": call to undeclared function "mib_bump_basis"
*******************************************************************

I shoud have basic mentalray shader like "mib_texture_vector","mib_texture_remap",
and I made sure these are working in Maya6.0.
I still can't get rid of this problem,and I know there are many way to make same result
as this shader,but I think this shader is very handy,so I want to make it work if I could.

I might miss something easy or...
Any infomation will be appreciated.:)
Thank you very much.

bmcaff
10-31-2004, 02:24 PM
Hi Ush,

Sounds like the phenonema are being declared before the base shaders.

From the readme (installation notes)...
**********************************
Add the following lines to your maya.rayrc file

mi "{MAYABASE}/include/usefulPhen.mi"


This must be placed at the top of the list (or at least above the base set and the reflection utility) so that shaders they rely on can be loaded
first. MR loads these shaders in reverse order. Here is an example of what the Maya.Rayrc section should look like.


registry "{MRMAYA_START}"
link "{MAYABASE}/lib/ReflectionUtility.{DSO}"
link "{MAYABASE}/lib/base.{DSO}"
link "{MAYABASE}/lib/physics.{DSO}"
link "{MAYABASE}/lib/mayabase.{DSO}"
link "{MAYABASE}/lib/contour.{DSO}"

mi "{MAYABASE}/include/usefulPhen.mi"
mi "{MAYABASE}/include/ReflectionUtility.mi"
mi "{MAYABASE}/include/mayabase.mi"
mi "{MAYABASE}/include/base.mi"
mi "{MAYABASE}/include/physics.mi"
mi "{MAYABASE}/include/contour.mi"
*******************************************

Let me know if this does not work and maybe post your Rayrc file so I can have a look.
Hopefully tis will sort out the problem.
B.

floze
10-31-2004, 03:13 PM
Else you may need to add the following line to your .mi file:

$include "C:\Program Files\Alias\Maya6.0\mentalray\include\base.mi"

Where the path to your maya installation may differ from this one. My experience is that defining the include in the .mi files is the safest way to get it working though it may produce some warnings.

bmcaff: I tried your solution some time ago but it didnt work for me.. which doesnt mean it works for other ppl. :)

edit: Thank you so much for the phenomena bmcaff! They kick ass! :applause:

bmcaff
10-31-2004, 04:00 PM
Yes Floze this line was in the original set for Maya5 and will certainly make everything work. You must also include the line for the other referenced shaders such as the reflection utility shader. It gives a double declaration of all the shaders but this is not an error as such and can be safely ignored. The warning worried alot of people so I was looking for a way of avoiding it completely.

When I updated these to Maya6 I tried the positioning of the include line in the rayrc and it worked fine (based on the info that came with the mr-sss package, the rayrc file says # loading of libs happens in reverse order!, first time I've seen this mentioned!!). Also the compilation into one file made the whole thing easier. Anyway thanks for bringing this to my attention, I'll update download with this info ASAP.
I think it is hard to account for everybodys configuration with things like this but seems like either of these solutions should work.

I'm glad you found these phens useful guys.:thumbsup:

floze
10-31-2004, 04:16 PM
I just double-checked my .rayrc and .mi files and found out that you are definitely right. :thumbsup:
No need for includes if you know how to mess around with your .rayrc. Thanx for that info bmcaff. It's guys like you that make fun out of the rather hard to understand mr stuff. Thumbsup! :thumbsup:

ush
10-31-2004, 10:03 PM
Thank you bmcaff and floze,and I'm sorry for late to reply.
It was night in my country and I was sleeping.

Finally I could get it work.My rayrc file's declare order was upsidedown.
I put mi "{MAYABASE}/include/usefulPhen.mi" the buttom of the list.
I should've known this.It's in the manual like bmcaff posted.
Very basic mistake,I'm really sorry for this.:D

Now,it's working like a charm.:)
Again thank you for your helps.

Ionex
02-11-2005, 12:15 AM
Anyone have a complied version of the usefulPhen.mi for MR 3.4.1.5 for 6.5?

fr3drik
07-18-2005, 02:36 PM
So, there's no way to connect at bump map to the dielectric shader in Maya 6.5, using only the shaders that comes built-in by default?

RaeTracer
08-31-2005, 07:38 AM
I really like bmcaff's phenomena, but unfortunately I can't get the reflectionUtility to work, so I can't use the fullBlinn or DGS Fresnel shaders! Does anyone know if there is a version of the reflectionUtility that works with 7.0 on OSX?

cpan
08-31-2005, 10:02 AM
try francesca luce's ctrl_shading cuz it's more up to date ( it's using mr 3.4 faster algorithms)
or as alternative, in maya 7 you have new mib_glossy_reflection and mib_glossy_refraction materials wich are wonderfull and easy to use:)

btw. also in maya 7 there is a new mib_bump_map2 that it's also really easy to use... a lot easier than the old mib_bump_map material :D


take care
cpan

j00ey
10-06-2005, 09:00 PM
Hi Brendan

I'm tring to work out your dielectric with bump shader and it's working brilliantly, thank-you very much, I just have a question - in the images of the glass, how do you get the shadow that's thicker at the sides and base etc than in the middle, whatever I try I get a uniform shadow and then additive caustics

I've been trawling the web and docs for ages but I can't figure it out

thanks
j

bmcaff
11-02-2005, 01:26 PM
Sorry I missed this question earlier..
The density of the shadow in that image is controlled only by the caustics without which it would be solid. If you accurately model the glass with proper wall thickness the caustics should do the job. You difficulty could be coming from the fact that the glass is too think and thus the caustics are too focussed.. I hope this helps.

CGTalk Moderation
11-02-2005, 01:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.