PDA

View Full Version : Mental Ray - Shaders


Pages : 1 2 3 4 5 6 7 8 9 [10] 11 12 13 14 15 16 17 18 19 20

Nerick
05-01-2005, 10:05 PM
anybody knows how I can get soft shadows ? I have a directionnal light and a dome light with mental ray ....

-Vormav-
05-01-2005, 10:19 PM
Nerick - Have you tried MR area lights? Even with raytraced shadows, they still give soft, realistic shadows (and render very very fast).

Or you can try arrays of shadow-mapped lights. Have them all target the same spot, but position them apart from each other (the further away from each other you put them, the more softness you get in your shadows). Then just tweak the sampling settings to get all of the shadows to blend together.

MarkSnoswell
05-02-2005, 01:13 AM
anybody knows how I can get soft shadows ? I have a directionnal light and a dome light with mental ray ....

Ambient Occlusion (AO) will give great soft shadows -- actually far more accurate than almost any other method. Combine AO with good HDRI diffuse lighting and perhaps some directional fakes and you have the best solution of all.

One good trick for complete control of lighting that casts clear shadows is to only use lights to trigger different shaders -- one for shadow and one for light areas.

ILS
05-02-2005, 03:23 AM
mark,

could you explain it a bit more - i've never heard of these methods.

MarkSnoswell
05-02-2005, 05:35 AM
Uh -- I'll just answer the second technique now while I have two seconds spare...

Use Falloff Shodow/Light as the mask parameter in a blen material or anyother way you can think of (there are lots of ways) to give yourself complete control of shaders for light and dark areas. The idea is to ise the "light" cast by a light only as a mask for where you should apply different shaders. Of course you can choose to use the light in some way in the shader for the light area -- but really it's usually faster and better to use the light/shodow falloff to blend two shaders that are based on real world (image based / spherical harmonic) lighting.

Uh -- in the remaining second. Ambient Oclusion with fast (noise free) environmental lookup for non-ocluded light usually gives 90% + of a full realism (radiosity / "GI") render. To optimise performance apply different Ambient Oclusion shaders with different distance cutoffs for diferent sized fetures -- small cracks and grouves only need a small distance. Larger shadowing effects require longer cutoff distances.

ah -- and a bouns second ... For further realism using environmental (image based / spherical harmonic) lighting blend between different environmental lighting based on height or whatever.... eg. Near the ground a character (or building) will experience a different ambient lighting (50% ground plane, ambient lit only) wherass higher up the ground plane component of the environment will be lightened considerable due to radiant transfer of energy into it and ... agh... too many words. I am sure you get what I mean. Net result is dratically faster render times at the same time as you get improved quality (noise reduction and artistic/realism improvements) and control of lighting.

c0rtex
05-02-2005, 11:32 AM
Hey, what would be the best way to make car neon? I tried just using a cylinder with the neon mat included in the cg-talk material library but it didn't seem to give off light.. I cranked up its illumination but still no emission.. what am I doing wrong?

sanyilajos
05-02-2005, 01:06 PM
Have u enabled Final gathering... glow doesn't work whitout that :)

sanyilajos
05-02-2005, 02:30 PM
hello :D
I'm discoverd that ambient occlusion is a great thing :D but make me angry that i have to composit it in photoshop or in any other compositing software, so i started to wonder if i couldn't get the same in max ... so i started to use blend and composit in max to get the same feeling, and i think its even better then compositing outside max( i had problems with reflections). I would like to share the renderings but i cant't see any upload option :( ..???? why?

ToddD
05-02-2005, 03:32 PM
c0rtex, sounds like you haven't turned on Final Gather...

c0rtex
05-02-2005, 04:25 PM
ohh that would be why! thanks :D

slebed
05-02-2005, 10:53 PM
I love this thread guys! Keep up the good work.

I'm looking for a way to create an effect similar to F-Edge in mental ray. In case you don't know about f-edge, it is a material that is applied to the bump channel, and will at render time, create the look of a rounded edge on your geometery. It makes your geometery look like it has filleted edges.

If anyone has any ideas, or even a place to point me in to program this, please let me know.

Thanks,
Stephen Lebed
Visual Effects Supervisor
MECHNOLOGY

sanyilajos
05-03-2005, 09:03 AM
So, now i can show what i did... the first is a without ambiental occlusion, the second one was composited in photoshop, but the third one is a max renderind ( blending two materials in max, using ambiental occlusion as a mix map ) ... and ambiental occlusion dont realy wanna work with displacemant :sad:... any other way using ambiental occlusion ???

MarkSnoswell
05-03-2005, 09:37 AM
Tutorials... UH -- I completly forgot we had these sitting around. There is no public link to this page but for what's it worth here it is: http://www.cgcharacter.com/shareware/

These are using the shaders we will be packaging up and making availble for free to CGSociety members -- well that's the plan.

Cryptite
05-04-2005, 04:03 AM
I can't under any circumstance seem to get caustics to render on this scene file I am linking to below. Any ideas? Seems like some caustics would add to the scene a bit... Thanks.

JeffPatton
05-04-2005, 04:16 AM
I would have a look at it, but for some reason any .zip file I download from CGtalk comes through corrupted. The file inside does not have a valid extension, and if I put .max on it, they still won't open. But others don't seem to have this download problem, so it must be something local with my settings....

Anyway, all that crap doesn't really help you now does it? Have you had a look at the caustic tips on my site here:
http://www.jeffpatton.net/MR-Caustics101.htm
Maybe that will help you isolate the problem.

Cryptite
05-04-2005, 04:19 AM
Indeed, I followed it to the letter but my scene involves metal, not glass or ice or anything...

Here's the file on my webserver: Metal Sphere Scene File Thingy (http://cryptite.f2o.org/Abstract1.zip)

JeffPatton
05-04-2005, 04:33 AM
The caustics are there....you just can't see them. Increase the global energy multiplier to say 500.0 or higher. Now I should also mention that an omni light is not the most efficient way to create caustics.

I think I remember someone telling me that an omni is like 6 spotlights attached to a small box (one spotlight per face). So what I think is happening here is that your shooting the photons all over the place (even away from the camera and scene). If you focus those by using a spotlight, I think you'll have better (and faster) results.

Cryptite
05-04-2005, 05:32 AM
I turned up Caustics samples to 50, Enabled GI and set photons to 500 and set Photons (Caustics & GI) Volume Samples to 1000. No luck... no caustics.. :sad::shrug:

Boa
05-04-2005, 06:33 AM
Tutorials... UH -- I completly forgot we had these sitting around. There is no public link to this page but for what's it worth here it is: http://www.cgcharacter.com/shareware/

These are using the shaders we will be packaging up and making availble for free to CGSociety members -- well that's the plan.

Hey Mark,
thank you for these tutorials. You might want to check the link to the second Harmonics tut. It points to the first tutorial page (although it is not to hard to guess the name of that second page ;-)

Andrea

sanyilajos
05-04-2005, 06:47 AM
You don't need GI. I give a try to the file

sanyilajos
05-04-2005, 07:33 AM
the problem was as Jeff said... energy of the light

theotheo
05-04-2005, 03:03 PM
Hi!

Ive been mooching info of this thread for quite some time now, thanks to everyone who`ve contributed , especially Jeff Patton :)

Figured it was time to give somthing back so ive created a small script to do
quick renders of mental ray scenes in max 7.

Hope youll find it usefull :)

http://www.cgtalk.com/showthread.php?t=236959

-theodor Groeneboom

Cryptite
05-04-2005, 09:38 PM
hey sanyilajos: that looks pretty good but I don't have Max 7 yet... what setting did you change exactly? I seem to be confused at which one you guys are talking about... :/

sanyilajos
05-04-2005, 09:55 PM
So i used a target spot mr light instead of omni , and i increasd the light energy from the light settings to 700, and thast all :)

Cryptite
05-04-2005, 11:37 PM
Ok well now that I have some caustics showing up, I get them in the form of fuzzy snow white dots. I'm sure you know about these, question is, what setting to I apply/change to get them to be what they should be?

-Vormav-
05-05-2005, 12:42 PM
Cryptite - You can either increase your caustic samples, or increase the "radius" values so that all of the dots are so large that they begin to blend together. Or better yet, a little bit of both of those. Check for the "creating refractive caustics" tutorial that comes with Max - it covers this pretty well.

Werre
05-05-2005, 07:05 PM
I'm not sure if this has been covered yet or not... I just got the new 3ds Viz 2006 with MR v. 3.3 and it came with 4 native MR SSS materials as well as a SSS Physical Shader(mi). Has anyone else seen these?


I'll post an example in a little bit...

Okay, here's an enlarged shot for clarity...
http://www.meachamapel.com/assets/images/sss_skin.jpg

And here's a quick animation...
http://www.meachamapel.com/assets/images/sss_skin.avi

sanyilajos
05-05-2005, 07:56 PM
To Cryptite: u can also use for a finer detail final gathering, but than lover the light energy cause FG brights the scene :)

Oh and this si about shaders after all... so i saw a lava shader tut on the net but it used some downloadable procedural maps... i couldn't download them but i used noise instead of that.. and a bit of glow(lume)... and mixed them the way i liked .. i hope u like it too... i share u the mat file too maybe u wanna use it some day ( i know anybody could do something similar ) :shrug:

Werre
05-05-2005, 08:18 PM
Also, here's the material. Not pictured are the map slots for each of the available components.

http://www.meachamapel.com/assets/images/sss_toolbar.jpg

Haola
05-07-2005, 05:31 AM
Anyone know how to make a soft shadow edge such as the sun light in real world ???

philipbruton
05-07-2005, 10:16 AM
If you use mental ray then just use the area light parameters for a mental ray light.


http://www.pbstudios.co.uk/shadow%201.jpg

If you use scanline the set the shadow types as area shadows

http://www.pbstudios.co.uk/shadow 2.jpg

c0rtex
05-08-2005, 07:28 AM
What would be the best way to make a lava lamp material (the actual lava inside)?

sanyilajos
05-08-2005, 11:21 AM
Hey Cortex ... lava lamp... wow making one animated with blob mesh hmmm sound's good... well for the lava inside i think i would use fast sss shader, i don't realy have time to test it out but here are some refrence images...

c0rtex
05-08-2005, 11:30 AM
Thanks for that :)

philipbruton
05-08-2005, 12:16 PM
Cortex, for a quick fix you could use a the self illumination slot of the material combined with final gather and a soft highlight.

I would attatch a gradient to the self illumination slot to control different glow shaders for the bottom of the lava where it is very bright to the mid and top where it is less bright.

I would control each glow shader using a falloff, set to parrallel/perdendicular.

This would give an element of control over the material withput needing a sss shader.

http://www.pbstudios.co.uk/lava mat.jpg

hope that sort of helps

Phil b

sanyilajos
05-08-2005, 01:18 PM
well i tried a difrent aproach.. i used fastsss and a light... well it's not ok right now

c0rtex
05-08-2005, 01:36 PM
philipbruton: (member.php?u=65231)
Thanks

sanyilajos:
I think yours looks ok :)

sanyilajos
05-08-2005, 07:38 PM
I found this on another forum(discreets):
"...The only renderers that can use hardware acceleration I know about are NVIDIA Gelato and mental ray.
In the case of mr it is an option where stages of the shader tree can be potentially replaced with hardware shaders, and OpenGL could be used for faster hidden surface removal."
Is this true???? i never know about this... realy... is MR doing some kind of hardware acceleration? how can i use it ... do i need special shaders ??? i'm so surprized :bounce:

philipbruton
05-08-2005, 09:45 PM
I think they are talking about mental ray stand-a-lone version.

Integrated into max, i think, can't support this feature otherwise it would be in the documentation i'm sure.

blacknight
05-09-2005, 01:15 PM
i was just doing some test to try the new mr 3.4 and i having some damn troubles with it. rendering in my own machine or using the slaves with satelite i`n geting this error. even more if i use satelite. http://www.infused-reality.net/comp/ggrrrrrrrrr.jpg
the pink sports are very anoying and the green bluish ones too. since their tint most of the render when i use satelite. anyone know why can this be hapening

titopte
05-09-2005, 03:55 PM
Just want to thank Theotheo for sharing his effort.
:thumbsup:

theotheo
05-09-2005, 05:45 PM
thanks alot titopte!

Ill release a new version tomorrow with lots of speed improvments regarding fg, caustics, shaders , raytrace depth and 7.5 support for quality level control for the hair :)

-theo

sanyilajos
05-09-2005, 06:18 PM
Blacknight... are u using displacemant??? usualy that makes some errors... and have u tried to render with mr3.3 ???, on a single machine renders without those artifacts???

MarkSnoswell
05-10-2005, 01:07 AM
OK. We are looking for new CGworkshops to run and a few people have suggested one on Mental Ray...

How many people would like an on-line course on Mental Ray?
What Level would you want -- beginer, intermaediate or advanced?
Who would you like to take it?

