Page 1 of 1

Another Diamond Attempt

Posted: Wed Feb 14, 2007 2:56 pm
by CryptoQuick
I've been messing around with Indigo for over a month now, and I'm trying to get diamond correct.

I've done some searches over this forum, and MAN there is a lot of knowledge to put together!

First of all, some pictures of what I've been doing:
Image
This is a simple model I used, adapted from the icosahedral sphere in Blender. It is within a cube

with a couple of meshlamps in there.

Image
This is a more complicated model with 80 facets underneath. I made the basic model with CAD software

in order to get the angles correct-- I wanted to go for the 'Eulitz Brilliant' as per here:
http://en.wikipedia.org/wiki/Diamond_cut#Proportions
Image

However, it seems that all that was for naught when I tried to cut facets. Well,anyway, I have some

half-decent model...

Now, all I know is that everything I'm doing looks terrible:
Image

I need to know what I did wrong. Here's what I did:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>

<scene>
	<renderer_settings>
		<width>640</width>
		<height>480</height>
		<metropolis>true</metropolis>
		<max_num_consec_rejections>10000</max_num_consec_rejections>
		<bidirectional>false</bidirectional>
		<logging>false</logging>
		<save_untonemapped_exr>false</save_untonemapped_exr>
		<save_tonemapped_exr>false</save_tonemapped_exr>
		<halt_time>-1</halt_time>
		<image_save_period>20</image_save_period>
		<num_threads>2</num_threads>
	</renderer_settings>

	<tonemapping>
		<reinhard>
			<pre_scale>8.000000</pre_scale>
			<post_scale>1.000000</post_scale>
			<burn>16.000</burn>
		</reinhard>
	</tonemapping>

	<material>
		<name>Default</name>

		<diffuse>
			<colour>1 1 1</colour>
		</diffuse>
	</material>

	<material>
		<name>Black</name>

		<phong>
			<diffuse>0 0 0</diffuse>
			<ior>1.5</ior>
			<exponent>100000</exponent>
		</phong>
	</material>

	<camera>
		<pos>2.280879 -2.370052 1.591098</pos>
		<up>-0.291797 0.286896 0.912439</up>
		<forwards>-0.666947 0.622751 -0.409099</forwards>
		<aperture_radius>0.002000</aperture_radius>
		<focus_distance>2.000000</focus_distance>
		<aspect_ratio>1.33333</aspect_ratio>
		<sensor_width>0.035000</sensor_width>
		<lens_sensor_dist>0.038281</lens_sensor_dist>
		<white_balance>E</white_balance>
		<autofocus/><!--
		<bloom>
			<weight>0.100</weight>
			<radius>0.050</radius>
		</bloom>-->
	</camera>

<!-- Diamond Material -->

	<medium>
		<name>Diamond</name>
		<basic>
			<ior>2.42</ior>
			<cauchy_b_coeff>0.014</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
				<rgb>
					<rgb>0 0 0</rgb>
				</rgb>
			</absorption_coefficient_spectrum>
<!--			<subsurface_scattering>
				<scattering_coefficient_spectrum>
					<uniform>
						<value>1000</value>
					</uniform>
				</scattering_coefficient_spectrum>
				<phase_function>
					<henyey_greenstein>
						<g_spectrum>
							<uniform>
								<value>0.8</value>
							</uniform>
						</g_spectrum>
					</henyey_greenstein>
				</phase_function>
			</subsurface_scattering>-->
		</basic>
		<precedence>20</precedence>
	</medium>

	<material>
		<name>Diamond</name>
		<specular>
			<transparent>true</transparent>
			<internal_medium_name>Diamond</internal_medium_name>
		</specular>
	</material>

	<!-- Plane.002 -->
	<mesh>
		<name>Plane.003</name>
		<normal_smoothing>false</normal_smoothing>
		<embedded>
			<expose_uv_set>
				<index>0</index>
				<name>uv</name>
			</expose_uv_set>
			<vertex pos="1.090066 1.923561 -3.418558" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="-0.881702 2.258414 -3.418557" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="-0.749119 3.039122 -1.582007" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="1.222651 2.704269 -1.582008" normal="0.153743 0.905313 

-0.395943" />
			<triangle_set>
				<material_name>Default</material_name>
				<tri>0 1 2</tri>
				<tri>2 3 0</tri>
			</triangle_set>
		</embedded>
	</mesh>

	<meshlight>
		<pos>3.342344 -2.738925 4.045165</pos>
		<scale>1</scale>
		<rotation>
			<matrix>
				-0.764678 4.86518e-008 -0.644413 -0.644413 -5.77316e-008 0.764678 0 

