Page 9 of 10

Re: h

Posted: Tue Jun 23, 2020 1:55 am
by yonosoy
8.25 millions of instances.
Works well, thank you Ono!
quickrender_4.jpg
Hello wob.
Here is an old example pigs by Ono that contains the scatter function.
Actually there is no possibbility of use inside Cinema. ATM only Skindigo has implemented the scatter function.
You must setup the scatters in XML. Noticed that the meshes to be scattered requires the "mesh UID" and the target object requires the "object UID".
scatter_material_test.pigs
(983.88 KiB) Downloaded 12 times
If Cindigo must write 8.25 millions of instances in the igs... you need hours of exportation. Indigo´s scatter put the instances directly in scene...
Hope that it will be implemented inside Cindigo someday.

Re: h

Posted: Tue Jun 23, 2020 3:30 am
by wob
yonosoy wrote:
Tue Jun 23, 2020 1:55 am
8.25 millions of instances.
Works well, thank you Ono!
quickrender_4.jpg

Hello Wob.
Here is an old example pigs that contains the satter function.
Actually there is no possibbility of use inside Cinema. ATM only Skindigo has implemented the scatter function.
You must setup the scatters in XML. Noticed that the meshes to be scattered requires the "mesh UID" and the target object requires the "object UID".
scatter_material_test.pigs
If Cindigo must write 8.25 millions of instances in the igs... you need hours of exportation. Indigo´s scatter put the instances directly in scene...
Hope that it will be implemented inside Cindigo someday.
"You must setup the scatters in XML"

is this available for cinema 4d? can i use scatter with that xmls with cinema?


it's really great function, with full realisation in standalone app, why is it not added to cindigo gui yet? i tested your scene, it works fine

Re: h

Posted: Tue Jun 23, 2020 4:29 am
by yonosoy
Open the exported quickrender.igs in notepad. This is, XML (the text language of Indigo and many other programs).
So, the procedure:
1- Export the scene (with the objects to be scattered and the target object, as is).
2- Open the igs in a text editor.
3- Add this code at the end:

Code: Select all

	<scatter>
		<uid>800000</uid>
		<name>the scatter</name>
		<shader>
				<shader><![CDATA[  
                				   
def evalScale(int index) real :
  1.0
    
def evalCreate(int index, vec3 p) bool :
  true
						]]></shader>
		</shader>
		<proto_object_groups>
			<proto_object_group>
				<geometry_uid>8</geometry_uid>
				<materials>
					<material_uid>7</material_uid>
				</materials>
				<weight>1</weight>
			</proto_object_group>
		</proto_object_groups>
		<density>2</density>
		<seed>1</seed>
		<view_culling>true</view_culling>
		<orient_normal>false</orient_normal>
		<scale_std_dev>0.35</scale_std_dev>
		<height_std_dev>0.2</height_std_dev>
		<evenness>0.02</evenness>
		<z_offset>0</z_offset>
		<target_object_uid>25</target_object_uid>
	</scatter>
4- Change the geometry_uid and the material_uid to fit your object to be scattered (you can repeat a chain of code to scatter multiple objects).
geometry_uid > uid of the mesh in the file.
material_uid > uid of the material of the object.
5- Change the target_object_uid, use the uid of the model2 in the file.
6- setup parameters.

If you want to scatter more than one object looks like this:

Code: Select all

		<proto_object_groups>
			<proto_object_group>
				<geometry_uid>8</geometry_uid>
				<materials>
					<material_uid>7</material_uid>
				</materials>
				<weight>1</weight>
			</proto_object_group>
			<proto_object_group>
				<geometry_uid>12</geometry_uid>
				<materials>
					<material_uid>11</material_uid>
				</materials>
				<weight>1</weight>
			</proto_object_group>
		</proto_object_groups>
If your object has more than one material:

Code: Select all

			<proto_object_group>
				<geometry_uid>8</geometry_uid>
				<materials>
					<material_uid>7</material_uid>
					<material_uid>16</material_uid>
				</materials>
				<weight>1</weight>
			</proto_object_group>
Hope this help. :)

Re: h

Posted: Tue Jun 23, 2020 7:22 am
by wob
yonosoy wrote:
Tue Jun 23, 2020 4:29 am
Open the exported quickrender.igs in notepad. This is, XML (the text language of Indigo and many other programs).
So, the procedure:
1- Export the scene (with the objects to be scattered and the target object, as is).
2- Open the igs in a text editor.
3- Add this code at the end:

Code: Select all

	<scatter>
		<uid>800000</uid>
		<name>the scatter</name>
		<shader>
				<shader><![CDATA[  
                				   
def evalScale(int index) real :
  1.0
    
def evalCreate(int index, vec3 p) bool :
  true
						]]></shader>
		</shader>
		<proto_object_groups>
			<proto_object_group>
				<geometry_uid>8</geometry_uid>
				<materials>
					<material_uid>7</material_uid>
				</materials>
				<weight>1</weight>
			</proto_object_group>
		</proto_object_groups>
		<density>2</density>
		<seed>1</seed>
		<view_culling>true</view_culling>
		<orient_normal>false</orient_normal>
		<scale_std_dev>0.35</scale_std_dev>
		<height_std_dev>0.2</height_std_dev>
		<evenness>0.02</evenness>
		<z_offset>0</z_offset>
		<target_object_uid>25</target_object_uid>
	</scatter>
4- Change the geometry_uid and the material_uid to fit your object to be scattered (you can repeat a chain of code to scatter multiple objects).
geometry_uid > uid of the mesh in the file.
material_uid > uid of the material of the object.
5- Change the target_object_uid, use the uid of the model2 in the file.
6- setup parameters.

If you want to scatter more than one object looks like this:

Code: Select all

		<proto_object_groups>
			<proto_object_group>
				<geometry_uid>8</geometry_uid>
				<materials>
					<material_uid>7</material_uid>
				</materials>
				<weight>1</weight>
				<geometry_uid>12</geometry_uid>
				<materials>
					<material_uid>11</material_uid>
				</materials>
				<weight>1</weight>
			</proto_object_group>
		</proto_object_groups>
If your object has more than one material:

Code: Select all

			<proto_object_group>
				<geometry_uid>8</geometry_uid>
				<materials>
					<material_uid>7</material_uid>
					<material_uid>16</material_uid>
				</materials>
				<weight>1</weight>
			</proto_object_group>
Hope this help. :)
thank you, i'll try, but it will not work with animation (multiple igs files) as i see, just if i'll make automation for including this text into every igs file in queue... perpahs, can i include this code into cinema 4d scene as indigo isl shader code or as any type of python script?

Re: h

Posted: Thu Jun 25, 2020 6:41 am
by yonosoy
.
Scatter_01_00000.jpg
.
The right procedure is to use several protogroups, one per object to be scattered (instructions corrected).
20 million. Scale of grass X2.
Scatter_01.1_00000.jpg
.
Corrections in 16 bit, without LUTs.
Scatter_01.2.jpg
.
wob, wait for the update in the exporters for animations, it has been announced.
.
Ono, a bug with subdivision and scatters; more than 3 subdivisions produces this...
Captura de pantalla (2).jpg

Re: h

Posted: Fri Jun 26, 2020 8:21 am
by wob
yonosoy wrote:
Thu Jun 25, 2020 6:41 am
.
Scatter_01_00000.jpg
.
The right procedure is to use several protogroups, one per object to be scattered (instructions corrected).
20 million. Scale of grass X2.
wow. really impressive

Re: h

Posted: Fri Jun 26, 2020 8:52 pm
by yonosoy
Thank you!

.
Scatter_01.4_00000.jpg

Re: h

Posted: Mon Jun 29, 2020 2:04 pm
by Originalplan®
Superb work Yonosoy!

Re: h

Posted: Tue Jun 30, 2020 7:35 am
by yonosoy
THANK YOU!

Re: h

Posted: Tue Jun 30, 2020 8:52 am
by Oscar J
Very cool!

Re: h

Posted: Thu Jul 02, 2020 2:37 am
by yonosoy
Thank you very much Oscar.

Re: h

Posted: Thu Jul 02, 2020 7:25 am
by yonosoy
Second attempt (not finished).

The metaphysical Body of the Father.
Cuerpo _metafisico_del_Padre.jpg

Re: h

Posted: Thu Jul 02, 2020 8:33 pm
by yonosoy
La herida (The wound). 2016.
La_herida_1.jpg
La_herida_2.jpg
La_herida_3.jpg
La_herida_4.jpg

Re: h

Posted: Fri Jul 03, 2020 7:09 am
by yonosoy
I don't want to finish it, I'll come back to it with the thirteen lenses in a days. Refining the job...

Four lenses at the Sun.
Cuatro_lentes_al_sol.jpg

Re: h

Posted: Tue Jul 14, 2020 9:05 pm
by yonosoy
Technical stuff of v2...
Trece_lentes_al_sol.jpg
Checkboard.jpg
.
.
v2.08...
Captura_de_pantalla.jpg
Capilla_v2.jpg
Two hours. Accepts in blender a coating thickness of 1.375e-06 (only the first and the last lenses coated in this moments). Near to a perfect focus plane. Still working... :)
It is strictly functional (see blender capture).