You can look at the current courses here www.CGWorkshops.com (http://www.CGWorkshops.com) to see the format and strcture of current courses.

treed
05-10-2005, 02:22 AM
Mark, I would consider joining an MR course. Probably intermediate/advanced level since beginning stuff can be researched easily in this thread. Umm, for the instructor I'd probably say get Jeff Patton, hehe.

-Vormav-
05-10-2005, 05:15 AM
Mark,
I'd love to see one. On the otherhand, I definitely can't afford it at this point, so I wouldn't be enrolling. So I guess my opinion might not count for much atm. ;)

I'd keep it at an intermediate to advanced level though. Anyone can figure out the basics just by looking around the forums. It's the higher-level subjects with mental ray that you can't easily learn through the various free resources online. It wouldn't make much sense to have a workshop with a 'master', and just go over the basics.

JeffPatton
05-10-2005, 02:00 PM
Thanks for the vote of confidence Treed. But I'm sure they have a real MR professional in mind for this... :thumbsup:

Mark - I agree with the others that you could probably just skip the basics and go right into intermediate/advanced. I personally would sign up if I could learn how to create custom shaders for Mental Ray/3dsmax. I would want to see the entire process from which compiler to use (a free one would be optimal)....installing/configuring the compiler properly...writing the shader...compiling the shader...and finally testing the newly created shader in 3dsmax.

I had considered creating a training DVD a while back, and created a thread to get some input on the idea. Allan McKay offered some good input for me, and it might offer some useful insight for you guys when planning the courses. Here's the link:
http://www.cgtalk.com/showthread.php?t=166195&page=1&pp=15&highlight=mental+DVD

blacknight
05-10-2005, 03:57 PM
sanyilajos (member.php?u=165428) i tried with 3.3 and that dosent apear. i`n not using displacement at all just a bump map. i also having some trouble with satelite rendering some machines return the GI solution tinted un blue i gonne upload an image when i get the chance to render it again. i havent found the source of the problem yet

sanyilajos
05-11-2005, 07:28 PM
Well, it always was a problem to make good looking wine (red wine) simple ray traced objets look like red siroup, or red jelly... i think a should use a volume shader :shrug:... any good ideeas???????????????????????

Rigged
05-11-2005, 10:07 PM
Can anyone explain why and how this .PMAP file in mentalray works in the render dialog because the documentation just isn't great. Storing phottonmap information? :S


Maby it's a littlebit of topic but scince light affects materials..hmmm.. :)
tnx,

philipbruton
05-12-2005, 06:28 PM
When you turn on Global illumination, caustics etc.., mental ray has to calculate the photons emitted from all lights being reflected/refracted around the scene prior to the image rendering. Mental ray stores the results from this process in a temp file for use when rendering the image.
you can choose to save the results from the phton emission in a .pmap ( photon map) and reuse the same map so as not to have mr re-calculating it every time. This is handy if you are tweeking material colours or text maps in the scene and re-rendering for that perfect result over and over. However the map will not be correct if you intend on changing elements in the scene that will effect the photon locations, i.e object location, reflection/refraction of materials and global/caustic values.

Phil b

Rigged
05-12-2005, 08:54 PM
Tnx for sharing the info.
Does this affect camera position in a scene or is it 'world' competible ?

Tnx,
Rigged

SoLiTuDe
05-12-2005, 09:17 PM
Quick question -- i know this isn't the lighting thread... but with the photon maps If i store a gi map, and want to change my final gather settings only (like radius or something), do i have to re calc all of my gi as well for it to be accurate? Does the fg base itself off of gi or what? I'm a little confused on this, but think i'm getting closer to an answer, so I thought i'd ask to make sure. =) Thanks!

philipbruton
05-12-2005, 11:17 PM
To Rigged :-

The photon map is stored in relation to the scene and not the "active view", therefore if you turn your camera round to render something behind your original scene camera it will have been illuminated by the photons in the saved photon map.

To Sol :-

GI photons are emitted into the scene at sample points, final gather ( as far as i know ) samples between these points to create a blend between so less GI samples are needed to create a smooth image.
If you have emitted a resonable amount of GI photons stored in your photon map you should be able to tweek FG to your desired result without recalculating. However if FG isn't achieving the desired result, i.e it isn't smoothing the samples on the edges of your model well enough to define that nice crisp edge, you'd have to go back to your GI and increase sampes, reduce the radius of samples etc and save a new map to retest with FG settings.


Hope this helped


Phil b

theotheo
05-15-2005, 04:24 PM
Hi!

For those who are interested, ive updated my mental ray preview script to support different settings for raytracing, optimized settings for fg,gi and caustics, sss shader and max 7.5 support.

you can get it here! (www.euqahuba.com/stuff/mr_prime)

PS:didn't mean to get off topic since the main theme here is shaders :)

-theo

SoLiTuDe
05-15-2005, 04:46 PM
heya... thanks for the info.. I think i get that much :) How does it work with things like self illuminating/outputting materials and hdri? I know if you use just gi it won't do anything, but fg will make them emit light into your scene, so I'm kind of curious why fg will make them emit light if gi won't. I understand they don't actually emit photons (unless you use a special shader) but if fg is just sampling the gi then how's that work?

JeffPatton
05-15-2005, 04:49 PM
Thanks for the contribution Theo. Looks like a handy script.

SoLiTuDe
05-15-2005, 05:10 PM
and oooh yeah... that script looks awesome I'll give it a shot later. I heard about it a while back, but forgot to grab it.

ILS
05-15-2005, 09:32 PM
sorry to have to come back to the script topic - but how do you install it?

theotheo
05-15-2005, 10:02 PM
shhhh :)

installing scripts- from scriptspot.com (http://www.scriptspot.com/Installation.htm)

Or just click (max) maxscript menu->run script->select your script (.ms)

Back to mr and shading :)

JasonCamp
05-16-2005, 02:25 AM
hey i also am currently tring to reproduce alcohol accually rather i did but just need to make a few last tweeks to it after seeing the real thing in the store vs a crummy low res pic i was going off of..
1st off , make sure the normals are going the correct way, it took me a few to figure that out lol it looked right but accually it has to come in contact with the glass so i just fliped them

best way to say it is , use a photometric light for lighting and set your raytrace mat to , defuse = darkest part of red wine / transparency = lightest self illum = 0 / reflect = fresnel ----- ior = 1.329 = alcohol _________ mr setings enable photon under caustic and gi and use a dgs material , set that to how you think it should be set mostly heh hard to judge but one again use the dark parts and light parts for the wine coloring i find it best to take a digital pic and view image file in max and use the idroper tool to select the colors then drag them to the corosponding color , it makes for true coloring , anyway next is the photon volume , and volume slots , set them both to parti volume shaders and set the photon volume to .001 and the density of the wine color (brightness or lack there of will determin how dense the wine is... set the rest up er to basicly 0 unless you know parti volume shaders for this slot better then i.. next for the volume ... set this to the lighter color of the wine , for the volume that is more of transparent then volume , then ext. should be like .011 i think min/max is for how much scattering the volume does so however you want to set that
i just finnished textureing my jack daniels bottel and doing the volume for it , and it came out outstanding ... altho it takes for ever to render with gi and fg on lol, but its accually very difficult to tell the differnce ... i pulled up a pic on the computer at work that i was criticizing my own work basicly and somebody walked by and said i was a alcoholic cuz i was staring at the bottle , and i said lol yes i am but this is accually something i did in my art program and they said they thought it was a picture.. so i felt good , esp after about ohhh id say 6-7 months of working on the "gold ball room" from the movie shining wich i accually have 98.5% done modeling and 45% done texturing and lighting rending...
oh on a side note sence ive been busy as of late ,,, i have a wooping 2 months left in the NAVY !! wooo hooo damn its been a hellish long 4 yrs of my life ive wasted away heh... on to new and better things like college... on a bad note though i was told to move out of my humble barraks dwellings into a temporary room until the great departure, wich forced me to move all but almost all of my belongings to my moms house until i start school wich now means i have to work on my laptop EHHHUGG i had forgoten how retardedly slow that thing is , and my home pc isnt all that fast like jeffy's quad or dual xeon XXXghz lol , (makes simpathetic jesture while pleading jeff for a job) ah well on to another project i started working on a building structure of the new surroundings , really amazed on how fast mr renders with out transparent items , ah also this gi stuff really killed me when i was modeling the gold ball room for the hdri render, i finnaly found out that if your gi just wont brighten up the dark spots ... to make the dark spots brigher by the environment tab (8) key and the ambient light is black... just up it in gray scale to a dim like low level lighting tone ... and blam ! not only does the gi look better because its got less to blend but ahh theres not a pich black spot where it should be lit just even the slightest heh... anyway ive blabed for long enuff

Haola
05-17-2005, 09:35 PM
Anyone know how to make a real nice blurry reflection for the floor and its setting for Mental ray render ? . Thank you.

ToddD
05-17-2005, 09:42 PM
Haola, I have used fresnel falloff in the reflection slot, then put a metal lume in the white slot of the falloff, you will need to adjust the spread, color etc, but I have gotten good results with that. You can probably also use DGS, with either approach a very slight bump map adds to the effect.


Good Luck!

Todd

Haola
05-18-2005, 01:38 AM
thank you very much , I used DGS but i couldnt find the bump section but the fall off of yours works well

S Beck
05-19-2005, 10:01 PM
Hi Jeff,

Down loaded your file changed nothing and rendered it on a Dual Xeon 3.6 processor with 3G mem time was 7.29 mins not bad.



Steve

JeffPatton
05-20-2005, 03:13 AM
Oh no...now your here too... :argh:

LOL, Steve you know I'm just messin' with ya. Welcome aboard.

Theta-Dot
05-21-2005, 05:29 PM
I've already done a search in this thread for 'landscape' but nothing seemed to cover this.
And the max help file on the landscape shader didn't mention any problems or specific steps to take to fix this.

My light doesn't seem to be influencing the sphere with the landscape material. It's an mr area point light with raytraced shadows. The 'base' layer on the landscape material is a dark brown / black smoke mix, for dirt with no growth - but it should still be black where no light is reaching it! There isn't any 'self illumination' capability on the landscape shader that I can see, so I don't know why it's doing this.

And there isn't any global illumination or skylights, just that one point light.

JeffPatton
05-21-2005, 06:04 PM
It's best to use an actual material in the base and overlay slots. For example, use the material to shader convertor in those slots along with standard materials. Else you could use something like the illumination phong shader (if you've unlocked it) directly in the color swatches and it should pick up the shadows properly.

Theta-Dot
05-21-2005, 06:07 PM
That did the trick. Thanks.

FATdan
05-23-2005, 05:39 PM
Ive come to halt with the scene im creating. im trying to get a shader for translucent fabric. its for the curtains. ive had a go with the sss shader but the results are poor. any thoughts?

philipbruton
05-23-2005, 06:55 PM
Have you thought about giving ther translucent shader, under the shader basic parameters a try, ie. blinn/ phong/ translucent.

FATdan
05-23-2005, 08:15 PM
nope:) ill have a go!
thanks for the reply

celinhow
05-25-2005, 12:00 AM
im sorry, my question is related to mental ray, but nobody can help me, ill try here ok ?

im using lens flare with mental ray, and it does not recognize the G buffer channel, it renders ok, but the effect is not ocluded by the objects because the G buffer
can someone help me ?

and SORRY i know this is the wrong thread for this question, but i dont know were to run

Thanks guys

RobertMayer
05-25-2005, 04:52 AM
Is there a funny way that Multi-Subs and contour maps interact?
When i have a Multi-Sub and the materials have a contour, it doesnt show up. Ive tried a mental ray shader, a Material to shader with the Multi-Sub in the Surface of a mental ray, with nothing.

Will Contours work with Multi-Sub Objects?

fhodshon
05-25-2005, 06:30 PM
Jef,

thanks for the great info from your site.

i merged my bass model into your scene.

how can put an HDRI into the scene and get light/shadow into the cutout on the top of the body.

thanks again.

fred hodshon

http://www.hodshon.com/sab9.jpg

philipbruton
05-25-2005, 06:51 PM
I got multi-sub working matey

here's a file

http://www.pbstudios.co.uk/subobj_mentalray.zip

I did this by applying the seperate materials to the selected regions of the mesh, then using the pippette, select the object material into a multi-sub mat, then i created a mental ray material, used material - to - shader in the surface slot, copied the multi-sub over added a contour shader to the mental ray contour shader slot and reapplied the material.

philipbruton
05-25-2005, 06:53 PM
Use a skylight, add a hdri image to the map slot, render with fg only and experiment !

fhodshon
05-25-2005, 07:07 PM
thanks for the info.

question.

from what i've read:

1. create a BITMAP material with an HDRI image (spherical environment).
2. adjust black an white points (this is something i haven't quite understood yet).
3. note the white point value and enter than into the RGB LEVEL setting in the output rollout.
4. drag this material to the environment map slot.
5. create a SKYLIGHT and drag the HDRI bitmap material to the skylight map slot.

is this accurate?

does it matter where the SKYLIGHT is positioned in the scene?

thanks again.

f

RobertMayer
05-25-2005, 07:14 PM
haha, it works!
thanks, mate.

philipbruton
05-25-2005, 07:29 PM
yes nearly, just open the hdri image and keep the settings like this

http://www.pbstudios.co.uk/hdri_settings.gif

apply to the skydome to effect the lighting of the scene with the hdri image, apply to the environment to effect reflection into objects in the scene.

Oh, no the sky light can go anywhere and it's effect will be the same. Easiest to create it in the "top" view

fhodshon
05-26-2005, 06:24 AM
http://www.hodshon.com/mtd_gi.jpg


playing.

bobg
05-27-2005, 09:36 PM
fhodshon,

Your Bass is starting to look very nice. More natural. Question for you: Did you model this in ProE and then bring it into Max to render? If so, how? I work with a lot of ID and engineering types who all use ProE. I'm triying to determine the best method for transfer since IGES is to cumbersome. I've been having them convert to ProE render files and then I import through PolyTrans. The ProE users complain about the process so I'm trying to find a better one. They complain until they see the MR renders/animations I produce (much of which I have to thank Jeff Patton for 'showing me the light').

Thanks,
bobg

JeffPatton
05-29-2005, 08:38 PM
Brendan McCaffrey has a few Phenomena files on his website that you can download and they seem to work in 3dsmax as well. There's no .dll file with these, just the .mi file. Since it's Phenomena shaders, no .dll file is needed.

I placed the file in my shaders_autoload folder (include subfolder), and it seems to work.

Here's the link to his website, just follow the links to the downloads page:
http://www.bmcaff.com/

fhodshon
05-30-2005, 10:07 AM
won't happen again.

f

joske
05-30-2005, 10:18 AM
Please keep this thread a Mray shader thread only fhodshon
WIPs have their own location and this thread is big enough as it is
no offence dude, but if everyone posts their Mray wip here it will get out of hand bigtime.

thank you

Markuss
05-30-2005, 02:23 PM
I have a problem using HDRI maps with mentalray. I have the latest version included in the max 7.5 update. When I try to use a HDRI for skylight and reflection I get this errormsg from the renderer:
MSG 0.0 warn : C:\work\Virtuella\work\Textures\rnl_probe_spherical_transformed_blurry2.hdr: Image format not supported by mental ray. Will pass the image as raw data (slower and more memory consuming).

I thought mentalray supported HDRI??

...

ToddD
05-30-2005, 07:37 PM
Markus_S, Mental Ray does support HDR, just use the search feature in the forum and type Mental Ray+hdr I am sure a basic set-up will be covered. As far as your problem, have you altered the hdr image? Have you tried using a diferent HDR image?
Lastly, this is more of a lighting question, would be nice if people keep in mind that the subject here is Mental Ray SHADERS, posts like this just make it harder to find the info pertaining to the subject of shaders.

Markuss
05-30-2005, 08:46 PM
Sorry, I just didn't know what would be the appropriate place to post questions about mentalray. I guess I should have made a new thread under 3dsmax, but a mentalray sub-forum would have been great (as would a v-ray, finalrender and a brazil forum).

Anyways, Im trying out the mr "fast sss skin shader", and I want to use HDR for lighting and glossy reflections. I used vray before and I got some pretty good results: here (http://privat.bluezone.no/markuss/forum/bodymap_testrender_050_refl.jpg) but this has no SSS so I wanted to try mentalray because of the fast SSS shader.

Anyways, I got the HDRI to work again, just created a new empty scene and started from scratch, I don't know what the problem was, I'm using the same HDR image... Could someone point me in the direction of a place I could learn more about mentalray. The Max manual doesn't have much info, and the mentalray documentation is a bit too technical, and unfriendly to artists, I think. Some tutorials would be great.

One of the things I'm wondering about is how do I smooth out the grainyness of the glossy reflections?

So sorry for being such a noob!

MikeBracken
05-31-2005, 01:08 AM
Im modeling some flowers for my current project. Just wondering if anyone has come up with a good way to texture the petals. Im not asking for a shader. Just wondering what aproach some of you have taken. So far I have had "ok" results, but I would like it to be better. Im using Mental Ray/Studio Max 7. The flowers will be very close to the camera.

Any suggestions would be apreciated.

-Vormav-
05-31-2005, 03:35 AM
I had a little free time today, and so I thought I'd take a look at what all you can get when you go through all of the ".mi" files and remove all the "hidden" lines, as Jeff mentioned. There's a lot of them! In going through them, I thought I'd take awhile to go through all of the new shaders that I saw in my material/map browser after doing this, and add which ones will Crash Max, and add other comments wherever I had any to add. This is as of Max6, sp1. Keep in mind though that I don't really have a good idea of how most of these are supposed to work, and I haven't tested them very thoroughly. So most of these may be extremely buggy (and since they were hidden, most of them probably are). Also, a lot of these shaders (the vast majority of the ones you'll find in 3dsmax.mi, for example) are just used to convert default materials to MR shaders, or are used within other materials, and as such are pretty pointless to enable.
Backup your .mi files before unhiding things, and I'd recommend commenting out the hidden commands with a pound sign (ex: #"hidden") instead of removing those lines entirely. Also, a simple replace all "hidden" with #"hidden" in your editor won't work in all cases (particularly lume.mi).
But anyway, here's the list, if anyone is interested. Sorry if someone already listed them all off like this, I didn't notice a list anywhere in the thread.

NC=No Crash.
The name in paranthesis generally refers to the .mi file that the shaders can be found in, with exceptions being "(lambertian)" and "phong" of lume shaders (lume.mi), and various shaders starting with "max_", which can be found in 3dsmax.mi

MATERIALS:
Invisible(physics_phen) - NC. Quick way to make invisible objects.
max_default_mtl_phen - NC. Seems identicle to the "mental ray" material.

STANDARD SHADERS:
Bricks(3dsmax) - NC. Pretty much the same thing as using a running bond on a tiled material, only you get some more brick-like starting values.
Cellular(3dsmax) - NC. Used to convert the regular shader to an MR shader. Pointless.
Checker(3dsmax) - NC. Used to convert the regular shader to an MR shader. Pointless.

--the following maps are mostly used to perform specific operations within other shaders, but can also be used as multipliers on shaders within max.
Color alpha(base) - NC. Maps don't pass through the input channel properly.
Color average(base) - NC. Output is a grayscale averaged value of the input.
Color intensity(base) - NC. Simple intensity multiplier. Output is grayscale.
Color interpolate(base) - NC. I am yet to understand exactly how this one is supposed to work. The color weights only seem to have any effect if you set the number of colors to at least 3.
Color mix(base) - NC. Does exactly what you'd expect. Not entirely sure what the 'mode' settings do, but it seems to sort of serve as a multiplier.

Composite(3dsmax) - NC. Used to convert the regular shader to an MR shader. You can enable different composite maps, but not set what these are.
Dent(3dsmax) - NC. Used to convert the regular shader to an MR shader. Pointless.
Falloff/Falloff2(base) - NC. Used to convert the regular shader to an MR shader. Pointless.
Flat Mirror (3dsmax) - NC. Used to convert the regular shader to an MR shader. Pointless.
Gradient (3dsmax) - NC. Used to convert the regular shader to an MR shader. Pointless.
Gradient Ramp(3dsmax) - Crash.

--as far as I can tell, the following 'illumination' shaders are just the MR equivalent of the standard surface shaders. It can be nice to have them separate, so that you don't have to use a 'material to shader' map to just get a standard shader on your surface slot. Also, roughness seems to define the specular level of the surfaces. I'm not sure what 'mode' refers to in all of these.
Illum Blinn(base) - NC. Works fine.
Illum CookTorr(base) - NC. Works fine.
Illum Hair(base) - NC. Not sure exactly how to use this?
Illum Lambert(base) - NC. Works fine.
Illum Phone(base) - NC. Works fine.
Illum Ward(base) - NC. Seems to work...but not entirely sure how to use.
Illum Ward Deriv(base) - NC. Seems to work.

Ink 'N Paint(3dsmax) - NC. Used to convert the regular shader to an MR shader. It'll probably be easier for you to just use the standard ink 'n paint, and use a material to shader map if you need to use ink 'n paint as a shader instead of a material.
Lightmap Sample(base) - NC. An interesting aspect of this shader is that, if you uncheck the "include indirect illumination", you can exclude your object from being affected by Final Gather. It doesn't give you any controls for the shading beyond that, so I'm not yet sure how you could apply this to your standard shaders to make them ignore final gather.
Lookup Background(base) - NC. When you give this a texture, it applies the texture directly as if it was a texture applied to your environment, with no fanc mapping, and the texture is only applied to the surfaces that use this shader. Could be useful, I guess...

Lume Glow Material(Lambertian) - NC. Not sure of how this is different than a standard glow.
Lume Metal Material(Phong) - NC.
Lume Translucent Material(Lambertian) - NC.
Marble(3dsmax) - NC. Used to convert the regular shader to an MR shader. Pointless.
Mask(3dsmax) - NC. Used to convert the regular shader to an MR shader. Pointless.
Max Bitmap(3dsmax) - NC. Used to convert the regular shader to an MR shader. Pointless.

--the following are all mostly just used to convert regular max materials to MR. Most won't work.
Max_base_AnisotropicIllumination - Crash
Max_base_BlinnIllumination - Crash
Max_base_ConstantIllumination - Crash
Max_base_MeditBackground - Ever wanted to render the textured background that you can see in the material editor? Set the type to 1. If you apply a texture, this seems to be the equivalent of 'Lookup Background(base)'
Max_base_MetalIllumination - Crash
Max_base_MultiLayerIllumination - Crash
Max_base_OrenNayarBlinnIllumination - Crash
Max_base_PhongIllumination - Crash
Max_base_StraussIllumination - Crash
Max_base_TranslucentIllumination - Crash
Max_base_WardIllumination - Crash

--Still more maps used for regular material conversions. These can be useful whenever you want to avoid using 'material to shader.' Their options are a bit more limited, though.
Max_ArchitecturalMaterial(3dsmax) - NC. Can't get it working.
Max_BlendMaterial - NC.
Max_CompositeMaterial - NC. Just as with the Composite(3dsmax), you enable maps, but not set what those maps are.
Max_DefaultMaterial - NC. This shades by the color you give an object in the modifier panel.
Max_DoublesidedMaterial - NC.
Max_MatteMaterial - NC.
Max_MultiMaterial - NC. Same problem as Max_CompositeMaterial.
Max_Raytrace - NC.
Max_RaytraceMaterial - NC.
Max_ShellacMaterial - NC.
Max_StandardMaterial - NC. Rendering returns this error: "PHEN 0.2 error: 'max_StandardMaterial' requires illumination shader."
Max_TopBottomMaterial - NC.
Max_UnknownMaterial - NC. Extremely pointless... Unless you just want a quick and easy way to make stuff white and unshaded.

Mix(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Noise(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Particle Age(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Particle Blur(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Passthrough Bump Map(base) - NC. Not entirely sure of the point of this one, and what separates it from Bump(3dsmax).
Path Material(physics) - NC. Don't know the proper use of this. But set two objects close together, and apply this as a surface shader for one of your objects, and see what happens. Strange.
Planet(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Ray Marcher(3dsmax) - Crash. Didn't Crash at first, but quickly froze up my system when I changed a few values.
Reflect/Refract(3dsmax) - NC. Used to convert the regular shader to an MR shader.
RGB Multiply(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Smoke(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Speckle(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Splat(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Stucco(3dsmax) - NC. Used to convert the regular shader to an MR shader.
Swirl(3dsmax) - NC. Used to convert the regular shader to an MR shader.

--Texture shaders. I never did understand how to use these.
Texture Checkerboard(base) - NC.
Texture FilterLookup(base) - NC.
Texture Lookup(base) - NC.
Texture PolkaDot(base) - NC.
Texture Polka Sphere(base) - NC.
Texture Wave(base) - NC.

Tint(3dsmax) - NC. Used to convert the regular shader to an MR shader.

SHADOW SHADERS:
max_ArchitecturalMaterial - NC.
max_DefaultShadow - NC.

LIGHT SHADERS:
max_DefaultLight - NC.
max_DirectionalLight - NC.
max_IesSkylight - NC.
max_OmniLight - NC.
max_PhotometricPointLight - NC.
max_SpotLight - NC.
max_TexturedSkylight - NC.

PHOTON SHADERS (none of these Crashed, but they're all pretty pointless):
DGS Material Photon(physics)
Dielectric Material Photon(physics)

VOLUME SHADERS:
Fire effect(3dsmax) - NC.

ENVIRONMENT SHADERS (no clue yet how to use these):
Lookup Cube1(base) - NC.
Lookup Cube6(base) - NC.
Lookup Cylindrical(base) - NC.
Lookup Spherical(base) - NC.

CONTOUR SHADERS:
Frame Fade(contour) - NC. Works correctly with frame numbers.
Random Transparency(contour) - NC.
Random Width(contour) - NC. Gives very blotchy contours.

LENS SHADERS:
Logarithmic Camera Exposure(3dsmax) - NC.
max_StdRenderElements - NC. A different way to get at the render elements.
Oversampling Lens(physics) - NC. Set the depth higher than 1 to see the effect.
Physical Lens DOF(physics) - NC. Yet another way to control DOF.

OUTPUT SHADERS:
Adjustments(lume) - NC.
Bump Capture(lume) - NC. Not sure what this output is for...?
max_base_ImageCollector - NC.
max_base_VideoColorCorrect - NC.
max_base_VideoSuperBlack - NC.

fhodshon
05-31-2005, 06:16 AM
yes, i do nearly all my critical modeling in Pro/E.

for years i've done the STL through Polytrans to 3DS to max route.

there IS hope, however, with nPOWER Translator.

$495 i think, and it works PERFECTLY.

http://www.npowersoftware.com/trans/trans.html


thanks for the kind comments on my bass render.

f

-Vormav-
06-01-2005, 09:15 AM
A little off topic, but still related to Mental Ray. I got fed up with the crappy Mental Ray CHM manual files, and started looking for a way to fix it. I dont' know if they fixed their CHM files for the Max 7 release, but in Max 6 there's this extremely annoying bug that happens when you use the search feature a lot - the search bar freezes up so that you can't even use backspace on the selection, so you can only change what's in the search bar by selecting what's there. It's just a pain.
Easy enough to fix though. I got 'Easy CHM' from http://www.download.com/Easy-CHM/3000-2196_4-10387279.html?tag=lst-0-4
Then just use Tools>Decompile a CHM and decompile the chm file to their own directories. Then start a new project using each directory, run through the CHM Settings from the options menu (in particular, make sure you check the "compile full-text search information" option. Compile, and you have a decent CHM file. Or you can just leave it in its uncompiled (html) form, which I think I'll do, to take advantage of Firefox's more search-friendly highlighting.

Just pointing it out, incase that has been getting on anyone else's nerves. The help files are bad enough without having to deal with that.

Amahpour
06-01-2005, 11:11 AM
WOW
just like Final Renderer.REALISM

artman50
06-04-2005, 06:45 AM
hi ... i want to create a shader like the one on this image Max 7 mental ray... i dont know if the problem is de shader or the lighting but i can get it please help me ! ... something lije the helmet or like the orange guy ... like plastiline .. pleasee someone help me . tx http://img146.echo.cx/img146/6088/guerra9km.jpg

DaveKW
06-04-2005, 05:42 PM
can anyone help me with this problem i've got.

i've got the deriver mi and dll files and the reflection utility files (thanks to Jeff :)) and i've put them in the 'include' and 'shaders' folders under the 'shaders_standard' folder, but when it comes to select them in Max (btw i use 7 if that's important) i don't see them in the new materials window. is there something i'm doin wrong or something i'm not doin? hehe

here's the links for the files in case anyone else needs em:
deriver - http://animus.brinkster.net/index.html
reflection utility - http://www.impresszio.hu/szabolcs/

whtnoise
06-04-2005, 07:09 PM
i don't think the "look" of this image is as much the shader as it is the gi solution, try a standard max mat, or a dgs with low spec/high glossy values and use final gathering/gi

DaveKW
06-04-2005, 07:38 PM
This is my first post so don't be too harsh! hehe This is, well, obviously it's an eyeball. I've been experimenting with the SSS Skin material and this is what i've got so far! It's still missing something though, but i can't put my finger on it! Any help would be great!

http://img39.echo.cx/img39/6048/eyetest3ts.jpg

http://www.imageshack.us%5D%5BIMG%5Dhttp://img39.echo.cx/img39/6048/eyetest3ts.jpg%5B/IMG%5D

moidphotos
06-04-2005, 10:46 PM
The most obvious thing would be a bump / normal map to put the ridge in around the iris/ eyeball area. Paint some lines in the same map to bring the veins of the eye up from the surface. The diffuse texture looks a bit desaturated and perhaps a bit lo res as well. Without the extra surface detail it looks like a glass eye rather than a real eye. It's a good start though.:)

moidphotos
06-04-2005, 10:52 PM
I've been reading this thread for some time now and I'd like to say thanks to Jef and all the other regular posters for helping to increase my knowledge of Mental Ray.

A while ago people were mentioning trying to get the ambient occlusion map to render to texture and were having problems with it. I can't find if anyone posted the workaround by searching the thread, but I was lucky enough to talk to Chris Thomas of CG Academy recently and he told me how to do it.

Apply Amb/Occ to the desired object. Go to Render to Texture and choose to render out to a Complete map, not a shadow or self illumination map. This will give you a texture you can place in your self illumination slot and uncheck the colour swatch at the top of the material and make sure self illumination is set to 100%. You'll probably want to prevent lights in your scene from affecting the object as well.

Hope that helps someone as it was driving me nuts for ages!

whtnoise
06-05-2005, 04:10 AM
I've been digging into the hair stuff lately, thought this might be of interest:

http://www.cgtalk.com/showthread.php?p=2354451#post2354451

Cheers,

Jesse

gtsix
06-05-2005, 09:41 PM
Hello everybody:) ,

first of all let me thank you all for this thread, I'm a Mental Ray noob and I'm learning a lot from your tests.

I was doing some test with the SSS Physical material, and since i can't reach the results I need, here I am to ask you some help!

Green sss Cube alone (50x50 cm)
http://www.pixeloverdrive.com/tmp/sss_test_01.jpg

Green sss cube + light emitting object
http://www.pixeloverdrive.com/tmp/sss_test_02.jpg

I was wondering why there's no light/color-diffusion from the light-emitting object into the sss cube, and (also) why I can't get rid of the strange light diffusion into the green cube.

I tried for about 2 days tweaking every parameter, but nothing seems to work as I want :sad: ! Simply I cant show correctly objects inside other (SSS) objects!

Here are the mat setting settings for the 2 objects in the scene:

http://www.pixeloverdrive.com/tmp/sss_test_03.jpg


http://www.pixeloverdrive.com/tmp/sss_test_04.jpg

Thank you in advance for your help, and a special thank to Jeff Patton for sharing his knowledge (I started playing with MR using some of his scenes as a start :) )

Cheers
Gt6

JeffPatton
06-05-2005, 09:55 PM
The SSS material relies on photons (either caustic or GI...or both). So until a material that emits photons is created for our version of mental ray, that scene won't work as you have it now.

Now if you were to use a MR omni light in place of that light emitting material object, and enable "show icon in renderer", then it should work as expected (since the light would produce photons).

gtsix
06-05-2005, 10:14 PM
Thank for your quick reply Jeff! :) Got it, i thought that the light material I've created was emitting photons (you know, like it happens in vray).

Anyway, something strange in the way the object is seen thru the green cube still make me think I'm doing something (else) wrong!:sad:

I'll keep trying, thank you again!

Dayon
06-06-2005, 03:06 AM
Hi.

So. Let's say that I have a piece of glass: a box that is 50x50x2.5.

I also have a few tiny (something like 3x0.5x0.1) boxes that are white inside the glass.

I've been trying for the 2 hours to make this work. I want the glass to appear as if it has a light under it. I want the edges to glow, and the inside to glow slightly.

The tiny white boxes need to glow too, but that can probably be accomplished with a light.

In any case, It did not work. I've managed to get the entire thing to glow with MR, but I need to tone that down and make the edges glow more. I want it to look something like this (Mmm, Stargate Atlantis...)

Thanks.

Cryptite
06-08-2005, 07:01 AM
Hey guys, I'm using a mental ray texture to simulate a relatively glossy floor for a hangar bay. It's black and reflective. I was just wondering, what is the quickest rendering, or most efficient material/mental ray setup to use to simulate somewhat blurred reflections with a metallic floor that renders quickly?

Below is an image of the material look from a standard Scanline render with a regular raytraced material:

http://cryptite.f2o.org/SpaceBattle/hangarscreen1.jpg

Thanks!

pappuftp
06-08-2005, 07:32 AM
was wondering why there's no light/color-diffusion from the light-emitting object into the sss cube, and (also) why I can't get rid of the strange light diffusion into the green cube.

Some where earlier in this thread I read that that those two objects have to belong to the same ss group..then u will get the result u want..

gtsix
06-08-2005, 10:35 AM
Thank you pappuftp! Does this mean that I can't have an sss cube intersecting a (for example) a DGS sphere? Must they both be SSS objects?

Thank you again! :)

Gt6

JeffPatton
06-08-2005, 03:11 PM
Some where earlier in this thread I read that that those two objects have to belong to the same ss group..then u will get the result u want..

Only the fast SSS materials have/use the grouping options. It's not required for the physical SSS material.

Ran a quick test with the file that's available on my website and I don't see any problems with intersecting meshes and physical SSS:
http://www.jeffpatton.net/cg-post/MR-physic-sss-box.jpg

-Vormav-
06-09-2005, 06:07 AM
Just finally figured out DLL compiling today, so I'm starting to learn a little bit about writing MR shaders.
The first shader I wrote myself is an extremely simple blend material that simulates the 'lighten' blending mode that most compositing apps have available (you have to start small, no?). I'm attaching it, if anyone feels like playing around with useless toys. :p
You know the drill, DLL goes in the 3dsmax/mentalray/shaders folder, .mi file goes in the 3dsmax/mentalray/include folder.

-Vormav-
06-10-2005, 02:04 AM
Another version, now with a tolerance feature that....might work? http://cgtalk.com/images/smilies/suspicious.gif

Heh, this stuff gets pretty complicated really quickly.

EDIT: Seems to work as expected, except for extremely low tolerance values. Not sure why it acts the way it does with those. :shrug:

philipbruton
06-10-2005, 08:40 AM
Is this written specifically for max 7 + or cani use it with max 6.1 ??


Phil b

-Vormav-
06-10-2005, 09:04 AM
Should work just fine in both (though its only been tested on max6).
It's actually so basic that it should work on any version of Max that supports MR. :p

EDIT: I recall someone asking waaay back what the use of the UV & XYZ Generator materials are (considering that we have the UVW Modifier within Max). These materials are useful in generating the UV coordinates for MR materials that need them, and that aren't automatically given them by Max.
Texture Wave (base) is a good example of this; you have to give it the coordinates through shaders. The easiest way to do this is to apply an XYZ Generator map as the coordinate map of the shader. Then set the coordinate system option of the XYZ generator to '3' (explicit mapping channel).
Through using this, I was able to get results from all of the Texture (base) materials, including the hidden ones. However, the polka dot/polka sphere shaders don't work like they're supposed to (you only get a single dot, regardless of tiling), and the 8-color Texture Checkerboard (base) material ignores tiling from the XYZ Generator, so I'd say that that explains why a lot of these shaders were hidden.

-Vormav-
06-13-2005, 11:03 AM
Another shader. This one is a 10-slot morph material, since Max's MR connection didn't include the morpher material (and dealing with lots of different materials for morphing can be a pain in the ass with normal blend materials).
Probably has bugs, but it shouldn't crash max or anything...

philipbruton
06-13-2005, 06:36 PM
Wonderful stuff, keep up the good coding ;)

-Vormav-
06-13-2005, 07:49 PM
Blah. Finally tracked down the ridiculously simple problem with the gui that I couldn't figure out at 3am. Here's an updated .mi file.

BTW, does have a good understanding of how Max decides to organize all of its MR materials? I've been trying to get access to the base mr material 'Texture Turbulence.' I've unhidden the shader, but it still won't show up in the material editor. The only place I've seen it listed under the materials is when adding a map to a Texture Remap slot. That doesn't really make sense to me, because the shader was declared the same exact way as Texture Polka Dot/Texture Polka Sphere, and those are showing up as stanard maps just fine. :shrug:
EDIT: Nm...guess 'turbulence' is a scalar, not a color shader.:banghead:

sylph
06-13-2005, 08:53 PM
hello :) I think I need that material shown in the first post "non-blurred metal 2" but I cant find it in the mat materials .. can you help me?

philipbruton
06-14-2005, 09:10 AM
Have a look if it's in this bundle

matlibs (http://www.pbstudios.co.uk/matlibs.rar)

psv
06-14-2005, 03:32 PM
Vormav , keep going ............:thumbsup:

great work........

-Vormav-
06-14-2005, 08:59 PM
Another shader... If you've ever worked much with Z Brush to create displacement maps for Max, you might have found it to be extremely annoying that, unlike other apps, Max interprets pure black as the zero value for displacements, thus keeping you from getting any negative displacements in your image. Mental Ray represents normal colors as a floating point value from 0 to 1, but it can actually use colors within the engine ranging anywhere from -100 to 100. This shader will allow you to offset the colors of a bitmap, so that while your bitmap may only represent colors from 0 to 1, you can force MR to instead intrerpret these values in the range of -0.5 to 0.5 (the default middle-gray color gives such an offset, which is ideal for displacement mapping). Set "Color Offset" as the extrusion map for a 3d displacement, and then set your bitmap as the input of the color offset shader.
Worked when I tried it, but I have no idea how it's going to react with images that have 16-bits of data per channel. :shrug:
You can get the same effect by using an 'Output' shader and adjusting the color map to go from -.5 to .5, but it's kind of a pain in the ass to set this up every time you apply a new displacement map. Think of this shader as just a quick and easy fix.

-Vormav-
06-16-2005, 05:01 AM
And another one...
Had an idea for writing a cel shader, and it worked out (with only a minute's worth of debugging, too :D ).
It doesn't look quite as nice as an ink & paint render, but since it isn't based on raytracing it's a lot faster. You can use any shading model with this shader, too (could be used on reflections and refractions if you really wanted).

Usage: Start a mental ray material, and apply 'celshade' as the surface shader. In the input slot, apply a material to map shader, and put the material of your choice there. Before you see any results, you need to increase the "upperLevels" value. You won't see any changes when altering the lowerLevels value unless you change the 'surface' color. The 'surface' color acts as the dividing value for the level controls. Values that are brighter than the surface color use the upper levels, and values darker than the surface color use the lower levels (so, since you won't find any colors darker than black in your scene, setting the default surface color as black means that the lower levels aren't even applied).
Ideally, the surface color would be the same as the diffuse color of whatever shader you apply. However, you could also set this to a brighter color to isolate the specular highlights of your object for better or less defined highlights. Or the same for shadows.
This was just a quick writeup that just happened to work. I'll try and make a more user-friendly version at some point.

theotheo
06-16-2005, 09:21 AM
Hey -Vormav-! Nice to see people developing shaders for mental ray here. Keep up
the good work and thanks for sharing :)

-theo

-Vormav-
06-16-2005, 03:04 PM
Aaand a couple more shaders...
These ones are really pretty useless... I wanted to experiment with creating something more textural, so I did a checkerboard shader and a polka dot shader.
My variation of the checkerboard shader is mapped a bit differently than the default Checker shader. Mine is a full 3d map, whereas Max's relies on UVW mapping.
I created the dots shader because I couldn't seem to get the MR polkadot shader working correctly in Max. Either there's a problem with the shader itself, or Max simply isn't translating the XYZ coordinates properly when tiling, but I couldn't find any way to get a tiling effect with the polkadot shader in Max. As with my checkerboard shader, this one is a 3d map. The shader doesn't calculate properly if you set the radius value to be higher than half of the distancebtwn value, so just keep that in mind. It's probably easy enough to fix, but it's 7am and I'm tired as hell.
For both shaders, you need to apply an "xyz generator" map to the "coord" map slot. This automatically generates the xyz points that the shader needs.

And if you're wondering what it means for a map to be 3d...in the case of the checkerboard, imagine an infinite number of cubes stacked on top of each other in 3d space in a checkered pattern. A point on an object would be shaded by which one of these cubes it lies within, so to speak. I'm attaching a pic with a quick blizzard particle system that shows what I mean.
Kind of a neat effect...but like I said, "useless." It can also be a big disadvantage to be using full 3d maps, and not any uvw mapped textures, as you may quickly notice with these(best way to see this is to just use a sphere). In the case of the checkerboard shader, it can't even really be used for what is has most often been used for in the past (visualizing UVW mapping).

JeffPatton
06-16-2005, 03:30 PM
You gotta come up for air once and while man....lol. Good job on creating the shaders. :thumbsup:

bobg
06-16-2005, 03:53 PM
I created a scene which is a 2D array of spheres with UVW sherical maps applied to each. I have taken one of each of the materials in CGtalk-MR.mat (10/2004 version) and applied it to each sphere. If I hit render it goes through the photon emission portion of the render then pauses and then...


mental ray fatal error

mental ray has encountered a fatal error and the application will now shutdown. The error is:
DB 0.6 fatal 041052: accessing unknown tag 0x2
OK

I also get the exact same message/crash if I go into the material browser and select scene materials (which only contain un altered materials from the CGtalk-MR.mat file.

This only happens when I'm working with the CGtalk-MR.mat related materials.

I'm running Max 7.5 on a dual Xeon XP pro system with 1 GB RAM. I had this problem since before I upgraded to 7.5 from 7.0 SP1. Any thoughts?

I never had this issue with Max 6.

JeffPatton
06-16-2005, 04:17 PM
Can you narrow it down to a specific material? Does it give the same error if you don't enable any photons? Do you have any of the custom shaders discussed in this thread in your Max6 install that arent in your Max7 install?

bobg
06-16-2005, 04:39 PM
I brought over all of the 3rd party shaders from Max 6 to 7 that didn't cause errors when I booted Max 7. Most were adjusted to accomodate the higher version number in the Max 7 version of MR.

If I turn off GI, Caustics, and FG it will render part of the scene including only 3 partial sphere's: one mapped with "3D_Mikes_Trans_Skin", "BigRanS123 rock floor" and "BigRanS123 Skin" and then a crash again with the same message.

There is one target spot with Mental ray shadows on and one omni also with mental ray shadows on.

I haven't altered any of the CGtalk-MR.mat materials although I get a message looking for dirt14.jpg which I think is in the Ceramic Blue. I choose ignore and besides, the render quits before it get anywhere near the sphere with Ceramic Blue sphere.

JeffPatton
06-16-2005, 05:31 PM
I just tested all the materials on 59 (I think was the final number) spheres. One MR spotlight, no GI, FG, or Caustics. Rendered without any errors. (using Max7.5).

I guess I'd try one sphere and apply a single material per render to narrow down which mat is creating these problems for you.

I kept meaning to remove that ceramic material because it was just a test material of mine I left in there by accident. The missing map is from a purchased texture set, so I couldn't include it with the .mat library. I guess I should go in and either remove it or replace that map with a procedural. (one day)

bobg
06-16-2005, 08:30 PM
Thanks Jeff,

I deleted the Blue Ceramic material and deleted the two lights I had and replaced them with one MR area omni light. It worked.

Deleting the Blue Ceramic also stopped the crash from happening when I opened the Material/Map Browser.

Much obliged.

owenshire
06-17-2005, 02:06 AM
Hi all,


I am a student and just got into 3dsmax a few months ago. I have been following this thread for a month and have learned so much about MR shaders I never thought I'd be where I'm at now. I just want to say thank you to all who have posted here (especially Jeff P) and I will post my 3d final project when I finish rendering (its taking like 45 minutes per render and I'm doing different angles). I give all of you full credit because all the shaders I used were posted earlier. I just modeled it and make some textures in CS. Thank you all once again.

Just another struggling artist.

EDIT: Here they are. the main material used was DGS, but I threw some glass in there as well.

http://home.ripway.com/2005-5/315371/pinappleglasshouse.jpg

http://home.ripway.com/2005-5/315371/jellyfishandbrh.jpg

http://home.ripway.com/2005-5/315371/samplerenderwithtextures.jpg

And yes, that is Bikini Bottom.


On another note, I played around with the skin shader a bit and got totally different results as jeff, but cool none the less. This render took almost 2 hours.


http://home.ripway.com/2005-5/315371/creepycreature.jpg

-Vormav-
06-19-2005, 03:09 AM
Did a couple quick and easy shaders today, mostly for development purposes:
Scalar to Color - allows you to map shaders with scalar output (IE Texture Turbulence) to a color slot. Other apps with node-based material editors probably won't need anything like this, but you may need it in Max at some point... possibly...
Scalar Math - Provides simple math operations for scalars, and gives the output as a scalar value (note: in max, colors can be assigned as scalars, so you could actually use this for some basic color math operations as well). The mode defines the math operation: 1 is a-b, 2 is a*b, 3 is a/b (when you have b set to 0, this will just return 0), and anything else is a+b.

sanyilajos
06-20-2005, 10:55 AM
Vormav cool things, keep up the good work! :thumbsup:

khorask
06-24-2005, 02:35 AM
EDIT (again :) ): I just tried placing the files in the 3rd party direcotry and then loading them with max, via the instructions in 'mentalray\shaders_3rdparty\3rdparty.mi'. Now when loading the CG .mat I no longer get the error about a missing dlz. BUT, now when loading I get a list of errors about redeclarations. Im assuming this is because there are dlls with the same name and simular contents in both the standard and 3rd party shaders folders. eg of the error which occurs for about 40 different lines.

"API 0.0 warn 302005: .\shaders_3rdparty\include/physics.mi, line 37: while defining declaration "physical_lens_dof": ignoring redeclaration of function physical_lens_dof
API 0.0 error: found second definition of GUI "gui_physical_lens_dof" using first
"
Any reccommendations ?
Thanks Haps

------------------------------------------------------

EDIT: Thanks Vormav... I Checked, and mentalray.dlz has loaded according to max and without error. Just wanted to provide a little more info too...

When the missing dll window comes up and mentalray.dlz is listed, next to the filename it says, 'Class: mr_subScatter SuperClass: 0xC10'.

Thanks Again...

-------------------------------------------------------

Ive done a few searches on google as well as searched this forum for an answer, and though ive found a few people with the same problem ive never found the solution.

Im using Max 7 if it matters.
I download the mr-file zip & the cg materials file. I put the mrfiles in '3DMax7\mentalray\shaders_standard' in the correct include and shaers folders, and I place the materials file in 3DMax7\matlibs.

There is NO problem when loading max about missing dlls or anything, but when I load the CG-materials file in the material editor I get a message saying 'mentalray.dlz cannot be found'.
After taking a look mentalray.dlz is located in my 3DMax7\stdplugs directory. I dont know much about dlzs or where they should be located so I tried putting a copy in the standard mentalray shaders folder but max still says it cant find it.

The materials still load and I can apply them to objects but I am unsure on whether or not they are rendering correctly. Out of curiosity what does mentalray.dlz provide to mentalray ?

Thanks in advanced,
-Ben

-Vormav-
06-24-2005, 03:41 AM
mentalray.dlz is the plugin file that provides Max with its Mental Ray connection. It should be placed in the stdplugs folder, so that shouldn't be your problem. Not sure what exactly it could be then, but be sure to check the plugin manager (from the customize menu) to see if mentalray.dlz is still loading or not.

JasonCamp
06-27-2005, 10:41 PM
well all been a while sence i droped by and said photon, just wanted to point out i have 21 days left in my enlistment in the navy, and ill be here to help unfrustrate jeffy ( as well as pester him with my own questions ) soon , not only did i ship my computer home , but my laptop finnaly bit the big overheat .. heh found out that that particular toshiba satalite is accually was in a class action law suite, and i should get 500$ in the mail soon.. hopefully .. i might use that to drop into a render computer that way i can have my pc back again .. so for the past month ive been computerless except this on at work wich hahha is dell's version of a e-machine... i even have a hard time serfing the net if that gives you any idea ... anywho ill keep in touch, hopefully ill have a lot more time to dedicate until school starts, to work off all the ideas ive had while i havent had a pc, and to finnish the gold ball room i was working on... wich just needs a few more texturizing and lighting... maybe some atmosphere volume as well, if i can squeese it from my pc heh ...

also on a side project before my laptop finnaly melted down i was experimenting with more gi,and shaddows... if i remember correctly i had 2 ski lights one for the hdri (light blue color with some clouds), another for the ambient brightness wich was just the plain sunlight faint white yellow color with no hdri maping... then for the sunlight shadows i was useing a plain photometric point light like really far away but turned up to like insane ammounts of brightness, i was geting a good sunlight brightness and some good colorbleeding gi (even though i hadnt textured it yet)

if anybody can get a good produceing sunlight that does good gi lemme know , i tried the sunlight photometric light with the light shader on it but i didnt like the gi results.. ill have to show you in 21 days what i mean... after i pull the file off my laptops hdd... heh ill have to use a usb converter too cuz the laptops dead totaly heh

jot_ie
06-29-2005, 03:04 PM
Hi all, from Dublin Ireland
I have been following this thread as best I can in an effort to teach myself mental ray.
I must say a huge big thank you to all the guys who contribute here. Its very self-less of you all and very much appreciated.

I need a bit of assistance with an architectural visualistaion I am trying to create in max.
If you can imagine a simple multi-storey building with dividing floors; and walls on three sides.
The front is glass. I am trying to illuminate the interior with mr area spots.
The glass is a mr glass with lume etc....etc....I have an eis sun and sky.

I am using gi, fg, and caustics (for the glass wall).

The viewpoint is outside the building looking in.

When I turn on the interior lights mental ray says no photons stored. When they are off it renders without errors.

I have to try to do my final render on this tonight.
Any/all assistance very much appreciated.

Best regards
John

Cryptite
06-30-2005, 01:02 AM
Hey guys, I have a reflective strange object and a simple mr Omni light with area shadows on producing the below effect. I'm trying to render a rather large resolution print of it but i'm getting these imperfections (small white dots, ugly pixelated edges to shadow of reflective object, less than stellar shadow). Anyone know how I can resolve this?

http://cryptite.f2o.org/images/Abstract_ex.jpg

JasonCamp
07-01-2005, 06:58 PM
hello , well id have to say the dark gray area is in fact because you are ray tracing nothing in the background, and mr omni's are just bad shaddows in my thoughts... i would suggest a normal photometric light with global illum and all the goodies.. and put a background or something covering the top area where there is nothing but void space it takes a lot to get to get use to and learn but i can deffinatly say phometric's and mr does its justice

saiko
07-02-2005, 12:22 PM
hi
after long time i'm in this thread......

are u guys using max 7.5, with mentalray 3.4

is there any large difference in speed? MR 3.4 is supposed to give similar result with 1/10th of finalgathering..... is it true?

what else is new in it? i mean compared to MR 3.3.

J.O.
07-05-2005, 01:49 AM
Cryptite: Tried fluffing up sample count? That seems like the issue.
About sunlight, I managed to get very nice results with one directional light and slightly orange and one skylight with light blue.
For the images below I placed both light sources with 0.5 intensity. Final gather was of course, on with 150 samples. The result was very nice, with render times topping mere 40 seconds for a greebled cube of 10x10x10 segments on a P4 2.6, 512 RAM.
http://img292.echo.cx/img292/939/a11mx.jpg
http://img292.echo.cx/img292/288/a29xk.jpg

For the last one, Dirtmap did a sweet job to do the light coming from the "alleys"
(self-illumination slot, on the dirt I applied a glow shader)
I also made a big greebled sphere, it seems to be a molten orb exturding peices of metal which cool down. The effect is specially sweet and could create interesting images if a very faintly illuminatied scene had some activity with simple meshes. :bounce:
http://img292.echo.cx/img292/1900/a31dz.jpg

Cryptite
07-05-2005, 08:30 AM
I do have a sky half-sphere working for the reflections and environment.

Turning the samples up helped with the shadows and ugly pixelation, however i'm still getting these white dot artifacts still... Any ideas how to get rid of those?

http://cryptite.f2o.org/images/Abstract_ex2.jpg

J.O.
07-05-2005, 01:07 PM
Hmm. Do you have glare doing any blooming? In a scene of mine by having it actvated it'd create strange red artifacts, much like those dots. I had to turn it off and do a glare mask manually in photoshop after the render. :hmm:

DDS
07-05-2005, 04:01 PM
Has anyone any idea to bake projected ambient occlusion, of course with some good render times?

I usually do it with skylight and scanline and it's slow as hell (even with low samples and resolution) and make me lose a lot of hours!

Thanks in advance.

Ech0
07-05-2005, 04:51 PM
heys guys first off thanks to eveyone who contributes tothis threadona regular basis secondly for all you masters of materials out there i have a quick question im trying to recreate a wood floor like a basketball court(indoor ) l. so i can make the floor texture no problem thats the easy part but it needs to have that glossy finish like its been waxed is there any easy ideas how to acheive this im sure there is it just i cant place my finger on it . It will be used as a still imaged which also will be touched up in post using photoshop

J.O.
07-05-2005, 05:19 PM
Has anyone any idea to bake projected ambient occlusion, of course with some good render times?

I usually do it with skylight and scanline and it's slow as hell (even with low samples and resolution) and make me lose a lot of hours!

Thanks in advance.

Perhaps applying the ambient occlusion shader at the surface may give better results. Though fluff up it's sample count since it's quite grainy.
Dirtmap also could do it, but you should tune the occlusion so it gets scaled properly
Oh, you are using scanline. Yes, that's slow as hell. For mental ray, around 200 final gather samples (even less depending on the other setitngs) can create reasonably smooth shadows. I never tried baking the occlusion myself, but I beleive it works normally (skylight&final gather, bake the texture normally)

sanyilajos
07-05-2005, 07:50 PM
To Cryptite:
I think those littel white pixels are because of the image sampling, but you could also trye converting your model to nurbs, they behave a bit better in mental ray.

sanyilajos
07-05-2005, 08:34 PM
By the way, is there a way to make clouds with parti volume shader, or with any other volume shader, in MR????...

JasonCamp
07-05-2005, 09:01 PM
j.o. - awesome light that is one light i haddent tried yet for a sun, was hopeing for a photometric setting maybe something i overlooked but i guess i could manage a d-light accually i think i might have acchived it but ill have to way for 14 more days until i get out of the military to find out for sure , when i can rip the max file from my dead laptops hdd and see where i had left off at heh thx tho ill give it a few shots

Cryptite - whats your half sphere showing ? i mean is it a real reflection ? i know when i was testing metal shading it was doing that to me and i tossed less reflection and switched to a photometric and or regular omni and it stoped...

Ech0 - whatz up - specular maping is the key to what you need , its like the oppisite of bump maping er a grayscale tga file set up like how you would do an occupacy map and i think instead of like a bump map where the dark is the deap spots , its accually the non shiny and the light are where it would be more... uh well i guess that would be similar to the bump map eh heh sorry if i am confusing

-Vormav-
07-05-2005, 10:51 PM
By the way, is there a way to make clouds with parti volume shader, or with any other volume shader, in MR????...
Sort of... If you use a noise map with a sharp contrast as a projector map for the lights that your parti volume shader uses, then mess with the g2 value (get it close to 1, leave extinction at .001) of your parti volume shader, and set a transmat shader as your surface shader, you can get some cloud-like results.
I'm attaching an example of this, using a two omni lights (it'd probably work better with direction lights), with the material applied to a box that goes over the whole scene. Just a quick test to get an idea of what can be done. Render times getting pretty high really quick (especially if you mess with the non-uniform value...don't even bother messing with that; it isn't worth the blow to your render time) when using parti volume for things like this, so I'd recommend looking into a different, more flexible option.

J.O.
07-05-2005, 11:21 PM
To Cryptite:
I think those littel white pixels are because of the image sampling, but you could also trye converting your model to nurbs, they behave a bit better in mental ray.

Actually I talked with cryptite this morning by MSN. He said that was the issue (glare), so seems glare currently has an error and sometimes creates artifacts DURING the render, not after it when it is applied.:hmm:
I got a scene that is 100% sure to create them in my PC, but so far I didn't have the nerve to pack it and upload :D
For the clouds, what about particle-based ones? Some procedurals could do the base particles, then all you'd need to do is manage them into the shapes of clouds...

evil-98
07-06-2005, 04:38 AM
does matte/shadow materials work with MR, b/c if it does i cant get it to work... or is there another way to do HDRI compositions or any.. thanks

this was the only way i could think of doing it. ambient/reflective occlusion in opacity channel dirtmap in diffuse.

those are also a couple shaders i been working on
http://www.impluggedin.net/thespecialists/upload/userfiles/evil98/shaders.jpg
heres a better look at the pearlescent ones

http://www.impluggedin.net/thespecialists/upload/userfiles/evil98/pearles1.5.jpg

evil-98
07-06-2005, 04:40 AM
does matte/shadow materials work with MR, b/c if it does i cant get it to work... or is there another way to do HDRI compositions or any.. thanks

JeffPatton
07-06-2005, 06:03 AM
does matte/shadow materials work with MR, b/c if it does i cant get it to work... or is there another way to do HDRI compositions or any.. thanks

http://www.cgtalk.com/showthread.php?t=147630&highlight=matte+mental

evil-98
07-06-2005, 06:17 AM
oh. ok thanks

-Vormav-
07-06-2005, 06:53 AM
does matte/shadow materials work with MR, b/c if it does i cant get it to work... or is there another way to do HDRI compositions or any.. thanks

this was the only way i could think of doing it. ambient/reflective occlusion in opacity channel dirtmap in diffuse.

Matte/shadow does work (or at least that was the case the last time I checked...), but this has nothing to do with the apparent shadows you get from GI/FG/ambient occlusion. I've been tossing around some ideas on how to create a simple matte/shadow material that would work for those elements as well, but I'm not entirely sure how to do it yet, since FG/GI calculations are dependant upon the diffuse value that's present.

SoLiTuDe
07-06-2005, 09:48 AM
don't know if you guys have played with this yet... try putting the "material to shader" material into the diffuse slot of a standard material... then add the matte/shadow to that map with opaque alpha on and additive reflections OFF ... it's possibly some sort of a start, though it isn't "real" it will mostly make the material transparent and keep the gi shadows that fg/gi creates ... It does a little bit of wierd stuff like making things brighter/additive when it has more light on it n also being able to see the basic plane no matter what... I experimented with this having a basic evn. background and using just a skylight with FG on...
it's hard to tell, but...

http://www.innersolitude.com/test1.jpg

edit: this prob won't work... been playin with a lil bit:
maybe instead of this, using a composite material? Make the matte shadow the base layer, and have just the gi recieved from the map above it be applied???

Anywho... possibly worth looking into.. i'll play to see if i come up with anything tho i doubt i will... till i learn c++ =)

bgawboy
07-07-2005, 06:16 AM
Thought this might be of interest ...
mental images is now offering training for writing mental ray shaders

The three-day intensive class, based in LA for the first two classes,
will take place on the following dates:

July 13-15 (Wed.-Fri.)
Aug. 8-10 (Mon.-Wed., in the week after SIGGRAPH)

For more details, see: http://www.lamrug.org/training.html

-Vormav-
07-07-2005, 06:34 AM
Hey, thanks for posting that info. I'm going to try and make the classes in July, if the student pricing turns out to be affordable (checking on that right now). The regular pricing for the class includes a full standalone MR license, so I'm guessing the student fees may be significantly lower.

Arkon11
07-07-2005, 10:15 PM
Can someone here tell me how to save a final gather solution, so I don't have to re-calculate FG for every frame?

thanks,

Arkie

-Vormav-
07-08-2005, 01:30 AM
Can someone here tell me how to save a final gather solution, so I don't have to re-calculate FG for every frame?

thanks,

Arkie

Arkon - you have to select the box by the "use file" checkbox in the final gather rollout, to specify a filename for the finalgather photon map to be saved to. Then make sure the "use file" option is checked, and also uncheck the "rebuild" option. Alternatively, you can skip the file name process, and just uncheck the rebuild option, to just rely on your cache for reusing the solution.

Also, I got some info on student pricing for that class. $995 gets you a reserved seat in the class, or you can get in at $495 provided that the class doesn't completely fill up. I think I'll have to wait til next year on this one. :(

yoshimitsu
07-08-2005, 03:28 PM
I'm using max 7 with mental ray 3.3 and I can't exlude objects from shadow casting using the standard object properties.
I have an normal flipped sphere encompassing my scene as a background, and a globe and running bull which I want to exclude from casting shadows on the BGsphere. Even when the globe is set to not cast shadows, and the BGsphere is set not to recieve shadows, shadows are still cast.
The globe is a blend material with opaque continents and a semi transparent, reflective raytrace mat for the water. When I specifically exclude the globe from the main light's shadow casting exclude list, the continents dont cast shadows, but the ocean still does.
I solved this by using a transparency base for the globe material's shadow param in MR connection, but I want the globe and bull to cast shadows on other objects in the scene as my animation progresses, so this is not really a good fix. Does anyone know how to make the standard 3dsproperties for shadows hold true in the MR renderer?

reiv
07-09-2005, 11:13 AM
Hi there,
I got a problem with SSS fast skin shader and mentalray area lights.
When I use sss_fast_skin material lit by mental ray light (omni or spot): the terminator zone is not smooth/bugs with with area light parameter is enabled. When turned off, it's perfect :/.
http://re1v.free.fr/imgup/wip/SSSbug02.jpg

I've already try to have some tips from the genral forum but I didn't get any tips :/.
I also get an other problemwith mr and I still don't have solution:
The sahdow/light falloff map in 3dsMax doesen't seem to work with mental ray when using GI or skylight ( http://www.cgtalk.com/showthread.php?t=251110 ).

Thanks in advance,
reiv.

steven xu
07-11-2005, 04:10 AM
jeff,i found the the MR control the color overflow was not very good~
use the Max default material without FG it will be all fine
but if i used FG,color overflow will very obvious!
for exsample:red floor & white ceiling,one MR omni,after FG,the ceiling will looks very red~
i always use the architecture material+photon base to control it,
or DGS material+DGS photon(too slowly)
is any another way to control MR's color overflow??
thanks......

steven xu
07-11-2005, 04:25 AM
jeff,i found the the MR control the color overflow was not very

good~

use the Max default material without FG it will be all fine

but if i used FG,color overflow will very obvious!

for exsample:red floor & white ceiling,one MR omni,after FG,the

ceiling will looks very red~

i always use the architecture material+photon base to control

it,

or DGS material+DGS photon(too slowly)

is any another way to control MR's color overflow??

thanks~~

steven xu
07-12-2005, 04:48 AM
is anybody know?

JasonCamp
07-12-2005, 03:55 PM
i personaly like the photmetric lighting better, its slower to process but its worth it in the long run. that might be a shadow maping problem , or maybe the samples in the mr light not sure though... i suggest a photometric though its also a pain to find the correct settings on it also even but its more realisitic looking

wxyz
07-12-2005, 09:36 PM
Sort of... If you use a noise map with a sharp contrast as a projector map for the lights that your parti volume shader uses, then mess with the g2 value (get it close to 1, leave extinction at .001) of your parti volume shader, and set a transmat shader as your surface shader, you can get some cloud-like results.
I'm attaching an example of this, using a two omni lights (it'd probably work better with direction lights), with the material applied to a box that goes over the whole scene. Just a quick test to get an idea of what can be done. Render times getting pretty high really quick (especially if you mess with the non-uniform value...don't even bother messing with that; it isn't worth the blow to your render time) when using parti volume for things like this, so I'd recommend looking into a different, more flexible option.

Is it possible to post a file for this intriqguing technique?

Adalast
07-13-2005, 09:30 PM
i put in all the shader files and all that were provided from the thread mod, and now none of my mental ray shaders will work. max dumps on me when i try to use one. please please help me out. i was a moron and didn't back up my files before i overwrote the originals, and i really don't want to have to reinstall everything. can someone please help me out, i'm including the error message in it's entirety

it's very long, but basically it just says that none ofthem are working anymore, and i really need them to.

MSG 0.0 info : version 3.2.6.20, 29 Sep 2003

MSG 0.0 info : compiled on: Windows_NT_4.0_x86

MI 0.0 warn 122001: standard startup file ray3rc not found

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 99: while defining declaration "mib_texture_vector": ignoring redeclaration of function mib_texture_vector

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 127: while defining declaration "mib_texture_remap": ignoring redeclaration of function mib_texture_remap

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 149: while defining declaration "mib_texture_rotate": ignoring redeclaration of function mib_texture_rotate

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 169: while defining declaration "mib_bump_basis": ignoring redeclaration of function mib_bump_basis

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 195: while defining declaration "mib_bump_map": ignoring redeclaration of function mib_bump_map

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 221: while defining declaration "mib_passthrough_bump_map": ignoring redeclaration of function mib_passthrough_bump_map

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 243: while defining declaration "mib_lookup_spherical": ignoring redeclaration of function mib_lookup_spherical

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 274: while defining declaration "mib_lookup_cube1": ignoring redeclaration of function mib_lookup_cube1

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 313: while defining declaration "mib_lookup_cube6": ignoring redeclaration of function mib_lookup_cube6

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 362: while defining declaration "mib_lookup_background": ignoring redeclaration of function mib_lookup_background

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 402: while defining declaration "mib_lookup_cylindrical": ignoring redeclaration of function mib_lookup_cylindrical

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 437: while defining declaration "mib_texture_lookup": ignoring redeclaration of function mib_texture_lookup

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 461: while defining declaration "mib_texture_filter_lookup": ignoring redeclaration of function mib_texture_filter_lookup

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 489: while defining declaration "mib_texture_checkerboard": ignoring redeclaration of function mib_texture_checkerboard

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 509: while defining declaration "mib_texture_polkadot": ignoring redeclaration of function mib_texture_polkadot

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 528: while defining declaration "mib_texture_polkasphere": ignoring redeclaration of function mib_texture_polkasphere

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 549: while defining declaration "mib_texture_turbulence": ignoring redeclaration of function mib_texture_turbulence

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 570: while defining declaration "mib_texture_wave": ignoring redeclaration of function mib_texture_wave

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 591: while defining declaration "mib_reflect": ignoring redeclaration of function mib_reflect

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 621: while defining declaration "mib_refract": ignoring redeclaration of function mib_refract

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 650: while defining declaration "mib_transparency": ignoring redeclaration of function mib_transparency

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 675: while defining declaration "mib_opacity": ignoring redeclaration of function mib_opacity

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 700: while defining declaration "mib_twosided": ignoring redeclaration of function mib_twosided

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 727: while defining declaration "mib_refraction_index": ignoring redeclaration of function mib_refraction_index

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 751: while defining declaration "mib_dielectric": ignoring redeclaration of function mib_dielectric

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 787: while defining declaration "mib_ray_marcher": ignoring redeclaration of function mib_ray_marcher

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 826: while defining declaration "mib_illum_lambert": ignoring redeclaration of function mib_illum_lambert

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 869: while defining declaration "mib_illum_phong": ignoring redeclaration of function mib_illum_phong

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 923: while defining declaration "mib_illum_ward": ignoring redeclaration of function mib_illum_ward

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 984: while defining declaration "mib_illum_ward_deriv": ignoring redeclaration of function mib_illum_ward_deriv

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1014: while defining declaration "mib_illum_blinn": ignoring redeclaration of function mib_illum_blinn

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1070: while defining declaration "mib_illum_cooktorr": ignoring redeclaration of function mib_illum_cooktorr

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1125: while defining declaration "mib_illum_hair": ignoring redeclaration of function mib_illum_hair

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1152: while defining declaration "mib_volume": ignoring redeclaration of function mib_volume

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1172: while defining declaration "mib_color_alpha": ignoring redeclaration of function mib_color_alpha

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1198: while defining declaration "mib_color_average": ignoring redeclaration of function mib_color_average

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1224: while defining declaration "mib_color_intensity": ignoring redeclaration of function mib_color_intensity

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1264: while defining declaration "mib_color_interpolate": ignoring redeclaration of function mib_color_interpolate

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1370: while defining declaration "mib_color_mix": ignoring redeclaration of function mib_color_mix

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1517: while defining declaration "mib_color_spread": ignoring redeclaration of function mib_color_spread

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1607: while defining declaration "mib_geo_cube": ignoring redeclaration of function mib_geo_cube

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1626: while defining declaration "mib_geo_torus": ignoring redeclaration of function mib_geo_torus

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1659: while defining declaration "mib_geo_sphere": ignoring redeclaration of function mib_geo_sphere

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1685: while defining declaration "mib_geo_cone": ignoring redeclaration of function mib_geo_cone

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1716: while defining declaration "mib_geo_cylinder": ignoring redeclaration of function mib_geo_cylinder

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1747: while defining declaration "mib_geo_square": ignoring redeclaration of function mib_geo_square

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1765: while defining declaration "mib_geo_instance": ignoring redeclaration of function mib_geo_instance

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1783: while defining declaration "mib_geo_instance_mlist": ignoring redeclaration of function mib_geo_instance_mlist

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1799: while defining declaration "mib_geo_add_uv_texsurf": ignoring redeclaration of function mib_geo_add_uv_texsurf

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1820: while defining declaration "mib_photon_basic": ignoring redeclaration of function mib_photon_basic

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1856: while defining declaration "mib_light_infinite": ignoring redeclaration of function mib_light_infinite

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1877: while defining declaration "mib_light_point": ignoring redeclaration of function mib_light_point

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1899: while defining declaration "mib_light_spot": ignoring redeclaration of function mib_light_spot

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1920: while defining declaration "mib_shadow_transparency": ignoring redeclaration of function mib_shadow_transparency

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1961: while defining declaration "mib_lightmap_write": ignoring redeclaration of function mib_lightmap_write

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\base.mi, line 1994: while defining declaration "mib_lightmap_sample": ignoring redeclaration of function mib_lightmap_sample

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 53: while defining declaration "contour_store_function": ignoring redeclaration of function contour_store_function

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 69: while defining declaration "contour_store_function_simple": ignoring redeclaration of function contour_store_function_simple

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 102: while defining declaration "contour_contrast_function_levels": ignoring redeclaration of function contour_contrast_function_levels

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 152: while defining declaration "contour_contrast_function_simple": ignoring redeclaration of function contour_contrast_function_simple

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 181: while defining declaration "contour_shader_simple": ignoring redeclaration of function contour_shader_simple

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 209: while defining declaration "contour_shader_randomwidth": ignoring redeclaration of function contour_shader_randomwidth

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 240: while defining declaration "contour_shader_randomtransparency": ignoring redeclaration of function contour_shader_randomtransparency

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 271: while defining declaration "contour_shader_curvature": ignoring redeclaration of function contour_shader_curvature

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 305: while defining declaration "contour_shader_factorcolor": ignoring redeclaration of function contour_shader_factorcolor

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 338: while defining declaration "contour_shader_depthfade": ignoring redeclaration of function contour_shader_depthfade

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 388: while defining declaration "contour_shader_framefade": ignoring redeclaration of function contour_shader_framefade

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 436: while defining declaration "contour_shader_layerthinner": ignoring redeclaration of function contour_shader_layerthinner

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 470: while defining declaration "contour_shader_widthfromcolor": ignoring redeclaration of function contour_shader_widthfromcolor

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 506: while defining declaration "contour_shader_widthfromlightdir": ignoring redeclaration of function contour_shader_widthfromlightdir

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 545: while defining declaration "contour_shader_widthfromlight": ignoring redeclaration of function contour_shader_widthfromlight

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 589: while defining declaration "contour_shader_combi": ignoring redeclaration of function contour_shader_combi

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 654: while defining declaration "contour_only": ignoring redeclaration of function contour_only

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 685: while defining declaration "contour_composite": ignoring redeclaration of function contour_composite

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\contour.mi, line 719: while defining declaration "contour_ps": ignoring redeclaration of function contour_ps

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 24: while defining declaration "LumeTools": ignoring redeclaration of function LumeTools

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 521: while defining declaration "Adjustments": ignoring redeclaration of function Adjustments

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 531: while defining declaration "BumpCapture": ignoring redeclaration of function BumpCapture

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 548: while defining declaration "Glare": ignoring redeclaration of function Glare

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 562: while defining declaration "Distortion": ignoring redeclaration of function Distortion

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 573: while defining declaration "Night": ignoring redeclaration of function Night

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 579: while defining declaration "WrapAround": ignoring redeclaration of function WrapAround

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 594: while defining declaration "Beam": ignoring redeclaration of function Beam

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 620: while defining declaration "Mist": ignoring redeclaration of function Mist

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 632: while defining declaration "Submerge": ignoring redeclaration of function Submerge

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 691: while defining declaration "Landscape": ignoring redeclaration of function Landscape

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 714: while defining declaration "EdgeShadow": ignoring redeclaration of function EdgeShadow

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 727: while defining declaration "WaterSurfaceShadow": ignoring redeclaration of function WaterSurfaceShadow

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 742: while defining declaration "Facade": ignoring redeclaration of function Facade

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 793: while defining declaration "Glass": ignoring redeclaration of function Glass

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 806: while defining declaration "Glow": ignoring redeclaration of function Glow

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 826: while defining declaration "Edge": ignoring redeclaration of function Edge

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 839: while defining declaration "Metal": ignoring redeclaration of function Metal

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 845: while defining declaration "Stain": ignoring redeclaration of function Stain

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 856: while defining declaration "Translucency": ignoring redeclaration of function Translucency

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 869: while defining declaration "WaterSurface": ignoring redeclaration of function WaterSurface

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 878: while defining declaration "Wet": ignoring redeclaration of function Wet

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 898: while defining declaration "Illumination": ignoring redeclaration of function Illumination

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 926: while defining declaration "Ocean": ignoring redeclaration of function Ocean

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 945: while defining phenomenon declaration "Lume Glow Material (Lambertian)": ignoring redeclaration of function Lume Glow Material (Lambertian)

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 984: while defining phenomenon declaration "Lume Metal Material (Phong)": ignoring redeclaration of function Lume Metal Material (Phong)

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\lume.mi, line 1019: while defining phenomenon declaration "Lume Translucent Material (Lambertian)": ignoring redeclaration of function Lume Translucent Material (Lambertian)

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 37: while defining declaration "physical_lens_dof": ignoring redeclaration of function physical_lens_dof

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 70: while defining declaration "physical_light": ignoring redeclaration of function physical_light

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 115: while defining declaration "dgs_material": ignoring redeclaration of function dgs_material

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 172: while defining declaration "dgs_material_photon": ignoring redeclaration of function dgs_material_photon

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 228: while defining declaration "dielectric_material": ignoring redeclaration of function dielectric_material

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 277: while defining declaration "dielectric_material_photon": ignoring redeclaration of function dielectric_material_photon

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 324: while defining declaration "oversampling_lens": ignoring redeclaration of function oversampling_lens

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 355: while defining declaration "path_material": ignoring redeclaration of function path_material

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 422: while defining declaration "parti_volume": ignoring redeclaration of function parti_volume

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 499: while defining declaration "parti_volume_photon": ignoring redeclaration of function parti_volume_photon

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 562: while defining declaration "transmat": ignoring redeclaration of function transmat

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics.mi, line 576: while defining declaration "transmat_photon": ignoring redeclaration of function transmat_photon

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics_phen.mi, line 38: while defining phenomenon declaration "dgs_material_phen": ignoring redeclaration of function dgs_material_phen

MI 0.0 error 121001: C:\3dsmax6\mentalray\shaders\physics_phen.mi, line 72: not a material phenomenon

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics_phen.mi, line 132: while defining phenomenon declaration "dielectric_material_phen": ignoring redeclaration of function dielectric_material_phen

MI 0.0 error 121001: C:\3dsmax6\mentalray\shaders\physics_phen.mi, line 164: not a material phenomenon

API 0.0 warn 302005: C:\3dsmax6\mentalray\shaders\physics_phen.mi, line 222: while defining phenomenon declaration "transmat_phen": ignoring redeclaration of function transmat_phen

MI 0.0 error 121001: C:\3dsmax6\mentalray\shaders\physics_phen.mi, line 234: not a material phenomenon

JeffPatton
07-13-2005, 09:54 PM
Simply delete your MR folder and perform a repair from your 3dsmax installation disc.

-Vormav-
07-14-2005, 12:51 AM
Is it possible to post a file for this intriqguing technique?
Sure. I'm attaching a Max6 file that shows a cityscape with clouds scenario (you'll need to have greeble installed to view it).
Like I said though, it's painfully slow, especially if you're hoping to use it for an animation (You should be able to animated these clouds just by animating the noise projection map, but because of the high render times, I have not yet tried this). It also brings up a lot of problems when attempting to light a scene, many of which I ran into when creating this last scene. But there are a lot of ways to tweak the clouds, and they are 3-dimensional to some extent... I guess my main point is that there are much better alternatives for clouds. Dreamscape's true 3d clouds may even be more suitable for production than this technique, and they even offer self-shadowing (which is pretty essential for that extra bit of realism - you can't have any self-shadowing or cast shadows from clouds created with parti volume).
A few quick tips though: Make sure you disable cast and receive shadows from your cloud object if you're going to use any form of indirect illumination. Otherwise, you'll really just have extremely slow photon gathering, without really having any change in the scene. Also, the thickness of the clouds is largely dependant upon the thickness of your cloud object, which would make sense.

Adalast
07-15-2005, 04:40 AM
ok, i'm finally back up and running. and back to working on my scene that i was trying to get done. it's a patriotic piece, and i'm having some trouble getting the shadows right. everything is glass, and all i can get is opaque shadows. i'm using 3 mr Area Spots to light the scene, and I'm liking how things are going, but the shadows are bugging me. I tried to put in the Transparent Shadow shaders, but they didn't work. please help me out.

http://www.geocities.com/adalastdof/Version2.jpg

-Vormav-
07-15-2005, 06:23 AM
I tried to put in the Transparent Shadow shaders, but they didn't work. please help me out.
Did you put the shadow shader on your shadow casting object (right) or the object that is receiving the shadows (wrong)? It's a common mistake...

Brix
07-15-2005, 07:41 AM
Hey

As it is my first post, as a first thing i want to say "thank you" to all people involved in this thread. You're doing great job! http://cgtalk.com/images/smilies/thumbsup.gif

Now, time for my question.
As you can see on the attached image, i have a pretty large chamber with a big collumn in the middle and several gallerys on the outside ring forming a "stadium". There are six photometric point lights coming form the lamps respectively.
For the past few weeks i've been trying to create a decent, hopefuly realistic-looking, shader that can be apllied to the column. A brushed steel type shader without any texture maps.
I know that i literally suck with all material-related things, so it took me quite a time to come up with what i have now and i'm still not fully satisfied with it. So i ask you for a little help - can you suggest something to improve this shader? Thanks. http://cgtalk.com/images/smilies/smile.gif

Here's the pic:
http://img338.imageshack.us/img338/1007/tantisstextures434ms.th.jpg (http://img338.imageshack.us/my.php?image=tantisstextures434ms.jpg)

DDS
07-15-2005, 09:45 AM
Hey

A brushed steel type shader without any texture maps.
I know that i literally suck with all material-related things, so it took me quite a time to come up with what i have now and i'm still not fully satisfied with it. So i ask you for a little help - can you suggest something to improve this shader? Thanks. http://cgtalk.com/images/smilies/smile.gif


I think you should play with your specular, it's the most important thing in some metals. You should add the bump or whatever u have there to add more variety and contrast to it.

DDS
07-15-2005, 09:56 AM
Hi again,

I have a huge problem.

We are rendering a sequence using realtime models, and we're using MR.

The problem comes because the main subject of the sequence is a car, and obviously it's normal mapped. For the reflections I use raytrace material, because standard is WAY too slow. But it seems that raytrace material doesn't work with the normal bump map, so I can't use normal maps.

Do you know how can I get fast reflections with a normalmapped material?

Thanks a bunch :)

DDS.

Adalast
07-15-2005, 10:28 AM
Did you put the shadow shader on your shadow casting object (right) or the object that is receiving the shadows (wrong)? It's a common mistake...

yes, i did have the shadow shader on the objects that are casting the shadows (the bars and the star), and i played with all the settings to no avail. no matter what i did, they always came out with the standard raytraced shadows. never changed. any other suggestions?

JasonCamp
07-21-2005, 03:41 AM
well everybody im finnaly finnished with my enlistment with the navy, now down to some serious cg work, man they did a number on cgtalk.. cgsociety rather, still dont know where the link to goto the subscribed threads is.. ah well
i have a lot of time now to start 3 detailed shots, one of them i just need to finnish and set some time aside to render it ehh if it will render i should say damn ray tracing is slowwww and i just happen to love glass lol
hopefully soon ill have some wip shots, starting a new project , a garden in wich ill have to do some form of transparent/translucent fiberglass pannels .. ill probably need some suggestions, past few days ive been unpacking ugh,

oh btw j.o. thanks for the help with the sunlight setup, its was a trick to get the falloff right but i managed a good lighting combo in like just a hour of tweeking and it made some good gi too ..thanks again..

Adalast
07-21-2005, 05:10 PM
i one of my shadow problems, now i need help with one more.

i need some help with the shadows directly beneath the star. i can't figure out what is going on with them. if anyone can help, please do.

http://www.geocities.com/adalastdof/Version3.jpg

philipbruton
07-21-2005, 08:23 PM
post the max file and i'll help as much as i can.

hjalle
07-22-2005, 11:24 AM
Is it some one ho knows how to use "XYZ generator" shader.
??????????????

-Vormav-
07-22-2005, 12:20 PM
The XYZ Generator shader is only for very special cases. It's a shader that returns a vector, so you would only really ever use this where you need vectors. If you ever see a Mental Ray shader that has a slot that's (probably) titled "coord", that is one of the cases where you would use the xyz generator. It's useless beyond that, because you have the UVW Map modifier and output controls on shaders to handle everything else it would do for you.
If you unhide some of the MR textures (polka dot and turbulance, for example), you would have to use either the XYZ generator or the UVW generator to provide the texture shader with the coordinates they need to use to calculate their results.

hjalle
07-22-2005, 01:45 PM
Thank's -Vormav-.

I had a naive dream of a way to apply dirt with it.
Now I use Landscape and vertex paint.
The “Dirtshader” maybe, but it's to soft. I want more contrast.
http://www.illustratoren.se/walter/axel.jpg
Landscape
http://www.illustratoren.se/walter/folka.jpg
Landscape and vertex paint

Maven
07-22-2005, 05:32 PM
I'm having some touble making water. I have applied the water sample from jeffs material list but it looks like a mirror rather than water. I have been trying to teak it up I am having zero luck.

I'm using MR 3.4 on Max 7.5
I am using HDRI and have FG on.
I have a sky light and a mrspot (intensity set at 2) with mr shadows.

Can anyone help me here?

Thanks. Also I may have missed somthing, I did not read this entire thread...it's pretty long.

hjalle
07-22-2005, 05:50 PM
Hello Maven.

More info, Image........scene description.

Maven
07-22-2005, 05:56 PM
Ok.

It's an outdoor scene of a bridge, going over water. Pretty simple I just would like some nice water.

http://upload.pbase.com/image/46564317/original.jpg

I have a sky light with a HDRI sky image in it, I have the same image in my enviro map. I also have 1 mr spot with mr shadows in the scene to act as the sun, the intensity is set at 2.
My MR settings are simple with FG and GI on.

Maven
07-22-2005, 06:16 PM
actually I just added the ocean lume to the bump slot and it seem like that is what I am after, the defualt just needs some tweaking.

sometimes it so simple you miss it.

thanks anyways. any other suggestions are welcome of course.

hjalle
07-22-2005, 06:38 PM
Bridge over trouble water:)

Maven
07-22-2005, 06:43 PM
ha ha


10 characters

Maven
07-22-2005, 07:05 PM
it's getting there. does anyone have any suggestion on how to get rid of the water line in the horizon?

http://upload.pbase.com/image/46566745/original.jpg

hjalle
07-22-2005, 07:56 PM
Alpha with.......................
http://www.illustratoren.se/link_image/Clip0001.jpg
Or fog.

JasonCamp
07-22-2005, 09:21 PM
hjalle / Maven nice renders...

anybody know how to make a translucent like material that would be like a board of fiberglass and still have the caustic light or gi like come from it ? i was useing parti volume and got a nice green caustic light thats just how i want it ... the only problem is now the material is massivly overbright the more i make it less transparent the more i loose caustic light ...hmm maybe my test cube is to thick,
er what im tring to do is make a sheet of thin green fiberglass that is not transparent but is translucent , and still have it cast the green light as the sun passes through it, while at the same time have the detail of the green fiberglass look , like webing

hjalle
07-22-2005, 10:29 PM
=HELLION=
"Lume Translucency" shader was my first thought.
But you have probably already..................

JasonCamp
07-23-2005, 01:16 AM
im accually tring both heh they accually are turning out the same way , overbright fiberglass board, but caustics are great, it might be how i set up my parti volume heh but i have the caustics just right , ill try more tomarrow tho and probably post a shot..

maven- id try a volume shader tough to set up and takes a lot longer to render but it will knock out the h-line

JasonCamp
07-23-2005, 08:09 PM
well i think i got it... im not sure what i did but i am a lot closer now its still casting a caustic light and its not transparent, its also not massive overbright,, it is a soild color thought soon as i get a texture maping set it will be awesome..
things i changed.. changed from a direct light to a photometric spot light, took some tweeking but it pushes more photons so i opt'ed to try it with that , still need to turn on the direct light again and try with it but , heh the spot is really doing a number so i might stick with it right now, went to put the "r" at like .35 g1 -somethin g2 + positive something only on the photon volume one ... i think that was my mistake because just volume one didnt do much , then i set the material to mid transparent in the green spectrum, and to cover that up i added the fog option , not sure if its the fog thats bloting out the transparency or the sss either way its not transparent and is still casting caustic's and its not massive overbright, not bad for render time too, just need to plop a bump map on it and maybe some defuse , spec and all the rest, when i get a more palatable render ill toss one so maybe somebody can make sence of it lol

JasonCamp
07-24-2005, 12:07 AM
well i found out the fog was vital to the coloring , its hard to tell if its translucent or transparent so far because there is nothing above it , im just happy to have it the way it is so far lol, it could use some more transparency i guess but im almost afraid to touch anything lol..

psv
07-24-2005, 07:15 AM
it's getting there. does anyone have any suggestion on how to get rid of the water line in the horizon?

http://upload.pbase.com/image/46566745/original.jpg

well Maven , you may put your water material on a plane primitive , and on it`s parameters panel put 1000, or more on render multipliers/scale
hope it helps
Sorin

philipbruton
07-24-2005, 03:29 PM
alpha maps maybe and use post production, or dof effects.

micco
07-25-2005, 01:35 PM
it's getting there. does anyone have any suggestion on how to get rid of the water line in the horizon?

http://upload.pbase.com/image/46566745/original.jpg
Well, in a real life there is always some fog or haze. So if you add some of that, the waterline will be gone. You can do it with one shader, but I can't remember what it was.. and I don't have max here. Also you can use zdepth and make the haze in photoshop or some other program.

Ian Jones
07-25-2005, 01:57 PM
Quick question... apologies if this has been asked before but how do you make the FastSSS more translucent. What I am looking for is more control over the opacity, I've got the light scattering controls figured out, just need to know how to get the whole thing more see-through I'm trying to simulate a very light transluceny. Maybe I have the wrong shader?

Anyway here's what I've got atm:

http://www.visions-unleashed.com/misc/sssmouth.jpg

Bao2
07-25-2005, 07:17 PM
Deleted because I don't need the file I was asking for.

Bao2
07-25-2005, 08:03 PM
... the FastSSS more translucent. ...more control over the opacity, to get the whole thing more see-through


Below in post 2452 and 2453 is the solution.
Then when you change the subsurface.mi file (make a copy of your original) in Max
create a Blend material, place in Material 1 slot the SSS Fast skin. In Material 2
choose Standard and put Opacity to zero. In Mix Amount place 50 for half transparency
(0 to 100). In the mental ray Connection rollout Lightmap slot choose
the SSS Lightmap Write and choose a 32 bits targa with double width than height (read
the max help file "Standard mental ray shaders library" in Additional Help Files). I choosed
1000x500 but try a less size for minor render times.
Now enter your SSS Fast skin and you will see a Lightmap slot where you choose the targa you wrote before.
When rendering, the lightmap in blend write a file that SSS Fast Skin then reads.

Thanks to Jeff :thumbsup:

Bao2
07-25-2005, 08:13 PM
Another shader. This one is a 10-slot morph material, since Max's MR connection didn't include the morpher material (and dealing with lots of different materials for morphing can be a pain in the ass with normal blend materials).
Probably has bugs, but it shouldn't crash max or anything...

I'm interested in take a look to the morpher source .C file if it is possible. Could you post it here?

JeffPatton
07-25-2005, 08:48 PM
A while back I posted this info on making the fast skin material work with the shellac material:
http://forums.cgsociety.org/showthread.php?t=209628&highlight=shellac
You should be able to mix it with a glass material or similar.

And a thread about using the multi-subobject with the fast SSS material:
http://forums.cgsociety.org/showthread.php?t=204200&page=1&pp=15&highlight=multi+skin

I also wanted to appologize for dropping off the radar a bit lately around here. I'm working on several projects that have/are consuming a LOT of my time. The good news is that one of these projects is a Mental Ray training video series. I can't really discuss specifics about the training series at this time though. I mainly wanted you guys to know why I haven't been around lately.

Back to work now.. :thumbsup:

Bao2
07-26-2005, 01:19 AM
A while back I posted this info on making the fast skin material work with the shellac material:
http://forums.cgsociety.org/showthread.php?t=209628&highlight=shellac
You should be able to mix it with a glass material or similar.


Wow! Impressive.
Following that link I've read your Lightmap method. I've downloaded the subsurface.mi and
open Max. I've configured Customize / Preferences / mental ray, checking Open Messages
Window on Error and Show Log Information Messages, so when Max started the Mental Ray
messages window inform a problem in your subsurface.mi
I've contrasted your subsurface.mi with the original.mi and I've encountered you changed
two version numbers that give the problem.

In your file:

# 01.05.04 zap: added fast simulated sss functions
#****************************************************************************/

min version "3.3.1"
max version "3.3.99"

declare shader
"misss_physical" (

In original:

# 01.05.04 zap: added fast simulated sss functions
#
#****************************************************************************/

min version "3.3.1"
max version "3.4.99"

declare shader
"misss_physical" (

In your file:

end declare


min version "3.1.0"
max version "3.3.99"


declare shader
color "misss_fast_shader" (

In original:

end declare

declare shader
color "misss_fast_shader" (

So when I corrected this two fragments of code (choosing the original one) Mental Ray
already don't show any error message.
I think your changes were done because something in Max 7.0 but in Max 7.5 is better
with this two changes in your subsurface.mi file

In the forum I read in one of your posts:

... but it involves editing the subsurface.mi file and after doing so, it appears all of the skin shaders no longer work WITHOUT using a lightmap. So it changes the way you have to use all the skin shaders.

Well, I tested only the SSS Fast skin and I can say it works using the Lightmap slot or
without using it. Perhaps the two changes above are the cause.

Well. Impressive. I've created a Shellac and below in Mental ray Connection Rollout choose the Lightmap write and choose a targa "lm1.tga" of 32 bits of 1000x500 (double width and 32 bits like the reference says). Then placed in Base Material the Multi-Subobject, in Shellac Material None and Shellac color blend: zero. The Multi Subobject has two SSS Fast Skin and a Mental Ray material. In the two SSS Fast skin I clicked the Lightmap slot and choose the "lm1.tga" to read. In the mental ray material clicking the Lightmap slot
is to write so I did nothing with it.
Render and perfect image obtained.
Thanks Jeff.

karimD
07-26-2005, 01:36 AM
Hello every body,

I'm new in to your fine and rich discussion.
my purpose at this moment is about searching a way to correctly shade semi-transparent
curtain…
just like these curtains, detail of Dimitriy Kulakov CGS award winner art work ;

http://www.yboo.net/karimd/forum/dimit_k.jpg

If anyone know any trick or could provide any sample material or scene I would be grate full.
Any suggestion that might help.

Thanks,
karim

JeffPatton
07-26-2005, 01:50 AM
you changed two version numbers that give the problem.
Nah, that's the default date for that file (older version of MR back when I posted those). Nonetheless, glad you knew what to correct to make it work for you. :thumbsup:

Bao2
07-26-2005, 01:51 AM
If anyone know any trick or could provide any sample material or scene I would be grate full.
Any suggestion that might help.


I think the greater trick is not the shader. I think is a opacity mask with the height of
the curtains and width one tile. And then you tile this opacity map in U many times.
Probably any shader will go well.

Ian Jones
07-26-2005, 02:09 AM
Thank you both... very helpful.

JasonCamp
07-26-2005, 03:43 AM
i really wish cgsociety would stop puting nude female anatomy (current d'artiste especialy) up on there ad boards its EXTREAMLY distracting i tend to stare at every time i load up the page lol and then i forget what i was going to say ,
anyway here is my current wip on my fiberglass , sofar this is the best i can get it , i might settle for it , i wish i could get the light a bit brighter when i make it less transparent.. not to mention all day of rendering over and over , then geting stuck when i didnt know what i did that made it take 400x longer to render , and then having to work back and find out what i did , wich i still dont know what it was uhhhmm pointers for others that are starting out with mr.. if you get something you like , drag it over to a blank material cell , and rename it so you dont lose it by going,,, well i wonder what this does / maybe i can get it to do this ... or my favorite, if it was just a little bit brighter ... uhhgg.. anyways if anybody can tell me what im missing.. tia
what im tring to do is make the caustic's near the soon to be textured wood support beam to be a lot brighter and extend more ... i know the r/g1/g2 does this in the parti-volume settings but ehhhh im not sure wich one will forward scatter in the direction i want or even if im wrong and theres another way besides the r/g1/g2,,,,

photon master jeff good to see you back btw

karimD- translucent shader with a translucent opacity map of a meshsort material maybe ? hell i cant even get my fiberglass to work i good luck

hjalle
07-26-2005, 03:51 AM
Jeff Patton:

Hi I was on you'r website an downloaded a file "MR-glare-mist"
I cant finde "Glare" Camera output shader anyware in the "Lume" littarure.
And I can't find the output shader in max.??????????????????????
But in the file it's there, and I see it in the renderer/ Camera Shader.
I saved "Glare" to a material "lib" so I kan get it now to, but........?
Is it hidden. :hmm:

4 low
07-26-2005, 04:46 AM
Jeff Patton:

Hi I was on you'r website an downloaded a file "MR-glare-mist"
I cant finde "Glare" Camera output shader anyware in the "Lume" littarure.
And I can't find the output shader in max.??????????????????????
But in the file it's there, and I see it in the renderer/ Camera Shader.
I saved "Glare" to a material "lib" so I kan get it now to, but........?
Is it hidden. :hmm:


Check your lume.mi file and remove "hidden" on your glare shader delclaration. If you're not comfortable editing that file, get the ones posted at the start of this thread (I think they're posted at the start of this thread... ). Just be sure to make backups of each file before editing or overwriting, just in case....

hjalle
07-26-2005, 05:57 AM
Thank's
I come across Glare in the "Lume reference"
lume.mi hacking then..... :thumbsup:

hjalle
07-26-2005, 06:07 AM
Thank's "4 low"
Shocking, hide shaders.
It's working fine now.

-Vormav-
07-26-2005, 06:22 AM
I'm interested in take a look to the morpher source .C file if it is possible. Could you post it here?

Sure. It's pretty crude, since I was still trying to get used to the syntax and everything, but here it is:

#include "shader.h"

struct mr_morph {
miColor color01;
miColor color02;
miColor color03;
miColor color04;
miColor color05;
miColor color06;
miColor color07;
miColor color08;
miColor color09;
miColor color10;
miScalar multiplier_01;
miScalar multiplier_02;
miScalar multiplier_03;
miScalar multiplier_04;
miScalar multiplier_05;
miScalar multiplier_06;
miScalar multiplier_07;
miScalar multiplier_08;
miScalar multiplier_09;
miScalar multiplier_10;
};

DLLEXPORT int mr_morph_version(void) {return(1);}

DLLEXPORT miBoolean mr_morph
(
miColor *result,
miState *state,
struct mr_morph *paras)
{
miColor *color1, *color2, *color3, *color4, *color5, *color6, *color7, *color8, *color9, *color10;
miScalar mult1, mult2, mult3, mult4, mult5, mult6, mult7, mult8, mult9, mult10;
miColor placeholder;
miScalar multiplier_sum = 0;

color1 = mi_eval_color(&paras->color01);
color2 = mi_eval_color(&paras->color02);
color3 = mi_eval_color(&paras->color03);
color4 = mi_eval_color(&paras->color04);
color5 = mi_eval_color(&paras->color05);
color6 = mi_eval_color(&paras->color06);
color7 = mi_eval_color(&paras->color07);
color8 = mi_eval_color(&paras->color08);
color9 = mi_eval_color(&paras->color09);
color10 = mi_eval_color(&paras->color10);

mult1 = *mi_eval_scalar(&paras->multiplier_01);
mult2 = *mi_eval_scalar(&paras->multiplier_02);
mult3 = *mi_eval_scalar(&paras->multiplier_03);
mult4 = *mi_eval_scalar(&paras->multiplier_04);
mult5 = *mi_eval_scalar(&paras->multiplier_05);
mult6 = *mi_eval_scalar(&paras->multiplier_06);
mult7 = *mi_eval_scalar(&paras->multiplier_07);
mult8 = *mi_eval_scalar(&paras->multiplier_08);
mult9 = *mi_eval_scalar(&paras->multiplier_09);
mult10 = *mi_eval_scalar(&paras->multiplier_10);

multiplier_sum = mult1 + mult2 + mult3 + mult4 + mult5 + mult6 + mult7 + mult8 + mult9 + mult10;
placeholder.r = 0;
placeholder.g = 0;
placeholder.b = 0;
placeholder.a = 1;
placeholder.r = color1->r * mult1;
placeholder.g = color1->g * mult1;
placeholder.b = color1->b * mult1;
placeholder.a = color1->a * mult1;

placeholder.r += color2->r * mult2;
placeholder.g += color2->g * mult2;
placeholder.b += color2->b * mult2;
placeholder.a += color2->a * mult2;

placeholder.r += color3->r * mult3;
placeholder.g += color3->g * mult3;
placeholder.b += color3->b * mult3;
placeholder.a += color3->a * mult3;

placeholder.r += color4->r * mult4;
placeholder.g += color4->g * mult4;
placeholder.b += color4->b * mult4;
placeholder.a += color4->a * mult4;

placeholder.r += color5->r * mult5;
placeholder.g += color5->g * mult5;
placeholder.b += color5->b * mult5;
placeholder.a += color5->a * mult5;

placeholder.r += color6->r * mult6;
placeholder.g += color6->g * mult6;
placeholder.b += color6->b * mult6;
placeholder.a += color6->a * mult6;

placeholder.r += color7->r * mult7;
placeholder.g += color7->g * mult7;
placeholder.b += color7->b * mult7;
placeholder.a += color7->a * mult7;

placeholder.r += color8->r * mult8;
placeholder.g += color8->g * mult8;
placeholder.b += color8->b * mult8;
placeholder.a += color8->a * mult8;

placeholder.r += color9->r * mult9;
placeholder.g += color9->g * mult9;
placeholder.b += color9->b * mult9;
placeholder.a += color9->a * mult9;

placeholder.r += color10->r * mult10;
placeholder.g += color10->g * mult10;
placeholder.b += color10->b * mult10;
placeholder.a += color10->a * mult10;
if(multiplier_sum == 0) {
result->r = 0;
result->g = 0;
result->b = 0;
result->a = 1;
} else {
result->r = placeholder.r/multiplier_sum;
result->g = placeholder.g/multiplier_sum;
result->b = placeholder.b/multiplier_sum;
result->a = placeholder.a/multiplier_sum;
}

return(miTRUE);
}

Actually, looking back at that I believe there's a flaw in the coding... I believe the ending should be more along the lines of

if(multiplier_sum == 0) {
result->r = 1;
result->g = 1;
result->b = 1;
result->a = 1;
}

(the limit of the placeholder/multiplier_sum statement as multiplier_sum approaches zero would be infinity, so the result should be a pure white value).

bindyeye
07-26-2005, 04:58 PM
Watermelon anyone?
http://n.1asphost.com/bindyeye/WatermelonMRShader_ByBindyeye.jpg
It's just a quick shader i made for a lowpoly market scene for a game.
If anyone wants it just email/PM me.

DustinB
07-26-2005, 10:02 PM
Looks good on the right side, from the middle to the left it seems a bit glassy or waterlike.

JasonCamp
07-26-2005, 10:14 PM
heh yea it (no pun) looks like its a watermellon with a shell of water on it

oh yea, hey jeff on your site for max6 , your caustic light teapot- what light is that , mr / photmetric or standard ?? i thought i had that max file once but i dont anymore and it doesnt seam to have a link to download it... er tia if you can remember

Zefrem23
07-26-2005, 11:07 PM
Hi people, I've been making enormous progress in Mental Ray thanks to the help I've received on these forums, both in pre-existing threads and in response to my questions. However, I am stuck. I have tried to install the md_subscatter shader and I receive the following error:

LINK 0.0 error 191007: cannot load .\shaders_3rdparty\shaders/md_subScatter.dll, The specified module could not be found.
API 0.0 warn 302004: .\shaders_3rdparty\include/md_subScatter.mi, line 43: while defining declaration "mr_subScatter": declaring nonexisting function mr_subScatter

I successfully installed the Diffusion.mi in the Mental Ray autoload folder (I'm using R7) and gotten that working, however md_subscatter, installed the same way, gave the same error as above, so I tried installing into the shaders_3rdparty folders with equal lack of success.

Can anyone perhaps point me in the right direction, if you've had similar results and resolved the issue?

Thanks in advance :)

Bao2
07-26-2005, 11:19 PM
Actually, looking back at that I believe there's a flaw in the coding... I believe the ending should be more along the lines of
(the limit of the placeholder/multiplier_sum statement as multiplier_sum approaches zero would be infinity, so the result should be a pure white value).


If multiplier_sum goes to zero is because the user put values near zero in all the multipliers, so he don't want strength in any Texture, so the render is black. I think that is correct.

But I encountered an error: render a sphere with morpher in diffuse and only one color or map checker or what you want in material 1 with multiplier 0.01
The render would be near black but your code renders the ball in full strength.

I include a morpher2 with various changes. The multipliers are sustitued by weights (zero
to one each) so with weight 0.01 the sphere now renders near black as expected.
You can compile and place morpher2 side by side with your morpher and test the above.

And thanks by let me see the code. I am beginning in this.

What about now take a look to the interesting checker dot 3D :-)
You can email me in jmbbao2 at terra dot es, but I think is better here because it can interest someone.

-Vormav-
07-27-2005, 02:16 AM
But I encountered an error: render a sphere with morpher in diffuse and only one color or map checker or what you want in material 1 with multiplier 0.01
The render would be near black but your code renders the ball in full strength.

It's not really an error, the assumed use of the morpher material is just..you know...morphing. :p It wasn't intended to be used with only one material, since if you wanted to morph it to nothing (black), you could just use another color slot with a black material, or a mix map. Coding that in is just kind of pointless.
But that can always be coded in by changing this:

result->r = placeholder.r/multiplier_sum;
result->g = placeholder.g/multiplier_sum;
result->b = placeholder.b/multiplier_sum;
result->a = placeholder.a/multiplier_sum;

to this

if(multiplier_sum == mult1 || multiplier_sum == mult2 || multiplier_sum == mult3 || multiplier_sum == mult4 || multiplier_sum == mult5 || multiplier_sum == mult6 || multiplier_sum == mult7 || multiplier_sum == mult8 || multiplier_sum == mult9 || multiplier_sum == mult10) {
*result = placeholder;
} else {
result->r = placeholder.r/multiplier_sum;
result->g = placeholder.g/multiplier_sum;
result->b = placeholder.b/multiplier_sum;
result->a = placeholder.a/multiplier_sum;
}

I include a morpher2 with various changes. The multipliers are sustitued by weights (zero to one each) so with weight 0.01 the sphere now renders near black as expected.
You can compile and place morpher2 side by side with your morpher and test the above.
Sounds good, but I'd suggest keeping your weights in the 0 to 100 range, instead of 0 to 1. That makes it consistent with what you see in the morpher modifier, and gives the user a wider range of values to work with (don't limit yourself to a 0 to 1 range unless there's a specific reason to do so).


What about now take a look to the interesting checker dot 3D :-)

Can't find the code anywhere (think it's on my other computer), but it's easy enough to explain how to code those.
For the 3d checkerboard shader, you just need to take the cosine of your x, y, and z coordinates for your shading position. Based on what you get from that, you have a small series of if() statements that check to see if the cosine of the value is greater than or less than zero. If cos(x), cos(y), cos(z) are all greater than 0, you could return color1. If cos(x) and cos(y) are greater than 0, but cos(z) isn't, you might return color2. Form all of the conditional statements correctly, and you end up with an infinite 3d checker map. Remove the z coordinate from the equation, and you have an infinite 2d checker map.
Getting polka dots is a bit more difficult. You can take a look at the polkadot source code (download it from mentalimage's ftp site - it's in the general shaders) as a starting point. That shader would work (works great in other apps), except that texture coordinates don't properly tile when using the xyz generator in Max (tiling is how you'd normally get the dots to be repeated on the mesh) - the texture coordinates aren't actually tiled. To get around that, I wrote the shader such that it would read in its coordinates, and based on the size and other settings you give the shader, the shader would determine a 'local center' to use to offset the same calculations from mentalimage's polkadot shader.
I may end up writing a shader specifically for the purpose of tiling texture coordinates, because that's a really annoying problem...

Zefrem23
07-27-2005, 12:09 PM
LINK 0.0 error 191007: cannot load .\shaders_3rdparty\shaders/md_subScatter.dll, The specified module could not be found.
API 0.0 warn 302004: .\shaders_3rdparty\include/md_subScatter.mi, line 43: while defining declaration "mr_subScatter": declaring nonexisting function mr_subScatter


Here I am replying to my own post, unfortunately it's not to say I solved the problem :( I have tried the md_subscatter shader in a friend's version of R6, and exactly the same error occurs. Perhaps the actual files are at fault? Could someone please share a copy of the md_subscatter shader that works for you? Either in R6 or R7, it doesn't matter. I've been drooling over the amazing effects you guys have been getting with this shader, and I'm dying to try it out.

Thanks again!
Z

JeffPatton
07-27-2005, 01:37 PM
On page 1 (first post) click on "Download my MR folders". That file contains all the edited .mi files and matching .dll's from my Max6 (I think) directory. If your using a higher version than 6, it's better to go to the developers website and DL the shader.

I think the subscatter shader originates from lightengine3d

Zefrem23
07-27-2005, 02:09 PM
On page 1 (first post) click on "Download my MR folders". That file contains all the edited .mi files and matching .dll's from my Max6 (I think) directory. If your using a higher version than 6, it's better to go to the developers website and DL the shader.
I think the subscatter shader originates from lightengine3d

Thanks for the quick response, Jeff :) I copied your MR folders into my friend's R6 installation, with the result that his md_subscatter shader is now functioning correctly. Which is a great victory in and of itself, hehe. Of course, with my R7 installation, the selfsame folders do not result in md_subscatter working. I have, additionally, downloaded the latest version of the shader from the lightengine3d site, and tried installing the include and the dll into both the /shaders_autoload and the shaders_3rdparty folders, with no success. Do you perhaps have a suggestion for which set of shader folders I should be putting them into? Or do you think it might be an issue with the version of the shader (I'm using the one for Maya6)? I'll try the Maya 5 one and see how it goes, but I'm not holding my breath.

