How to make cloud material and volume fog in mesh?

Announcements, requests and support regarding the MAYA exporter
Post Reply
5 posts • Page 1 of 1
ior
Posts: 166
Joined: Tue Aug 24, 2010 11:47 am

How to make cloud material and volume fog in mesh?

Post by ior » Sat Oct 16, 2010 7:25 am

I used this material for the renders I show next:

Code: Select all

<medium>
	<name>fog_medium</name>
	<precedence>2</precedence>
	<basic>
		<ior>1</ior>
		<cauchy_b_coeff>0</cauchy_b_coeff>
		<absorption_coefficient_spectrum>
				<rgb>
					<rgb>0.1000000015 0.1000000015 0.1000000015</rgb>
					<gamma>2.200000048</gamma>
				</rgb>
		</absorption_coefficient_spectrum>
		<subsurface_scattering>
			<scattering_coefficient_spectrum>
				<rgb>
					<rgb>0.2689097524 0.2689097524 0.2689097524</rgb>
					<gamma>2.200000048</gamma>
				</rgb>
		</scattering_coefficient_spectrum>
			<phase_function>
				<uniform/>
			</phase_function>
		</subsurface_scattering>
	</basic>
</medium>
<material>
	<name>indigoShader6SG</name>
	<specular>
		<transparent>true</transparent>
		<absorption_layer_transmittance>
			<constant>
				<rgb>
					<rgb>1 1 1</rgb>
					<gamma>2.200000048</gamma>
				</rgb>
			</constant>
		</absorption_layer_transmittance>
		<internal_medium_name>fog_medium</internal_medium_name>
	</specular>
</material>
volume fog all scene.jpg
volume fog all scene filled by sphere.
in this example I've put a big sphere with the previous material filling all scene.
volume fog in a sphere in front of light ray.jpg
Same material in a sphere in front of light ray (on the left)
In this I've shrink the sphere to a small size and put it in front of left light ray.
What am I doing wrong? I don't see volume fog and it takes long to the sphere to be uniform.


how to do this cloud material:
http://www.indigorenderer.com/forum/vie ... 8&start=17

I've tried everything and nothing. What is a FBM ISL shader? [EDIT] Fractal Brownian Motion Indigo Shader Language.

I am using the Indigo 2.6.1 and Maya to Indigo 2.x beta 2.

Thanks.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: How to make cloud material and volume fog in mesh?

Post by CTZn » Sun Oct 17, 2010 12:59 am

I'll recreate your setup to test further myself. Probably, SSS is stressing bidir too much: change render mode to single path tracing + MLT. It's an efficiency/time issue I believe.

Rule of thumb: when I use sss, I set MLT on.

Also, why the white transmittance layer, did you mean to set it off ? In theory, a white transmittance has no impact, in practice it would be better set off (black with no connection).

Also I've tested this but Indigo 2.6.1 will not accept shader definitions in scattering coefficient and absorbtion:

Code: Select all

Found unexpected element 'shader'. (In element 'scattering_coefficient_spectrum')
Ono's experiments are based on features wich are not yet available in Indigo releases.

To pass XML from MtI to Indigo directly:

1: select the material you want to hand edit
2: press the shelf button: Replace Shader
3: You'll find the material XML code Indigo will use in the Attribute Editor's notes of the material
4: After you modified the notes, press the numpad [Enter] to save them. The asterisk in the notes title should then disappear as a confirmation.

Note that the first line you'll find in the notes must be left unaltered to signify MtI to use it, instead of actually exporting the material. If you want MtI to ignore the material notes, then alter the first characters of that line:

Code: Select all

<!-- mti_UseCommentAsXML -->
Thanks to your remarks, I've spotted two items to add to MtI: a switch for transmittance layer, and display notes for the indigoShader. Your interventions in this forum are much welcome !
obsolete asset

ior
Posts: 166
Joined: Tue Aug 24, 2010 11:47 am

Re: How to make cloud material and volume fog in mesh?

Post by ior » Mon Oct 18, 2010 5:19 am

Ok. I've made some tests with MLT but it takes too long! :(
Why this behavior, if light inside fog render fast and perfect? Should render the same way with only BiDir!

here are the MLT examples:
volume fog in a sphere in front of light ray BiDir+MLT.jpg
BiDir+MLT
It took 7 hours to render and still not perfectly defined sphere with light ray.
volume fog in a sphere in front of light ray PT+MLT.jpg
PT+MLT
This one is clearly bad and it took 4 hours to render.


MLT is very slow but it seems the only way to render this effects.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: How to make cloud material and volume fog in mesh?

Post by CTZn » Mon Oct 18, 2010 7:41 am

ior wrote:MLT is very slow but it seems the only way to render this effects.
True, the variable is wether bidir is used or not.

There are different rendering modes precisely because they perform differently on specific tasks, they are complementary. MLT + bidir is the best association in pretty much all cases.

For bidir, a specular object surrounded by diffuse surfaces lit indirectly is very tricky. Not to mention sss.
obsolete asset

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Re: How to make cloud material and volume fog in mesh?

Post by CTZn » Tue Oct 19, 2010 1:34 am

CTZn wrote:Also I've tested this but Indigo 2.6.1 will not accept shader definitions in scattering coefficient and absorbtion:

Code: Select all

Found unexpected element 'shader'. (In element 'scattering_coefficient_spectrum')
Ono's experiments are based on features wich are not yet available in Indigo releases.
I was wrong, the mistake I did was that XML tags embrassing shader code are not the same that those used with regular spectrums:

Code: Select all

absorbtion_coefficient_spectrum
should be:

Code: Select all

absorbtion_coefficient
when using shaders, same for scattering wich should be, when using shaders:

Code: Select all

<scattering_coefficient>
My mistake. Reference: http://www.indigorenderer.com/forum/vie ... 41#p101641

For now these operations must be handled by the users in MtI, using the code generated in the material's notes by the shelf button "Replace Shader" as a base code.
obsolete asset

Post Reply
5 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest