h

Discuss stuff not about Indigo.
User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » 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 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 142 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.
Last edited by yonosoy on Tue Jun 30, 2020 8:36 am, edited 2 times in total.
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

wob
Posts: 147
Joined: Tue Jan 07, 2020 6:15 pm

Re: h

Post by wob » Tue Jun 23, 2020 3:30 am

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

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » 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>
			</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. :)
Last edited by yonosoy on Thu Jun 25, 2020 9:45 am, edited 1 time in total.
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

wob
Posts: 147
Joined: Tue Jan 07, 2020 6:15 pm

Re: h

Post by wob » Tue Jun 23, 2020 7:22 am

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?

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » 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.
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
Last edited by yonosoy on Tue Jun 30, 2020 8:36 am, edited 1 time in total.
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

wob
Posts: 147
Joined: Tue Jan 07, 2020 6:15 pm

Re: h

Post by wob » Fri Jun 26, 2020 8:21 am

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

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » Fri Jun 26, 2020 8:52 pm

Thank you!

.
Scatter_01.4_00000.jpg
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

User avatar
Originalplan®
Posts: 757
Joined: Sat Sep 26, 2015 8:58 pm
3D Software: Cinema 4D
Contact:

Re: h

Post by Originalplan® » Mon Jun 29, 2020 2:04 pm

Superb work Yonosoy!

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » Tue Jun 30, 2020 7:35 am

THANK YOU!
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

User avatar
Oscar J
1st Place Winner
Posts: 2204
Joined: Sat Mar 31, 2012 3:47 am
Location: Gothenburg, Sweden
3D Software: Blender

Re: h

Post by Oscar J » Tue Jun 30, 2020 8:52 am

Very cool!

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » Thu Jul 02, 2020 2:37 am

Thank you very much Oscar.
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » Thu Jul 02, 2020 7:25 am

.
Last edited by yonosoy on Wed Nov 03, 2021 11:23 pm, edited 1 time in total.
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » Thu Jul 02, 2020 8:33 pm

La herida (The wound). 2016.
La_herida_1.jpg
La_herida_2.jpg
La_herida_3.jpg
La_herida_4.jpg
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » Fri Jul 03, 2020 7:09 am

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
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

User avatar
yonosoy
Posts: 3432
Joined: Sat Dec 01, 2012 9:45 pm
Location: Heaven

Re: h

Post by yonosoy » Tue Jul 14, 2020 9:05 pm

Technical stuff of v2...
Trece_lentes_al_sol.jpg
Checkboard.jpg
.
.
v2.08...
Captura_de_pantalla.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).
Last edited by yonosoy on Wed Nov 03, 2021 11:24 pm, edited 1 time in total.
"... nor 0.2 galaxys, nor 0.8 little chikens ..."

Post Reply
261 posts

Who is online

Users browsing this forum: No registered users and 26 guests