[x3d-public] Blender X3D exporter: what to do, how to do it

John Carlson yottzumm at gmail.com
Thu Jun 24 14:14:56 PDT 2021


More info, feel free to append to Blender ticket as you see fit. I 
clicked on "Image" between the 2 main panels, and set the image to 
"tuna.png"  it looked like the image was applied (yay), but tuna.png did 
not appear in the .x3d, and the output was still "Image None" at line 
654. And output x3d did not show the texture in FreeWRL or view3dscene.

An investigation of the Blender file:

$ strings x3d_texture_2.83.blend|grep png
Untitled.png
//tuna.png
Desktop/Untitled.png

So there's still some places to cover.  I do not yet know how to make 
image non-None. I did some settings in base color to tuna (not 
tuna.png).  It will take some time to figure out all the 
windows/panels.  There are a lot of choices in Blender.   It would 
probably be worth it to take some classes!

Note: This is the only place in the export code that <Appearance> 
appears, so this pretty much has to be the code, and we just need to 
figure out how to set image variable properly in the preceding code.

If a python programmer could translate this line (614? of 
/usr/share/blender/scripts/addons/io_scene_x3d/export_x3d.py ) to 
English, it would help!

for (material_index, image), polygons_group in polygons_groups.items():

I think this is where the image variable comes from.

John

On 6/24/21 3:08 PM, John Carlson wrote:
> I added these lines to the Blender X3D exporter, at line 654
>
>                    print("Image", image)
>                     print("Use H3D", use_h3d)
>
>
> Here is the output:
>
> Image None
> Use H3D False
>
> So...the image is not set?  Let's do some snooping:
>
> coderextreme at coderextreme-Kubuntu20:~/Downloads$ strings 
> x3d_texture_2.82.blend |grep png
> Untitled.png
> //Untitled.png
> Desktop/Untitled.png
> coderextreme at coderextreme-Kubuntu20:~/Downloads$ strings 
> x3d_texture_2.79.blend |grep png
> Untitled.png
> //Untitled.png
> Desktop/Untitled.png
>
> I don't have these pngs.
>
> I will look and see how to set the png for the texture, meanwhile, I 
> don't think that the png exists, therefore, image is None, and the 
> ImageTexture and TextureTransform don't print!
>
> I'll get back to you!
>
> John
>
> On 6/24/21 1:34 PM, John Carlson wrote:
>> Note:
>>
>> https://developer.blender.org/T66534
>>
>> Has some sample files to start with.
>>
>> On 6/22/21 7:48 AM, Michalis Kamburelis wrote:
>>
>>> I wrote a document outlining my Blender->X3D exporter wishlist, and
>>> how to submit patches to Blender:
>>>
>>> https://docs.google.com/document/d/1ad5XsU43gQGxqC7ehSBr21mdX2dQjKZCSXUQtvRwTHw/edit?usp=sharing 
>>>
>>>
>>> Please feel free to distribute it to whoever is interested. Comments 
>>> welcome :)
>>>
>>> Regards,
>>> Michalis
>>>
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210624/3773bd09/attachment.html>


More information about the x3d-public mailing list