[EDIT] Well whaddayaknow? I don't know whether it was changing to the Maya 5 dll or registering the shader in the shaders_standard folders, but it's working now! Woohoo! :applause:

Thanks again for the help :thumbsup:

Bao2
07-27-2005, 06:27 PM
I'd suggest keeping your weights in the 0 to 100 range, instead of 0 to 1.

but it's easy enough to explain how to code those.

You can take a look at the polkadot source code (download it from mentalimage's ftp site - it's in the general shaders) as a starting point.


Yes, better from 1 to 100 and integers only.

Yes that sources were already in my harddrive. The last source code I've downloaded is
the mrClasses from Gonzalo Garramuno:

mrClasses (http://www.puppet.cgtalk.ru/download/mrclasses_e.shtml)

Very well explained. I will take a look on the checker polka dot thing. In two or three days I'll post here, now I'm in a hurry.
Thanks Vormav.

DRSWOBODA
07-27-2005, 08:15 PM
Hello,

I just wanted to thank the community here for informative discussion on MR in Max. This is my first project rendering using MR. I found many pointers here in this thread as well as from a beginners tutorial from Emre Goren over at 3DM models creation.

I'm using the l-glass shader for the diamonds and I'm just starting to get a feel for how MR works. The render is low res will need the quality cranked up quite a bit to get the DOF effect to look ok.

Thanks for the the tips. Comments welcomed.

http://www.digitalrenaissance.biz/uploads/l_glass-TestRotCAM_DOF.mov - 7MB

-David

Zefrem23
07-27-2005, 11:01 PM
Hi, me again to annoy and confound as usual :) Much earlier in this thread, around the page 30 mark, Jeff helped a guy out who was having weird results with the md_subscatter shader in the Subscatter glass file Jeff shared. I attach a similar result that I get. It seems the issue was resolved in private messages, so I'm unsure whether the solution was ever made public. For reference, I am using R7 with the md_subscatter DLL and include from lightengine3d, not the modified ones Jeff posted previously. Any ideas?

