Help - Search - Members - Calendar
Full Version: Environmental Shader - used in 'Chicory and Coffee'
Hash, Inc. Forums > Technical Direction and Development (Learning Animation:Master) > A:M Rendering, Compositing and Special Effects > Materials Laboratory > Shaders
Pages: 1, 2
ypoissant
QUOTE(John Bigboote @ Mar 3 2009, 01:27 PM) *
EDIT: It sure would be nice to get our hands on that 'environment' shader... How do we contact Yves now-a-days?


There you have it. It is a shader. It can use OpenEXR files as environment for nice reflections.


Forum Note: This shader was used in Dusan Kastelic's short film 'Chicory and Coffee'. This topic has branched off of the discussion on that film.
Read more about 'Chicory and Coffee here.
Fuchur
QUOTE(ypoissant @ Mar 5 2009, 05:34 AM) *
QUOTE(John Bigboote @ Mar 3 2009, 01:27 PM) *
EDIT: It sure would be nice to get our hands on that 'environment' shader... How do we contact Yves now-a-days?


There you have it. It is a shader. It can use OpenEXR files as environment for nice reflections.


Thank you Yves!

Very kind of you smile.gif

*Fuchur*
Rodney
Yes indeed! Thank you Yves! smile.gif
robcat2075
Thanks Yves!

Are there any available instructions on its proper use?
John Bigboote
THANKS Yves!

I just wrote you asking about this...so NEVERMIND that... your generosity preceeds my 'moochiness'.

Yes, any words on it's usage would be paramount! Maybe Mr. Kastelis could spare a moment to advise.

THANK-YOU YVES!
Paul Forwood
Thanks, Yves! I will take a look a little later.smile.gif
John Bigboote
Check me if I am wrong-

Here's the trick: Download Yves 'environment' shader above, and put it into your A:M 'shaders' folder, restart A:M. Open a model and select an image or sequence (movie or even an .exr) to use as the 'environment'. MAKE SURE that TOOLS/OPTIONS/RENDERINGtab/PLUGIN SHADERS is turned to ON or else the environment option will not appear in the next step. Now, in the properties for the model, at the very bottom of the SURFACE tab- is the AMBIANCE RENDER SHADER...where you can select the environment shader and play with its attributes(make sure to play with the 'exposure compensation' control while realtime rendering...) Make sure you have PLUGIN SHADERS turned on at rendertime.

HOW COOL! I can't wait to see how/if this works with SSS
Fuchur
QUOTE(John Bigboote @ Mar 5 2009, 10:16 AM) *
Here's the trick...

So Renderoptions: Activate "Plugin Shader" but dont activate any shader below that.
Do this in the groups / models surface-attributes.

This works for all the shaders available in A:M this way. Dont set the shader in the renderoptions so... if you do that, it will be used for every object, group, etc. while only setting it in the group it should only be used for the group which gives you greater freedom.

*Fuchur*
John Bigboote
I think the environment shader is so cool...it should be announced in it's own thread to the general Forum. I'll give it a day or two to see if Yves wants to do this himself.
Atomike
Would one use this like AO - i.e. with minimal or no other lights? Or is this something different. I don't understand advanced lighting concepts at all, but I'm interested in learning more now that I've seen what's possible.
Fuchur
What is the difference between the shader and an environment-map?

*Fuchur*
ypoissant
QUOTE(Fuchur @ Mar 6 2009, 05:15 PM) *
What is the difference between the shader and an environment-map?


A material (environment map) defines the surface appearance without regard to lighting while a shader defines the surface appearance with regard to lighting (in other way, how the surface reacts to light). The environment maps replaces (or mixes) the material color with he color taken from the map. The environment shader multiplies the lighting values from the environment map with the material color just like lights would do.

The environment shader was developped to help simulate environment reflections on shiny surfaces. It does not replace lights or AO.
heyvern
Oh this is cool. Very cool. This will take some playing around with but it looks very cool.
It took a bit to figure it out. I've never ever ever used any of the plugin render shaders before so you can imagine my difficulty. wink.gif


I didn't have to change my pants but I did toot a little. This happens when I'm a little excited but not overwhelmed. wink.gif

-vern
petokosun
i m d worst
please how can i install this shader into my AM
Rodney
QUOTE
please how can i install this shader into my AM


These are the directions I followed from Matt and Fuchur's description above:

First, Download, copy and extract the shader to the v15 folder.
On a PC this is usually ( C:\Program Files\Hash Inc\V15e.0\Shaders )

