Indigo 0.7F exporter here! Features added/Comments welcome!
This update was tested to be working with Blender 2.43 and Indigo 07t5.
Bump map <b> tags can now be adjusted by the nor slider. (nor / 10 is result, so .1 will export as .01)
Update: I'm looking at the data formatting...
For Zuegs: I modified the scale variable to be:
scale = abs((obj.SizeX + obj.SizeY + obj.SizeZ) / 3)
From my testing this works the same as your scale variable did and is more readable (to me at least). What do you think?
I have been working with scale and the rotation matrix but have found no fixes. From what I can see when you apply the ctrl+a fix in Blender this resets the scale to 1 for X Y Z axis. I'm not sure how this could be done in an exporter...
Bump map <b> tags can now be adjusted by the nor slider. (nor / 10 is result, so .1 will export as .01)
Update: I'm looking at the data formatting...
For Zuegs: I modified the scale variable to be:
scale = abs((obj.SizeX + obj.SizeY + obj.SizeZ) / 3)
From my testing this works the same as your scale variable did and is more readable (to me at least). What do you think?
I have been working with scale and the rotation matrix but have found no fixes. From what I can see when you apply the ctrl+a fix in Blender this resets the scale to 1 for X Y Z axis. I'm not sure how this could be done in an exporter...
Last edited by Wedge on Mon Feb 19, 2007 9:47 pm, edited 6 times in total.
Content contained in my posts is for informational purposes only and is used at your own risk.
- joegiampaoli
- Posts: 837
- Joined: Thu Oct 05, 2006 7:12 am
- Location: San Miguel de Allende-MEXICO
- Contact:
I may have jumped into something big this time. I am still looking at the data formats. Or rather format codes, I guess their called.
Here's what I'm looking at:
http://docs.python.org/lib/typesseq-strings.html
Here's what I'm looking at:
http://docs.python.org/lib/typesseq-strings.html
Last edited by Wedge on Mon Feb 19, 2007 9:47 pm, edited 1 time in total.
Content contained in my posts is for informational purposes only and is used at your own risk.
a simple scene but crashes indigo
i needed to add the specular value because it was not exported and than indigo crashes:
</material>
<material>
<name>monkey</name>
<phong>
<diffuse>0.121545 0.00762284 0.0193699</diffuse>
<specular>0.8 0.8 0.8</specular>
<ior>1</ior>
<exponent>500</exponent>
</phong>
</material>
<camera>
<pos>7.481132 -6.507640 5.343665</pos>
<up>-0.317370 0.312469 0.895343</up>
<forwards>-0.654862 0.610666 -0.445245</forwards>
<aperture_radius>0.002</aperture_radius>
<focus_distance>11.3</focus_distance>
<aspect_ratio>1.33333</aspect_ratio>
<sensor_width>0.035</sensor_width>
<lens_sensor_dist>0.038281</lens_sensor_dist>
<white_balance>E</white_balance>
<autofocus/>
<bloom>
<weight>0.1</weight>
<radius>0.05</radius>
</bloom>
</camera>
<!-- Suzanne -->
<mesh>
<name>Suzanne</name>
<normal_smoothing>true</normal_smoothing>
<embedded>
<expose_uv_set>
<index>0</index>
<name>uv</name>
</expose_uv_set>
<vertex pos="0.503906 0.242676 0.717773" normal="0.743400 -0.000824 0.668813"
....
<triangle_set>
<material_name>monkey</material_name>
<tri>0 1 2</tri>
<tri>2 3 0</tri>
...
<tri>1665 1595 1946</tri>
<tri>1946 2011 1665</tri>
</triangle_set>
</embedded>
</mesh>
<model>
<pos>2.693134 -1.137075 0.569192</pos>
<scale>1</scale>
<rotation>
<matrix>
1 9.15015e-017 1.79617e-016 9.15015e-017 0.587914 -0.808923 -1.79617e-016 0.808923 0.587914
</matrix>
</rotation>
<mesh_name>Suzanne</mesh_name>
</model>
<!-- Plane -->
<mesh>
<name>Plane</name>
<normal_smoothing>false</normal_smoothing>
<embedded>
<expose_uv_set>
<index>0</index>
<name>uv</name>
</expose_uv_set>
<vertex pos="....
<triangle_set>
<material_name>floor</material_name>
<tri>0 1 2</tri>
<tri>2 3 0</tri>
</triangle_set>
</embedded>
</mesh>
<model>
<pos>0.000000 0.000000 0.000000</pos>
<scale>7.39831</scale>
<rotation>
<matrix>
1 0 0 0 1 0 0 0 1
</matrix>
</rotation>
<mesh_name>Plane</mesh_name>
</model>
</scene>
</material>
<material>
<name>monkey</name>
<phong>
<diffuse>0.121545 0.00762284 0.0193699</diffuse>
<specular>0.8 0.8 0.8</specular>
<ior>1</ior>
<exponent>500</exponent>
</phong>
</material>
<camera>
<pos>7.481132 -6.507640 5.343665</pos>
<up>-0.317370 0.312469 0.895343</up>
<forwards>-0.654862 0.610666 -0.445245</forwards>
<aperture_radius>0.002</aperture_radius>
<focus_distance>11.3</focus_distance>
<aspect_ratio>1.33333</aspect_ratio>
<sensor_width>0.035</sensor_width>
<lens_sensor_dist>0.038281</lens_sensor_dist>
<white_balance>E</white_balance>
<autofocus/>
<bloom>
<weight>0.1</weight>
<radius>0.05</radius>
</bloom>
</camera>
<!-- Suzanne -->
<mesh>
<name>Suzanne</name>
<normal_smoothing>true</normal_smoothing>
<embedded>
<expose_uv_set>
<index>0</index>
<name>uv</name>
</expose_uv_set>
<vertex pos="0.503906 0.242676 0.717773" normal="0.743400 -0.000824 0.668813"
....
<triangle_set>
<material_name>monkey</material_name>
<tri>0 1 2</tri>
<tri>2 3 0</tri>
...
<tri>1665 1595 1946</tri>
<tri>1946 2011 1665</tri>
</triangle_set>
</embedded>
</mesh>
<model>
<pos>2.693134 -1.137075 0.569192</pos>
<scale>1</scale>
<rotation>
<matrix>
1 9.15015e-017 1.79617e-016 9.15015e-017 0.587914 -0.808923 -1.79617e-016 0.808923 0.587914
</matrix>
</rotation>
<mesh_name>Suzanne</mesh_name>
</model>
<!-- Plane -->
<mesh>
<name>Plane</name>
<normal_smoothing>false</normal_smoothing>
<embedded>
<expose_uv_set>
<index>0</index>
<name>uv</name>
</expose_uv_set>
<vertex pos="....
<triangle_set>
<material_name>floor</material_name>
<tri>0 1 2</tri>
<tri>2 3 0</tri>
</triangle_set>
</embedded>
</mesh>
<model>
<pos>0.000000 0.000000 0.000000</pos>
<scale>7.39831</scale>
<rotation>
<matrix>
1 0 0 0 1 0 0 0 1
</matrix>
</rotation>
<mesh_name>Plane</mesh_name>
</model>
</scene>
--
C l a a s E i c k e K u h n e n
Artist : Designer : Educator
Assistant Professor Industrial Design
Kendall College of Art and Design
of Ferris State University
C l a a s E i c k e K u h n e n
Artist : Designer : Educator
Assistant Professor Industrial Design
Kendall College of Art and Design
of Ferris State University
Hi Wedge
Yeah, the problem is, when you Ctrl-A a mesh that is referenced by multiple objects with different scales you have to export the same mesh multiple times with their specific scales.
yup, as long scale is orthogonal x=y=z the result is the same, when not it differs a bit from other formula but both gives not the right final result.For Zuegs: I modified the scale variable to be:
scale = abs((obj.SizeX + obj.SizeY + obj.SizeZ) / 3)
From my testing this works the same as your scale variable did and is more readable (to me at least). What do you think?
Yeah, the problem is, when you Ctrl-A a mesh that is referenced by multiple objects with different scales you have to export the same mesh multiple times with their specific scales.
<specular> tags are not used in indigo 07. You need to use the same exporter version as indigo renderer version to avoid problems.
I updated another exporter to the front which should set all floats to a fixed precision. This means the useless zeros will be there but it makes sure that the correct precision is in place. If you look closely you will notice I cut the precision to four decimal places for most of the geometry. The rotation matrix is still at six decimal places because it will throw orthogonal errors if you make it any less. I noticed Blender uses four decimal places for the scale and position values.
For Zuegs: Thanks for the confirmation. I understand the rotation matrix error now, thanks for the info. I also reworked the position code.
%(obj.LocX, obj.LocY, obj.LocZ) This also seems to work the same.
There is also a RotX RotY RotZ for getting rotation data, but I do not understand if this will help in the orthogonal problem.
I updated another exporter to the front which should set all floats to a fixed precision. This means the useless zeros will be there but it makes sure that the correct precision is in place. If you look closely you will notice I cut the precision to four decimal places for most of the geometry. The rotation matrix is still at six decimal places because it will throw orthogonal errors if you make it any less. I noticed Blender uses four decimal places for the scale and position values.
For Zuegs: Thanks for the confirmation. I understand the rotation matrix error now, thanks for the info. I also reworked the position code.
%(obj.LocX, obj.LocY, obj.LocZ) This also seems to work the same.
There is also a RotX RotY RotZ for getting rotation data, but I do not understand if this will help in the orthogonal problem.
Content contained in my posts is for informational purposes only and is used at your own risk.
The best way I can describe the orhtogonal problem right now is: (for anyone that does not understand)
When you use ctrl+a it resets the objects scale and rotation back to default. As if it was not scaled or rotated. But in order for the object to not go back to default position, it actually sets the geometry data up so that it is rotated and scaled like before you pushed ctrl+a.
Problem is, when you instance something, you need the scale and rotation data to be not defaulted, since these objects have no vertex pos or geometry data. (they are referring to the object's geometry they are an instance of)
For Kram:
I suppose this could be a toggle feature with a notice making it clear that you cannot have instanced objects in the scene. I can have a look in the Blender Python documentation to see what I can find about doing this to the entire scene. But without instances, this feature would then be half as useful.
When you use ctrl+a it resets the objects scale and rotation back to default. As if it was not scaled or rotated. But in order for the object to not go back to default position, it actually sets the geometry data up so that it is rotated and scaled like before you pushed ctrl+a.
Problem is, when you instance something, you need the scale and rotation data to be not defaulted, since these objects have no vertex pos or geometry data. (they are referring to the object's geometry they are an instance of)
For Kram:
I suppose this could be a toggle feature with a notice making it clear that you cannot have instanced objects in the scene. I can have a look in the Blender Python documentation to see what I can find about doing this to the entire scene. But without instances, this feature would then be half as useful.
Content contained in my posts is for informational purposes only and is used at your own risk.
Hi Wedgo
I think i have found a way to export non-ortho-objects. As long a object has a uniform scaling it get exported as before and allows instancing. When ever an object has a non-uniform-scaling it forces a export of a own special-scaled mesh (so no instancing possible for those). I updated my Blendigo to beta 2 including this feature.
I think i have found a way to export non-ortho-objects. As long a object has a uniform scaling it get exported as before and allows instancing. When ever an object has a non-uniform-scaling it forces a export of a own special-scaled mesh (so no instancing possible for those). I updated my Blendigo to beta 2 including this feature.
Hello,
Just wanted to say I have been doing some work on the geometry and I am trying to make it faster.
After awhile I have just ran some tests to find that:
Test scene: 537000 Ve 537000 Fa
biggest mesh: 159000 Ve 159000 Fa (uvsphere, high detail)
blend file: 33 MB
Results:
Old exporter (one currently posted): 143.7 seconds
Modified exporter (one I am testing): 106.1 seconds
Both result in an xml file of approx 195000 KB in size.
I have not done enough testing yet to make sure it is ok to post. Soon I will know.
Opps, forgot to say this test was run on a AMD barton 2.1ghz with 2gb of ram
Just wanted to say I have been doing some work on the geometry and I am trying to make it faster.
After awhile I have just ran some tests to find that:
Test scene: 537000 Ve 537000 Fa
biggest mesh: 159000 Ve 159000 Fa (uvsphere, high detail)
blend file: 33 MB
Results:
Old exporter (one currently posted): 143.7 seconds
Modified exporter (one I am testing): 106.1 seconds
Both result in an xml file of approx 195000 KB in size.
I have not done enough testing yet to make sure it is ok to post. Soon I will know.
Opps, forgot to say this test was run on a AMD barton 2.1ghz with 2gb of ram
Content contained in my posts is for informational purposes only and is used at your own risk.
Here is the latest news:
NMesh is no longer used.
Only Mesh items from the Blender menu are supported. (no curves or anything like that)
Camera dof and lens now set in Blender under editing menu for camera.
Optimised geometry...
If you want, test this version against the last one if you have a big scene, and let me know the time difference.
Small scenes shouldn't see much gain.
Render size is set from Blender only now, and the quick buttons to change size, 25 50 75 100% are right near Blender's render button. These quick buttons will alter the size.
I decided to try and move everything to inside Blender that could be moved. I think it is better this way...
Oh and there is code now to use camera DOF which came from Blender 2.43 so that will be required to use this script.
Enjoy!
NMesh is no longer used.
Only Mesh items from the Blender menu are supported. (no curves or anything like that)
Camera dof and lens now set in Blender under editing menu for camera.
Optimised geometry...
If you want, test this version against the last one if you have a big scene, and let me know the time difference.
Small scenes shouldn't see much gain.
Render size is set from Blender only now, and the quick buttons to change size, 25 50 75 100% are right near Blender's render button. These quick buttons will alter the size.
I decided to try and move everything to inside Blender that could be moved. I think it is better this way...
Oh and there is code now to use camera DOF which came from Blender 2.43 so that will be required to use this script.
Enjoy!
Content contained in my posts is for informational purposes only and is used at your own risk.
Who is online
Users browsing this forum: No registered users and 3 guests