moorf
07-29-2005, 06:47 AM
Hello MR geniuses.

I have a problem I hope someone has dealt with at some time. I have just switched over to MR from VRAY and found a problem that I just can’t solve. I am at the composition stage for a car project that I am working on that is lit using HDRI and a skylight with finalGather and GI. The problem is that when I try to render a pass for shadows, I cannot do so because I can’t get the shadow/matte material to pick up shadows created with this lighting setup.



Is there a way to get around this by using another material to receive shadows (or doing something to shadow/matte) or am I doomed to use a more traditional lighting solution?



If that made sense well done.

Zefrem23
07-29-2005, 07:53 AM
Hi folks, I can't connect to the frodo.hiof.no site - is there an alternative location where the content that was stored there can be found, or is it gone forever? Thanks!

Arkon11
07-29-2005, 04:57 PM
Wow, I was just about to post that. I can niether download this http://frodo.hiof.no/~deetee/mrupload/index.php?act=view&file=TGlnaHQtdHViZXMuemlw (which I'd like to have :p )

or view this http://frodo.hiof.no/~deetee/mrupload/index.php .

If someone could fix this, that would be great.

Keep up the good work guys.

JasonCamp
07-29-2005, 05:22 PM
yea it sucks about oh man id say 9 or more months ago deetee had to take his server down for ppl posting crap that shouldnt have been on it , wich made a LOT of us here mad because we all would post our max files to let other test and i got a lot of help from others heeh and had a lot of my stuff on there too ...

