Cindigo 0.9 - beta 2

Announcements, requests and support regarding the Cinema 4D exporter
Locked
131 posts
User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Post by fused » Tue Oct 09, 2007 6:49 pm

uhm... actually no. it isnt as easy as one might think it is, but it will be in beta 3.

User avatar
Marcofly
Posts: 407
Joined: Thu Jun 29, 2006 12:51 am
Location: Köln, Germany

Post by Marcofly » Tue Oct 09, 2007 8:40 pm

nice sphere, fused!!! poly selection is another important step forward!! thanks a lot!

Marco

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Post by fused » Tue Oct 09, 2007 9:09 pm

CoolColJ wrote:anyway to allow instances to use different materials? I noticed the obj files have mtl parameter which makes this difficult - this would be so nice if you can somehow get it to work
well... maybe i could add some checkbox to the material helper like "instance material" which disables the link field for the C4Dmaterial... if this mat helper is put on an instance, the mat gets redefined and the instance has this mat. the problem with this is, that every instance after that will get the new mat, too...

what do you think?

User avatar
mrmoose
Posts: 130
Joined: Mon Jun 26, 2006 7:45 pm

Post by mrmoose » Tue Oct 09, 2007 9:47 pm

One question fused: is it possible use istances to duplicate lightportals?

Thanks for your reply, mrmoose :)

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Post by fused » Tue Oct 09, 2007 10:10 pm

yes, it should be possible. but i never tested.

User avatar
Marcofly
Posts: 407
Joined: Thu Jun 29, 2006 12:51 am
Location: Köln, Germany

Post by Marcofly » Tue Oct 09, 2007 10:30 pm

yes, it works, mrmoose.. you don't need to apply a material or an exit-portal tag to the instances..

:wink:

User avatar
CoolColJ
Posts: 1738
Joined: Mon Jun 25, 2007 1:47 pm

Post by CoolColJ » Wed Oct 10, 2007 10:50 am

fused wrote:
CoolColJ wrote:anyway to allow instances to use different materials? I noticed the obj files have mtl parameter which makes this difficult - this would be so nice if you can somehow get it to work
well... maybe i could add some checkbox to the material helper like "instance material" which disables the link field for the C4Dmaterial... if this mat helper is put on an instance, the mat gets redefined and the instance has this mat. the problem with this is, that every instance after that will get the new mat, too...

what do you think?
something is better than nothing :)
But not really ideal either

I'll have a look at how Sketchup does it, you can have instances with different materials on each and I believe it does use Obj as well and report back

User avatar
Zom-B
1st Place 100
Posts: 4701
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Wed Oct 10, 2007 9:31 pm

Beta 3 with new obj code really sounds promising!!
I just found bug 12 & 13:

12) Crash on export if you use an instanced light source.

13) Scale for instances doesn't get exported (scaling was done via Funktionen > Duplizieren). Here an example scene.
Attachments
instance_scaling.zip
(10.43 KiB) Downloaded 238 times
polygonmanufaktur.de

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Post by fused » Wed Oct 10, 2007 10:45 pm

i spotted the problem already. will fix it for beta 3.
ZomB wrote:Beta 3 with new obj code really sounds promising!!
is also looks promising. here's another one:

Image

phong breaks are working now.

used one of BbB's textures :)

User avatar
CoolColJ
Posts: 1738
Joined: Mon Jun 25, 2007 1:47 pm

Post by CoolColJ » Wed Oct 10, 2007 11:15 pm

8)

User avatar
Pinko5
Posts: 497
Joined: Mon Feb 19, 2007 8:15 pm
Location: Italy

Post by Pinko5 » Thu Oct 11, 2007 12:15 am

:D :D :D when we can try it???
Pinko.

User avatar
Zom-B
1st Place 100
Posts: 4701
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Post by Zom-B » Thu Oct 11, 2007 1:20 am

fused wrote:phong breaks are working now.
Great new Features are coming... thanks for your work & time you invest fused!!!1!