1. Go to Tools/Options on your menu (Control P is the shortcut that will bring this menu up)
2. Go to the Rendering tab
3. Activate "Plugin Shader" by changing Off to On (but dont activate any shader below that or everything will recieve the shader!)
4. Go to your into you Model's Group Surface Properties (If your model doesn't have a Group create one)
5. Find the Ambience Shader setting (It'll be near the bottom)
6. Select The Environment Shader from the drop down menu

Render. smile.gif

(Note: This is an initial render with the Environmental Shader using a completely gray image only on the orange part of the character. This is actually working against the intended usage of the shader which was developed to help simulate environment reflections on shiny surfaces. It still works great for other purposes though. Thanks to Yves for the shader and Cronos for the Tridimin character!)
Fuchur
Thanks Yves, that did help understanding it.

Very nice shader!

*Fuchur*
heyvern
This should work well for my Terminator spoof I hope. I was going to use environment maps for the reflective metal to reduce render times but I think I will play with this a bit. I can render one of those "spherical" images of the set and use that for my image.

Does this sound like a good idea?

-vern
steve392
Just done some test renders to try it out and its working a treat the 3rd one is no shader on.This is with just a layer with a sky image on as a bg
Thank's Ives this is very nice
Rodney
We need to use some decent HDR/EXR images to really do justice to this shader.
steve392
How do you use a hdr file I have one I dl'd from the web but have no idea how to use it
John Bigboote
Yes, that was the next logical question... Dusan and Yves both mention the benefit from using .EXR files (and the HDR is new to me) How would these file types benefit us with the environment shader?
steve392
I triede a hdr file on a layer but it looks burnt out ,lost the sky colours .So not using it properly I supose
heyvern
I was getting "blown out whites" as well. There is an setting for "overexposure" correction or something like that. I set it to -2 or something I think. The rest of the elements looked "normal" and the image still rendered on the surfaces. You may want to play with that value.

I wasn't doing it the same way as Rodney described. I used a single image in the render settings applied to the whole chor. Using the different options gave different results. I think this would apply the image to the lights in the chor which effect everything.

-vern
robcat2075
This sounds similar to "Image Based Lighting". Since we already have that (right?) there must be some different result that was needed. What is that different result?
NancyGormezano
QUOTE(robcat2075 @ Mar 7 2009, 11:20 AM) *
This sounds similar to "Image Based Lighting". Since we already have that (right?) there must be some different result that was needed. What is that different result?


The environmental shader results in something that looks more like a reflection of the environment -

whereas IBL uses the IBL image to "color/light/tone" the results - a distinct reflection is not evident in resultant imagery - (can work with or without lights)

try both cases with a chor using a sphere - then the difference becomes obvious.
NancyGormezano
heres eg illustrating the difference
robcat2075
that looks a lot like the result from the regular environment map material in that it seems to be completely replacing the original surface. What of the original surface has been retained, which is what the new environment shader is about?
steve392
Thank's Vern Ill have a play .A lot of differance in them Nancy
NancyGormezano
Robert - from Yves previous post:

QUOTE(ypoissant @ Mar 6 2009, 06:02 PM) *
A material (environment map) defines the surface appearance without regard to lighting while a shader defines the surface appearance with regard to lighting (in other way, how the surface reacts to light). The environment maps replaces (or mixes) the material color with he color taken from the map. The environment shader multiplies the lighting values from the environment map with the material color just like lights would do.

The environment shader was developped to help simulate environment reflections on shiny surfaces. It does not replace lights or AO.


I have not fooled with environ map material - one thing I notice is that the env shader seems to be super quick, and responds to lighting. I thought the environ map does not - ie it behaves more like flat shaded?


ypoissant
QUOTE(robcat2075 @ Mar 7 2009, 03:17 PM) *
that looks a lot like the result from the regular environment map material in that it seems to be completely replacing the original surface. What of the original surface has been retained, which is what the new environment shader is about?

It "seems" only because the original material color is white.
steve392
This is better ,I just moved the lights off the bg layer but how would you get it to just efect the model only
kikiriki
I have been using Environment shader intensively in my projects to fake reflections. There are a lot of reflective surfaces in my "Chicory 'n' Coffee" but I didn't use raytrace reflections even once! The "real" reflections just takes too long to render and the "fake ones" are easier to control and adjust (to make soft reflections- just blur the image. If you want to expose the bright parts of the reflections- just adjust the image... All the reflections on the glass, in the eyes (which is an important visual part of the movie) in my movie are made with this shader.

I "invented" a little tool which helped me a lot during the production. This little tool creates a full panoramic image of your scene in a shape of Spherical and cubic maps as an EXR image. EXR image is easy to adjust (depends on what kind of reflections you want- on glass, on metal...) and you could also use it to "fake" lighting with IBL (combined with AO). I didn't use more than 2 lights per scene in my movie. Other subtle lighting was achieved using IBL with a panoramic image of my scene.

I'm attaching the ZIP file for you to use.

Here are short instructions:

- UNZIP all files into the directory "HDRI mapping" on drive C

- Open "HDRI mapping. Prj" that you will find in this folder

- IMPORT the Choreography file with your scene into this "HDRI mapping.prj". Now you will have two Choreographies in this project. CHO with your scene and CHO named "base"

- Drag 'n' Drop the model "Shortcut to BASE FOR FILMING.mdl" directly from the "base" Choreography into your Choreography

- You may put the model "Shortcut to BASE FOR FILMING.mdl" wherever you like (or need) in your scene. For the start, put it in the middle of your scene

- Press "1" (Camera View) on numeric keyboard as long as you WILL see your scene through the camera that is attached to the "Shortcut to BASE FOR FILMING.mdl"

- Then press "Render to File" and render the sequence. Except the resolution, you may not change anything "Output Settings" of the render dialogue!

- When A:M will finish rendering the sequence of five (squared) images, open the Action file named "HDRI spherical" and press "1" on Numpad so that you could see the spherical map through the camera. Now you can render out this spherical map (using this camera view) as an EXR image (or any other type) with any name you want...

I know it looks confusing as first, but just follow the instructions and you will get the results! Happy experimenting!

I hope this will help you with your projects! :-)