JasonCamp
07-30-2005, 03:16 AM
well heres one i dont think has been coverd or maybe it has ... just looked at jeff'ys index and i didnt see it anyways... how does one do soft shaddows with a photometric light and mental ray ? some sort of shaddow fall-off dont get me wrong the shadows with standard raytracer does wonders but i was looking for a little falloff for a early morning shaddow or late at night .. oh if anybodys keeping tabs on my current project wip fiber glass is doing good and ive started on the second building

steven xu
07-30-2005, 03:35 AM
Hello MR geniuses.

I have a problem I hope someone has dealt with at some time. I have just switched over to MR from VRAY and found a problem that I just can’t solve. I am at the composition stage for a car project that I am working on that is lit using HDRI and a skylight with finalGather and GI. The problem is that when I try to render a pass for shadows, I cannot do so because I can’t get the shadow/matte material to pick up shadows created with this lighting setup.



Is there a way to get around this by using another material to receive shadows (or doing something to shadow/matte) or am I doomed to use a more traditional lighting solution?



If that made sense well done.

i always use shadow/matte material to put the model into a real scene pic,and i also use
skylight+FG,it's enough~

JeffPatton
07-30-2005, 01:34 PM
i always use shadow/matte material to put the model into a real scene pic,and i also use
skylight+FG,it's enough~