Got a question about the Phong breaks:
Does this mean that only manually set Phong breaks (Funktionen > Phong Shading unterbrechen) get recognized, or also the settings on the Phong Tag about the "Winkelbeschrenkung" ?
polygonmanufaktur.de

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Post by fused » Thu Oct 11, 2007 2:34 am

ZomB wrote:Got a question about the Phong breaks:
Does this mean that only manually set Phong breaks (Funktionen > Phong Shading unterbrechen) get recognized, or also the settings on the Phong Tag about the "Winkelbeschrenkung" ?
hmmm. i know that "winkelbeschränkung" works. about "Shading unterbrechen" im not sure... maybe... the docs dont say anything about that:
CINEMA 4D R9.1 SDK wrote:Vector* CreatePhongNormals()
Returns an array with the stored phong normals of the object. The array contains 4*GetPolygonCount() vectors, one for each point of each face (including the unused fourth point of a triangle). The array has to be freed afterwards with GeFree().
i think it should work.
Pinko5 wrote:when we can try it???
the list of normals and texture coords i export is still not optimized. the exporter exports normals and tex coords for every tris points (3 * polygon count). imagine that for a mesh with millions of polygons(veeeeeery large .obj files). you can try it when i figured out how to optimize the output :)

User avatar
Marcofly
Posts: 407
Joined: Thu Jun 29, 2006 12:51 am
Location: Köln, Germany

Post by Marcofly » Thu Oct 11, 2007 8:55 am

Looking forward to try it!! :wink:

User avatar
CoolColJ
Posts: 1738
Joined: Mon Jun 25, 2007 1:47 pm

Post by CoolColJ » Thu Oct 11, 2007 11:15 am

CoolColJ wrote:
fused wrote:
CoolColJ wrote:anyway to allow instances to use different materials? I noticed the obj files have mtl parameter which makes this difficult - this would be so nice if you can somehow get it to work
well... maybe i could add some checkbox to the material helper like "instance material" which disables the link field for the C4Dmaterial... if this mat helper is put on an instance, the mat gets redefined and the instance has this mat. the problem with this is, that every instance after that will get the new mat, too...

what do you think?
something is better than nothing :)
But not really ideal either

I'll have a look at how Sketchup does it, you can have instances with different materials on each and I believe it does use Obj as well and report back
Fuse

here is a sample scene of how instancing is done with different materials, see if you can get anything out of it

just a box mesh, instanced 3 times and each has a different material.
orange phong box, gold NK data box and purple diffuse transmitter/diffuse blend

It looks like all you need to do is break the MTL link in the OBJ file, and then declare a material and then assign a model straight after that

What I am hoping for Cinidgo is that, for each instance you can assign a material helper tag to it, and that instance will use that material. If no material helper is assigned it uses the same material as the referenced object

Code: Select all

