Indigo 0.7F exporter here! Features added/Comments welcome!

Announcements, requests and support regarding the Blender Indigo export script
Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Sun Feb 18, 2007 2:01 pm

I understand your situation Zuegs. If I can help by changing the exporter or by helping you with your gui let me know.

It looks like you are all set. Good luck on your progress! :)
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
kepler
Posts: 122
Joined: Wed Jan 17, 2007 3:18 am
Location: Italy

Post by kepler » Mon Feb 19, 2007 12:59 am

Nice work zuegs!!!

User avatar
F.ip2
Posts: 160
Joined: Thu Aug 10, 2006 11:05 am

Post by F.ip2 » Mon Feb 19, 2007 7:51 am

wow great!

i hope to see that GUI soon and working fine!

claas
--
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

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Mon Feb 19, 2007 2:05 pm

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...
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.

User avatar
joegiampaoli
Posts: 837
Joined: Thu Oct 05, 2006 7:12 am
Location: San Miguel de Allende-MEXICO
Contact:

Post by joegiampaoli » Mon Feb 19, 2007 2:07 pm

Thank you so much Wedge!!!! :D
Joe Giampaoli
Never tie a ship to a single anchor, nor life to a single hope
My Indigo Gallery

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Mon Feb 19, 2007 3:35 pm

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
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.

User avatar
F.ip2
Posts: 160
Joined: Thu Aug 10, 2006 11:05 am

a simple scene but crashes indigo

Post by F.ip2 » Mon Feb 19, 2007 4:38 pm

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>
--
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

zuegs
Posts: 380
Joined: Tue Jun 27, 2006 5:46 pm
Location: switzerland

Post by zuegs » Mon Feb 19, 2007 6:44 pm

Hi Wedge
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?
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.
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.

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Mon Feb 19, 2007 9:59 pm

<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.
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Tue Feb 20, 2007 1:54 am

Why can't you just "Autoapply" Scale + Rotation, before Exporting...?

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Tue Feb 20, 2007 11:50 am

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. :(
Content contained in my posts is for informational purposes only and is used at your own risk.

zuegs
Posts: 380
Joined: Tue Jun 27, 2006 5:46 pm
Location: switzerland

Post by zuegs » Tue Feb 20, 2007 8:47 pm

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.

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Sat Mar 03, 2007 1:28 am

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
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
afecelis
Posts: 749
Joined: Tue Aug 01, 2006 4:14 am
Location: Colombia
3D Software: Blender
Contact:

Post by afecelis » Sun Mar 04, 2007 1:55 am

Great news Wedge! I love optimizations at all levels!!! :D Let us know when you update the code (though I keep an eye very close to that "edited 57 times", ehehehhe ;) )

Regards,

Alvaro
AMD Ryzen 7 1800 @3.6ghz, 32GB ddr4 3200 mhz Ram, Nvidia RTX 3060 12GB, Win10, Blender/Sketchup/Modo/Cinema4d

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Sun Mar 04, 2007 8:18 pm

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!
Content contained in my posts is for informational purposes only and is used at your own risk.

Post Reply
223 posts

Who is online

Users browsing this forum: No registered users and 3 guests