Really? The Matte/Shadow material & skylight/FG combination works for you? Please share your secret on making it work then! Because it doesn't work for me (and hasn't since MR was added to 3dsmax). It would be great to have it working so I don't have to render a separate shadow pass.

There are a few threads on the matte/shadow problem already, here's one that lists some work arounds:
http://forums.cgsociety.org/showthread.php?t=147630&highlight=mental+matte

herbert west
07-30-2005, 06:00 PM
http://home.comcast.net/%7Eian_kirkley/gi_matte.jpg

GET THE MAX6 SCENE FILE HERE... (http://home.comcast.net/%7Eian_kirkley/gi_matte.zip)

Using a combination of Output and Material to Shader as an opacity map, I managed to make a matte material that works with GI and a skylight (Final Gather used in image above with a skylight and omni). Use the RGB Output and curve editor to adjust the sensitivity level for what point the shader becomes fully transparent. I thought of the idea from a technique I used in a shadow-catching trueSpace shader.

JasonCamp
07-30-2005, 07:19 PM
thx herbert west/steven xu i guess it was coverd ehh i must have missed that day lol.. this is great, ill render a seperate pass if i have to but .. im gonna give herberts way a try , and that shaddow is just about how i was wanting ...thanks guys heh well that was easy heh i should have asked that a while ago

JasonCamp
07-30-2005, 07:55 PM
i think found a another way, with control too.. its accually a standard thing..i forgot to turn on shaddow maps in the render setings of mr ... to get normal soft shadows just goto render / renderer / down where displacement is turn shadows maps on (duh)
then you goto whatever light you have that needs the soft shadows and set it to shadow map instead of ray trace- then set the shadow map prams of the light to like bias 1.0 / size 1024+ if needed / sample range = more the more soft shadow i did this with a 20 , didnt mesure tho
not sure if raytraced shadows are needed for sss either but im willing to bet ehh oh well ill have a look and see... maybe it still does ... if so then this way works great

oh btw this was done with a photmetric spot light / skylight

herbert west
07-30-2005, 08:11 PM
Hellion, the shadow in the above image is just a shadow map with a high sample range. For the photometric light, use the "Target Area" with raytraced shadows. Since an area light depends on its size for soft shadows, set the dimension (length/width) of the light smaller for sharper shadows, or bigger for softer shadows.

EDIT: OK, you beat me to the punch. :)