Please browse the second page in the BLOG section of my site: www.bugbrain.com/chicory to se more examples (even couple of animations)

You should get something like this:
ypoissant
Thanks Dusan for this tool and the explanation that goes with it.

And long and succesfull live to Chicoree and coffe.
heyvern
QUOTE(kikiriki @ Mar 7 2009, 07:05 PM) *
www.bugbrain.com/chicoryI have been using Environment shader intensively in my projects to fake reflections. There are a lot of reflective surfaces in my „Chicory 'n' Coffee“ but I didn't use raytrace reflections even once!


I am DEFINITELY going to master THIS technique... oh holy freaking jumping jack rabbits! This is my HOLY GRAIL OF AM! I use reflections up the wazoo! Reflections have ALWAYS been one of my nemeses.
I'm continually amazed. It was the fantastic reflections that jumped out at me in the trailer of C&C. I was thinking it must have taken AGES to render. And now you have not only revealed your secret but provided one of the tools (the panoramic/spherical project file) to help US do it. You know if you give away all of your secrets, ANYONE can do a great short animation and win awards wink.gif


... oh wait... I guess you still need some talent and a good story... but at least the reflections will look good!

I am going to start working on a test right now of My terminator model.... woooohooo! If it goes well I may have to change my pants. wink.gif


p.s. Oh... uh.. sorry Yves. Didn't mean to leave you out. Thanks for the environment shader! Without that I would still have clean pants.

-vern
robcat2075
So far I'm getting no visible anything of the image map in my tests.

The environment shader shows up in A:M as an "Ambiance" shader... I have plugin shaders ON...

turning up the ambiance in the material only makes the surface color brighter but no image map is visible. What step am i missing?
heyvern
Play around with the different application options (sphere? Cube?) and also add some reflection to models. It is for simulating reflections. If nothing reflects you won't see much.

-vern
robcat2075
QUOTE(heyvern @ Mar 7 2009, 11:38 PM) *
It is for simulating reflections. If nothing reflects you won't see much.


the point is it doesn't need real reflections. If it needs real refelctions then it isnt' simulating reflections.

There ought to be some perceivable vestige of the image map showing when this is applied.
NancyGormezano
QUOTE(robcat2075 @ Mar 7 2009, 10:12 PM) *
QUOTE(heyvern @ Mar 7 2009, 11:38 PM) *
It is for simulating reflections. If nothing reflects you won't see much.


the point is it doesn't need real reflections. If it needs real refelctions then it isnt' simulating reflections.

There ought to be some perceivable vestige of the image map showing when this is applied.


Try making a group in the model and use the shader in that group's ambiance render shader (lat-long) - unfortunately I didn't save my simple model chor - and I'm doing something else right now

I was using ver 13s - same as Dusan I believe (do not know if that makes a difference)
heyvern
QUOTE(robcat2075 @ Mar 8 2009, 01:12 AM) *
QUOTE(heyvern @ Mar 7 2009, 11:38 PM) *
It is for simulating reflections. If nothing reflects you won't see much.


the point is it doesn't need real reflections. If it needs real refelctions then it isnt' simulating reflections.

There ought to be some perceivable vestige of the image map showing when this is applied.


Sorry! You are right. I'm an idiot. However Nancy's instructions worked. No reflection on the surface properties and the image shows up peachy keen! Woohooo! Set the Ambience shader for the model and add the image.