<?xml version="1.0" standalone=no>
<scene>
		<renderer_settings>
			<width>500</width>
			<height>375</height>
			<max_num_consec_rejections>30000</max_num_consec_rejections>
			<bidirectional>true</bidirectional>
			<metropolis>true</metropolis>
			<hybrid>false</hybrid>
			<halt_time>-1</halt_time>
			<image_save_period>65</image_save_period>
			<save_igi>false</save_igi>
		</renderer_settings>
		<tonemapping>
		<reinhard>
			<pre_scale>2.0</pre_scale>
			<post_scale>1.5</post_scale>
			<burn>7</burn>>
		</reinhard>
		</tonemapping>
		<camera>
			<pos>-2.6895 -0.9881 0.9021</pos>
			<up>0.4258 0.1599 2.4990</up>
			<forwards>2.3393 0.8788 -0.4548</forwards>
			<aperture_radius>0.0027</aperture_radius>
			<focus_distance>3.0059</focus_distance>
			<aspect_ratio>1.3333</aspect_ratio>
			<sensor_width>0.036</sensor_width>
			<lens_sensor_dist>0.0428</lens_sensor_dist>
			<white_balance>D65</white_balance>
		</camera>
		<skylight>
			<sundir>-0.4238 -0.7724 0.4730</sundir>
			<turbidity>2.5</turbidity>
		</skylight>
		
				<material>
			<name>Floor</name>
			<diffuse>
				<albedo_spectrum>
					<rgb>
						<rgb>0.2392 0.6000 0.6000</rgb>
						<gamma>2.2</gamma>
					</rgb>
				</albedo_spectrum>
			</diffuse>
		</material>
		<mesh>
			<name>Floor</name>
			<normal_smoothing>true</normal_smoothing>
 			<embedded>
				<expose_uv_set>
					<index>0</index>
					<name>uv0</name>
				</expose_uv_set>
				<expose_uv_set>
					<index>1</index>
					<name>uv1</name>
				</expose_uv_set>
				<expose_uv_set>
					<index>2</index>
					<name>uv2</name>
				</expose_uv_set>
				<expose_uv_set>
					<index>3</index>
					<name>uv3</name>
				</expose_uv_set>
				<vertex pos="2.7816 -1.5323 0.0000" normal="0.0000 0.0000 1.0000" uv0="109.5123 -59.3275" />
				<vertex pos="-1.3409 3.1872 0.0000" normal="0.0000 0.0000 1.0000" uv0="-52.7909 126.4793" />
				<vertex pos="-1.3409 -1.5323 0.0000" normal="0.0000 0.0000 1.0000" uv0="-52.7909 -59.3275" />
				<vertex pos="2.7816 3.1872 0.0000" normal="0.0000 0.0000 1.0000" uv0="109.5123 126.4793" />
				<triangle_set>
					<material_name>Floor</material_name>
					<tri>0 1 2</tri>
					<tri>1 0 3</tri>
				</triangle_set>
			</embedded>
		</mesh>
		<model>
			<pos>0.0 0.0 0.0</pos>
			<scale>1.0</scale>
			<rotation>
				<matrix>
					1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0 
				</matrix>
			</rotation>
			<mesh_name>Floor</mesh_name>
		</model>
		<mesh>
			<name>Box</name>
			<normal_smoothing>true</normal_smoothing>
 			<embedded>
				<expose_uv_set>
					<index>0</index>
					<name>uv0</name>
				</expose_uv_set>
				<expose_uv_set>
					<index>1</index>
					<name>uv1</name>
				</expose_uv_set>
				<expose_uv_set>
					<index>2</index>
					<name>uv2</name>
				</expose_uv_set>
				<expose_uv_set>
					<index>3</index>
					<name>uv3</name>
				</expose_uv_set>
				<vertex pos="0.5000 0.5000 0.0000" normal="0.0000 0.0000 -1.0000"/>
				<vertex pos="0.0000 0.0000 0.0000" normal="0.0000 0.0000 -1.0000"/>
				<vertex pos="0.0000 0.5000 0.0000" normal="0.0000 0.0000 -1.0000"/>
				<vertex pos="0.5000 0.0000 0.0000" normal="0.0000 0.0000 -1.0000"/>
				<vertex pos="0.5000 0.0000 0.5000" normal="0.0000 0.0000 1.0000"/>
				<vertex pos="0.0000 0.5000 0.5000" normal="0.0000 0.0000 1.0000"/>
				<vertex pos="0.0000 0.0000 0.5000" normal="0.0000 0.0000 1.0000"/>
				<vertex pos="0.5000 0.5000 0.5000" normal="0.0000 0.0000 1.0000"/>
				<vertex pos="0.5000 0.0000 0.5000" normal="0.0000 -1.0000 0.0000"/>
				<vertex pos="0.0000 0.0000 0.0000" normal="0.0000 -1.0000 0.0000"/>
				<vertex pos="0.5000 0.0000 0.0000" normal="0.0000 -1.0000 0.0000"/>
				<vertex pos="0.0000 0.0000 0.5000" normal="0.0000 -1.0000 0.0000"/>
				<vertex pos="0.0000 0.5000 0.5000" normal="-1.0000 0.0000 0.0000"/>
				<vertex pos="0.0000 0.0000 0.0000" normal="-1.0000 0.0000 0.0000"/>
				<vertex pos="0.0000 0.0000 0.5000" normal="-1.0000 0.0000 0.0000"/>
				<vertex pos="0.0000 0.5000 0.0000" normal="-1.0000 0.0000 0.0000"/>
				<vertex pos="0.0000 0.5000 0.5000" normal="0.0000 1.0000 0.0000"/>
				<vertex pos="0.5000 0.5000 0.0000" normal="0.0000 1.0000 0.0000"/>
				<vertex pos="0.0000 0.5000 0.0000" normal="0.0000 1.0000 0.0000"/>
				<vertex pos="0.5000 0.5000 0.5000" normal="0.0000 1.0000 0.0000"/>
				<vertex pos="0.5000 0.5000 0.0000" normal="1.0000 0.0000 0.0000"/>
				<vertex pos="0.5000 0.0000 0.5000" normal="1.0000 0.0000 0.0000"/>
				<vertex pos="0.5000 0.0000 0.0000" normal="1.0000 0.0000 0.0000"/>
				<vertex pos="0.5000 0.5000 0.5000" normal="1.0000 0.0000 0.0000"/>
				<triangle_set>
					<material_name>Default</material_name>
					<tri>0 1 2</tri>
					<tri>1 0 3</tri>
					<tri>4 5 6</tri>
					<tri>5 4 7</tri>
					<tri>8 9 10</tri>
					<tri>9 8 11</tri>
					<tri>12 13 14</tri>
					<tri>13 12 15</tri>
					<tri>16 17 18</tri>
					<tri>17 16 19</tri>
					<tri>20 21 22</tri>
					<tri>21 20 23</tri>
				</triangle_set>
			</embedded>
		</mesh>
		<material>
		<name>Default</name>
			<phong>
				<nk_data>nkdata/au.nk</nk_data>
				<exponent>500</exponent>
			</phong>
		</material>
		<model>
			<pos>0.6751 0.0 0.0</pos>
			<scale>1.0</scale>
			<rotation>
				<matrix>
					1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
				</matrix>
			</rotation>
			<mesh_name>Box</mesh_name>
		</model>
		<material>
			<name>D_Default_D</name>
			<diffuse>
				<albedo_spectrum>
					<rgb>
						<rgb>0.4784 0.1569 0.8000</rgb>
						<gamma>2.2</gamma>
					</rgb>
				</albedo_spectrum>
			</diffuse>
		</material>
		<material>
			<name>DT_Default_DT</name>
			<diffuse_transmitter>
				<albedo_spectrum>
					<rgb>
						<rgb>0.4784 0.1569 0.8000</rgb>
						<gamma>2.2</gamma>
					</rgb>
				</albedo_spectrum>
			</diffuse_transmitter>
		</material>
		<material>
			<name>Default</name>
			<blend>
				<a_name>DT_Default_DT</a_name>
				<b_name>D_Default_D</b_name>
				<blend_factor>0.4</blend_factor>
			</blend>
		</material>
		<model>
			<pos>-0.331553052843137 -0.392449014521732 1.80470088915726e-016</pos>
			<scale>1.0</scale>
			<rotation>
				<matrix>
					1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
				</matrix>
			</rotation>
			<mesh_name>Box</mesh_name>
		</model>
		<material>
			<name>Default</name>
			<phong>
				<diffuse_albedo_spectrum>
					<rgb>
						<rgb>0.8000 0.6000 0.0000</rgb>
						<gamma>2.2</gamma>
					</rgb>
				</diffuse_albedo_spectrum>
				<ior>1.52</ior>
 				<fresnel_scale>1.0</fresnel_scale>
 				<exponent>1000</exponent>
 			</phong>
 		</material>
		<model>
			<pos>0.0 0.885 0.0</pos>
			<scale>1.0</scale>
			<rotation>
				<matrix>
					1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0
				</matrix>
			</rotation>
			<mesh_name>Box</mesh_name>
		</model>
</scene>
Attachments
im1192057390.JPG
im1192057390.JPG (48.82 KiB) Viewed 3777 times

Locked
131 posts

Who is online

Users browsing this forum: No registered users and 5 guests