JasonCamp
07-30-2005, 09:11 PM
yea accually the area lights in photometric were working great but i switched to a photometric spot for the caustic power and gi bounces, and when i did i noticed the shadow was paper thin , turning on shadow maps fixed it though, and sss is still working ... even better now heh areas where it was bright then droped off to not bright ,now at least have a falloff point heh, it isnt as noticeable when i unhide the roof to the building i was working on though lol but where the fiberglass is a bit more realistic now, it does take a bit longer not much tho, it helped though

-Vormav-
07-30-2005, 09:40 PM
Using a combination of Output and Material to Shader as an opacity map, I managed to make a matte material that works with GI and a skylight (Final Gather used in image above with a skylight and omni). Use the RGB Output and curve editor to adjust the sensitivity level for what point the shader becomes fully transparent. I thought of the idea from a technique I used in a shadow-catching trueSpace shader.

Just to note, this sort of workaround will work if you're just going for the shadows of GI/FG (and the same goes for all other FG-catching tricks I've seen in Max). However, you have to remember that that's only one part of FG: It also has color bleeding, and reacts differently to surfaces based on their surface properties (glossiness, etc.), and FG looks at the final shaded result of points around the shading point when the irradiance is being calculated - so if you're using any opacity tricks, you are not getting a proper FG solution, because the color that FG was going to use is no longer present. Color bleeding is pretty much nonexistent if you try and do an FG-only pass with these tricks.
The only way to get a true FG pass is to output it as a separate image file during the rendering process. I'm attempting to write a shader that will do that right now, so we'll see how that goes...