Here's where living in my own brain caused me to get confused. I use 1 ray cast reflection on my chrome endoskeleton characters along with the "old" style projection map. It looks good and doesn't take long to render. Doesn't need to be anything but the model and it looks like it is reflecting all kinds of stuff but STILL self reflects and reflects other objects near it in the chor. SO the NEW environment shader will improve the results using the same idea. I have to have some reflection for my use since there will be two chrome robots facing each other and interacting... and moving. They should have reflections. I just don't want to have to create the ENTIRE environment for them to reflect.

If I am off base on this I am sure I will find out eventually. I plan to dig into this with gusto. If you read Dusan's blog you see they had some early faltering starts. I hope my successes are as good as his failures! wink.gif

-vern
heyvern
Well here's my "successful" attempt. I put "successful" in quotes because it is what it is. wink.gif

I used my "Lost World" project I never finished for my spherical environment render. Still have a lot to learn about this but I'm having fun! Odd thing though. I had to use the cube option for the shader to get the right look. If I used mirrored sphere it didn't wrap properly on the sphere. Is this correct? Oh well it works.

Click to view attachment

Click to view attachment

-vern
kikiriki
QUOTE
- Press "1" (Camera View) on numeric keyboard as long as you WILL see your scene through the camera that is attached to the "Shortcut to BASE FOR FILMING.mdl"



Ups... I made a grammar mistake! Maybe that's why some of you didn't get the results...
It's quite crucial since I confused and put a word WONT where should be WILL. Sorry, I wrote the tut this in the middle of the night.

This little tool should make a perfect maps for the Env. Shader (orientation etc should match). Another mistake I made is that I used name "HDRI camera SPHERICAL. ACT" while it should be named "Spherical map for Latitude-longitude projection" as it work with this projection. Sorry again. It's more than 2 years since I made this little tool and I didn't think it will ever be used by someone else

So Wern, please try with LATITUDE-LONGITUDE projection. This should work...
Fuchur
Hi, just wanted to let you know:
I talked to Yves and Dusan and now the Shader and the Helper-PRJ for creating environment-images of EXR are available for download at my website. (at "Products" -> "Download" -> "A:M Shader")

Like this it won't be lost in the forum-traffic and will stay available.
It is next to the *.x-exporter & *.dts-export plugins there.

See you
*Fuchur*
heyvern
Thanks for the info Dusan,

I was confused by the "pinching" at the poles on my sphere. If I used the cube mapping for the environment shader I didn't see "pinching". When I use the longitude/latitude I get the "pinching" at the poles (where the spline are "squished"), but it does appear to be a more accurate reflection. It could be that I should not be rotating the model? I should use an orientation bone to keep the environment shader oriented correctly?

I tried it on a spherical model with better results. It could be my sphere is not correct?

-vern
heyvern
I'm not getting the same results.

I get extreme pinching at the poles with longitude/latitude. This has nothing to do with my sphere model. The pinching is not in the same spot. I must be doing something wrong. I even rendered out the spherical map from the supplied images in the zip.

-vern
heyvern
This is what I get with the longitude/latitude mapping using a render with the included images from the spherical action. Notice the pinching at the poles and incorrect distortion. It's almost as if the image is offset at the poles?

Click to view attachment

-vern
kikiriki
QUOTE(heyvern @ Mar 8 2009, 12:05 PM) *
This is what I get with the longitude/latitude mapping using a render with the included images from the spherical action. Notice the pinching at the poles and incorrect distortion. It's almost as if the image is offset at the poles?

Click to view attachment

-vern


Hmm... it works here...
First we need to see what is going wrong. So I rendered the same HDRI EXR image and attached it to this message (ZIP FILE). Apply this one on the sphere with Longitude-Latitude projection and post the results...

P.S. As far as I know the orientation bone option doesn't work... and yes- the best point of this shader is that you can move object and camera around and reflection will "follow" the movement very realisticaly.
heyvern
Nope. Same results. My image and yours are identical. I apply it as longitud-latitude and it looks like my previous sample not like yours. The "poles" are squeezed and pinched very small.

Are you still using v13? I am using v15. Maybe there is something that "happened" during a version update? Are you certain we are using the same version of the shader?

-vern
heyvern
here's the image. Maybe if you could provide a small project file I could see what I'm doing wrong.

Click to view attachment

-vern
NancyGormezano
QUOTE(heyvern @ Mar 8 2009, 03:28 PM) *
Are you still using v13?


I'm using 13s - as a test - get the 32Patch sphere - select all cp's to make group - set ambiance render shader of the group to environment - choose Dusan's image, leave as lat-long - drag into default chor - theres not much else to do (except adjust key light down maybe so you can see)

AND YES this a cool beans shader - WONDERFUL - and so is the "image generator" for the environ image - Thanks Yves & Dusan!
Ganthofer
Hey Vern,

here is one I did in V14. Seems to work.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.