Cindigo 0.9 - beta 2
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...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
what do you think?
something is better than nothingfused wrote: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...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
what do you think?

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
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.
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
Great new Features are coming... thanks for your work & time you invest fused!!!1!fused wrote:phong breaks are working now.
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
hmmm. i know that "winkelbeschränkung" works. about "Shading unterbrechen" im not sure... maybe... the docs dont say anything about that: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" ?
i think it should work.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().
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 outputPinko5 wrote:when we can try it???

FuseCoolColJ wrote:something is better than nothingfused wrote: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...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
what do you think?
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
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 (48.82 KiB) Viewed 3777 times
Who is online
Users browsing this forum: No registered users and 5 guests