JeffPatton
07-30-2005, 09:44 PM
I'm attempting to write a shader that will do that right now, so we'll see how that goes...

Now thats what I like to hear! :buttrock: Hope it goes well.

herbert west
07-31-2005, 01:09 AM
http://home.comcast.net/%7Eian_kirkley/gi_matte2.jpg

OK. Another method. 2 planes involved. One plane has a standard material with the background image map (mapped with Screen environment) for the diffuse color. This captures the shadow from the skylight/Final Gather. The second plane has the same material, but the self-illumination is at 100, and the plane is set to not be visible to the camera under object properties. Therefore, the second plane emits the color of the red table top, but doesn't interfere with shadows.

JasonCamp
07-31-2005, 01:43 AM
thanks guys but that sort of looks like i would be faking a shadow, useing shadow maps works with the expence of a a little time , not much with what i have so far anyway...with great results that you can change it .. fg gi sss and color bleeding was workin ...

oh lol ... damn i just realised that somebody just asked a matte/shadow question lol .. i thought you were replying to me for some reason... oh well i answered my own question

DustinB
07-31-2005, 01:51 AM
I was playing around with ambient occlusion today and I may have found a workaround for matte/shadow not working with a skylight. If you render the ambient occlusion with the shader mode set to 1(reflect env) it will cast a proper shadow and light onto the ground plane. After that its just a bit of work in photoshop.

steven xu
08-02-2005, 11:07 AM
thanks guys but that sort of looks like i would be faking a shadow, useing shadow maps works with the expence of a a little time , not much with what i have so far anyway...with great results that you can change it .. fg gi sss and color bleeding was workin ...

oh lol ... damn i just realised that somebody just asked a matte/shadow question lol .. i thought you were replying to me for some reason... oh well i answered my own question

sorry ,lol~busying so i just see your reply~ i mean FG+SKYlight+Matte enough,U must add an omni to made the shadow,because SKY can't produce photons~~Damn~jeff~~lol~~get hold of my text error~#@$&$#*$!($(#&$#

-Vormav-
08-02-2005, 11:01 PM
I was playing around with ambient occlusion today and I may have found a workaround for matte/shadow not working with a skylight. If you render the ambient occlusion with the shader mode set to 1(reflect env) it will cast a proper shadow and light onto the ground plane. After that its just a bit of work in photoshop.
Sure, but then you're getting the shading as produced by ambient occlusion, not by FG/GI/Caustics. That's going to make a very big difference in case's like moorf's where a lighting solution has been developed around GI, since ambient occlusion doesn't have the same accuracy and effect as GI. It's not so much a problem with skylights not working with matte/shadow materials - it's a problem with indirect illumination (caustics, gi, fg) not being compatible with the matte/shadow material. And ambient occlusion isn't really a form of indirect illumination. It's just a way of faking it.

steven xu
08-03-2005, 04:03 AM
http://bbs.chinavfx.net/attachments/200508/03110036.jpg
i rendered a pic just use an omni+SKY+matte~enjoy it~lol~

Wilk0
08-03-2005, 10:18 AM
Hey hey guys. I'd like to get in on all this action but I can't seem to figure out for the life of me what to do with the .mat file provided? I installed the MR files provided on the first post of this topic to D:\3dsmax7\mentalray\shaders_3rdparty , also not sure if that is correct. I'm a really big mental ray noob, never dealt with custom shaders in max before either! Sorry for going a bit off-topic here. :)

I found a topic about installation on max 7 on page 111 as directed by the table of contents. No real help, it's all greek to me.

Can someone post a simple installation procedure to get up and running? Maybe it could be added to the first post as well to avoid confusion, as it seems to be coming up a number of times.

Cheers!

Angryman
08-03-2005, 10:28 AM
Hey hey guys. I'd like to get in on all this action but I can't seem to figure out for the life of me what to do with the .mat file provided? I installed the MR files provided on the first post of this topic to D:\3dsmax7\mentalray\shaders_3rdparty , also not sure if that is correct. I'm a really big mental ray noob, never dealt with custom shaders in max before either! Sorry for going a bit off-topic here. :)

Cheers!

Copy the .mat file to your materials folder... In Max select the Material/Map browser (Rendering Tab) and open the file... I am a newbie but thats the way it worked for me... And its quite a good practice to understand MAX Materials, if a noob experiments with this materials and settings ^^

Wilk0
08-03-2005, 10:37 AM
Okay, I put the .mat file in D:\3dsmax7\matlibs where there were several other .mat files... Checking 'em all out in max now, see if I can get 'er workin'. :D

-Vormav-
08-03-2005, 10:37 AM
I installed the MR files provided on the first post of this topic to D:\3dsmax7\mentalray\shaders_3rdparty
Close, put them into just mentalray\shaders. Different folder names will only work if you create a ray3rc file that points to your folder (not worth the trouble, imo).

Wilk0
08-03-2005, 10:46 AM
Okay I think I got it working.

Materials list:
http://img295.imageshack.us/img295/2879/win8zo.jpg

Did I win? I think so since I have SSS materials now.

I've added the carbon fiber to the .mat file now. Which can be found in the first post of this thread.

... but I can't find the carbon fiber? :P Or grass... uh-oh.