[Bf-committers] First Beta of X3D exporter

Bart bart at neeneenee.de
Thu May 5 16:17:23 CEST 2005


Hi Cam,

thanks for your feedback! Don't be worry about your neg-feedback, i save 
it all the times for develop new and better concept for the next version :)

All the things you would improve is the old code frome the VRML2 
exporter. For this version (1.5) i targeted adding more standard 
features and optimize the code output (like transform with location and 
DEF/USE for meshes). And i targeted making a better VRML exporter and a 
X3D exporter using same codebase that can be bundeled with Blender 2.37 
release.

The next version will be a complete rewrite and in the first step 
keeping in mind optimization of the code, using new Blender Python 
syntax and improving the speed. After that i will adding new features 
like support for multitexure and nurbs etc.

X3D can be viewed under Windows using Contact VRML/X3D or Flux:
http://www.bitmanagement.de/download/
http://www.mediamachines.com/

usinf Linux or MacOSX try FreeWRL (hoping some day will porting it to 
Windows too):
http://freewrl.sourceforge.net/

Greetings from Berlin!
Bart.

Campbell Barton schrieb:

> Hi Bart, sorry to give only neg- feedback (BTW What can I use to view 
> the files?) But some python advice.
>
> Tabs are re-generated for each line; this is not effisient.
> There are 2 good options.
> Have a generated list of tabs thats the length of the maximum tab 
> length of a scene. then just index it.
> Or do the same, but check the length each time and append a new 
> tabstring (The previous tab item + '\t') if its not long enough.
>
> The latter is failsafe, where as with the first you need to be sure of 
> the number of indexts. Mabe throw in an extra 10 juts to be safe. :)
>
> Also, if the format is for display/rendering (Rather then editing) Id 
> go for GetRawFromObject() over .getData() as bones and subsurf wont be 
> exported.
>
> Also your teansforming each vertex by the matrix. Its much faster 
> (over 100 times) to do
> mesh.transfrom(martix) - Tho If you want to keep 2.36 compatibility 
> its not an option (having a try statement for this would be fine.)
>
> Rather then using round() to limit the floating point string, There 
> are string formatting options
> >> print '%.3f' % 0.12423432543 # Will round to 3 decimal places
> >> 0.124
> ...though I'd recomment keeping to 6 decimal places unless otherwise 
> spesified in the file spec.
>
>
> Then again, theres a lot more to an exporter then efficiency, so good 
> work and hope this can be a good defacto 3d format we can all use :)
>
>
> - Cam
>
> Bart wrote:
>
>>
>> The first beta of the x3d exporter is available:
>> http://www.neeneenee.de/blender/x3d/x3d_export150.py.txt
>>
>> It has the same features like the new VRML97 exporter version 
>> 2005/04/20: 
>> http://www.neeneenee.de/blender/x3d/vrml97_export150.py.txt).
>>
>> Known bugs this time:
>> - DEF/USE work not correct
>> - Grouping nodes like Billboard and Collision will be inserted as
>>     in VRML syntax
>>
>> Documentation:
>> http://www.neeneenee.de/blender/x3d/exporting_web3d.html
>>
>> Will finish it soon so it can be bundeled with Blender 2.37.
>>
>


More information about the Bf-committers mailing list