1 7.54979e-008
			</matrix>
		</rotation>
		<spectrum>
				<blackbody>
				<temperature>6500</temperature>
				<gain>1</gain>
			</blackbody>
		</spectrum>
		<mesh_name>Plane.003</mesh_name>
		<efficacy_scale>
			<power_drawn>40</power_drawn>
			<overall_luminous_efficacy>20</overall_luminous_efficacy>
		</efficacy_scale>
	</meshlight>

	<!-- Plane.001 -->
	<mesh>
		<name>Plane.002</name>
		<normal_smoothing>false</normal_smoothing>
		<embedded>
			<expose_uv_set>
				<index>0</index>
				<name>uv</name>
			</expose_uv_set>
			<vertex pos="1.090066 1.923561 -3.418558" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="-0.881702 2.258414 -3.418557" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="-0.749119 3.039122 -1.582007" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="1.222651 2.704269 -1.582008" normal="0.153743 0.905313 

-0.395943" />
			<triangle_set>
				<material_name>Default</material_name>
				<tri>0 1 2</tri>
				<tri>2 3 0</tri>
			</triangle_set>
		</embedded>
	</mesh>

	<meshlight>
		<pos>-3.531893 -4.215931 3.215071</pos>
		<scale>1</scale>
		<rotation>
			<matrix>
				0.752564 -0.658519 9.17658e-008 -0.555563 -0.634905 -0.536885 

0.353549 0.40404 -0.843656 
			</matrix>
		</rotation>
		<spectrum>
				<blackbody>
				<temperature>5500</temperature>
				<gain>1</gain>
			</blackbody>
		</spectrum>
		<mesh_name>Plane.002</mesh_name>
		<efficacy_scale>
			<power_drawn>35</power_drawn>
			<overall_luminous_efficacy>20</overall_luminous_efficacy>
		</efficacy_scale>
	</meshlight>

	<!-- Plane -->
	<mesh>
		<name>Plane.001</name>
		<normal_smoothing>false</normal_smoothing>
		<embedded>
			<expose_uv_set>
				<index>0</index>
				<name>uv</name>
			</expose_uv_set>
			<vertex pos="1.090066 1.923561 -3.418558" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="-0.881702 2.258414 -3.418557" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="-0.749119 3.039122 -1.582007" normal="0.153743 0.905313 

-0.395943" />
			<vertex pos="1.222651 2.704269 -1.582008" normal="0.153743 0.905313 

-0.395943" />
			<triangle_set>
				<material_name>Default</material_name>
				<tri>0 1 2</tri>
				<tri>2 3 0</tri>
			</triangle_set>
		</embedded>
	</mesh>

	<meshlight>
		<pos>4.476289 2.454823 4.045165</pos>
		<scale>1</scale>
		<rotation>
			<matrix>
				1 0 0 0 7.54979e-008 -1 0 1 7.54979e-008 
			</matrix>
		</rotation>
		<spectrum>
				<blackbody>
				<temperature>3500</temperature>
				<gain>1</gain>
			</blackbody>
		</spectrum>
		<mesh_name>Plane.001</mesh_name>
		<efficacy_scale>
			<power_drawn>50</power_drawn>
			<overall_luminous_efficacy>20</overall_luminous_efficacy>
		</efficacy_scale>
	</meshlight>

and then I have the cube and the diamond, which are too long to put into here.
Somebody, please set me straight!

Posted: Wed Feb 14, 2007 3:13 pm
by eman7613
i would suggest, you try using a simpler cut with a refinance picture to make sure it works correctly, as the problem can be the material, or the model. I would suggest either an emerald cut, or a cut after the hope diamond as they are not terribly complex and there are numerous references for you to look at.

EDIT: also, one change to your material

Code: Select all

<ior>2.417</ior>
should be slightly more accurate off the top of my head.

Posted: Wed Feb 14, 2007 3:47 pm
by CryptoQuick
Thanks, eman, I'll make the IOR change, and I'll work on another model. However, I can't help but think there's something more that I'm missing, here.

I've seen this thread here:
http://www2.indigorenderer.com/joomla/f ... ht=diamond
What a beautiful diamond! Why can't mine be so pretty? :roll:

And this one: http://www2.indigorenderer.com/joomla/f ... ht=diamond
There has to be some subtlety I'm missing!!

Posted: Wed Feb 14, 2007 6:19 pm
by eman7613
both of those are simpler, European style cuts, much less to go wrong.

your first diamond dosent even look like any realy type of cut, so im not sure what it is supposed to look like. The second one, is overly complex, and again doesn't seem to meet any style of cut.

Both of the linked cuts appear to be European style cuts, similar to a "brilliant" cut.

your best bet, it to first find a model of a diamond (with accurate cut) and get your material to work correctly. then see if you cant find a tutorial on how to model a diamond accurately.

Posted: Wed Feb 14, 2007 6:24 pm
by OnoSendai
Looks like the normals on your model are fucked.

Posted: Wed Feb 14, 2007 11:42 pm
by DaveC
OnoSendai wrote:Looks like the normals on your model are fucked.
Well, hey! Let's be blunt about the sharp object, eh? :lol: