[x3d-public] Tests for Blender->X3D exporter utilizing texture transformation and per-vertex colors
Brutzman, Donald (Don) (CIV)
brutzman at nps.edu
Sat Dec 28 12:56:40 PST 2024
Joe, please advise if this might be an updated version of
*
X3D Example Archives: Humanoid Animation, Legacy, Joe Skin Texcoord Displacer Kick
*
https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Legacy/JoeSkinTexcoordDisplacerKick.x3d
*
https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Legacy/JoeSkinTexcoordDisplacerKickIndex.html
Or perhaps a new potential contribution. Or neither... Whatever you think best. Thanks for your steady efforts.
all the best, Don
--
Don Brutzman Naval Postgraduate School, Code USW/Br brutzman at nps.edu
Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149
X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman
________________________________
From: x3d-public <x3d-public-bounces at web3d.org> on behalf of Joe D Williams via x3d-public <x3d-public at web3d.org>
Sent: Friday, December 27, 2024 7:20 PM
To: Extensible 3D (X3D) Graphics public discussion <x3d-public at web3d.org>; Vincent Marchetti <vmarchetti at kshell.com>; X3D Graphics public mailing list <x3d-public at web3d.org>
Cc: Joe D Williams <joedwil at earthlink.net>
Subject: Re: [x3d-public] Tests for Blender->X3D exporter utilizing texture transformation and per-vertex colors
<"desired" X3D file ...
Sounds real nice work. Here is a simple texture transform that works in the attached example
...
<Shape DEF='Joe_Shape' containerField='skin'>
<Appearance DEF='Joe_skin_Appearance'>
<Material DEF='Joe_skin_Material' diffuseColor='0.3 0.3 0.6' emissiveColor='0.3 0.3 0.6'/>
<ImageTexture crossOrigin='anonymous' DEF='JoeSkinImageTexture' url='"bodytexture28.png"'/>
<TextureTransform DEF='kicktextrans' center='0 0' rotation='0' scale='1 1' translation='0 0'/>
</Appearance>
<IndexedFaceSet DEF='Joe_skin_IndexedFaceSet' coordIndex='0 9 5 -1 ... 382 385 386 -1' creaseAngle='3.14'>
<Coordinate DEF='Joe_SkinCoord' point='0.0 1.77 0.0 ... -0.154 0.010 0.168'/>
<TextureCoordinate point='0 0 0.5 ... 0 0 0.5'/>
</IndexedFaceSet>
</Shape>
<Coordinate USE='Joe_SkinCoord' containerField='skinCoord'/>
...
<Group DEF='skintexturetransform_animation'>
<ScalarInterpolator DEF='skinTexTransTest' key='0 0.2 0.4 0.5 0.6 0.7 0.8 1' keyValue='0 0 0 0 0 1 2 0'/>
<ROUTE fromField='fraction_changed' fromNode='KickTimer' toField='set_fraction' toNode='skinTexTransTest'/>
<ROUTE fromField='value_changed' fromNode='skinTexTransTest' toField='rotation' toNode='kicktextrans'/>
</Group>
...
,
-----Original Message-----
From: Extensible 3D (X3D) Graphics public discussion <x3d-public at web3d.org>
Sent: Dec 27, 2024 5:23 PM
To: Vincent Marchetti <vmarchetti at kshell.com>, X3D Graphics public mailing list <x3d-public at web3d.org>
Cc: Michalis Kamburelis <michalis.kambi at gmail.com>
Subject: [x3d-public] Tests for Blender->X3D exporter utilizing texture transformation and per-vertex colors
Vincent and all,
( Sorry it took me a while -- Christmas times are busy in offline
activities :) )
1. I prepared the promised tests of texture transformation in Blender,
to help implementing their handling in the Blender -> X3D exporter.
They are inside the "blender_tests/texture_transform/" of my
repository https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmichaliskambi%2Fx3d-tests%2F&data=05%7C02%7Cbrutzman%40nps.edu%7Cceba4b4d4c234122992d08dd26eec101%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638709529230301171%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=ZO4iUotBKD2V31mqOuq6fm4inKTDis5C2%2FkxA2YSZtI%3D&reserved=0<https://github.com/michaliskambi/x3d-tests/> . Browse them
through here https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmichaliskambi%2Fx3d-tests%2Ftree%2Fmaster%2Fblender_tests%2Ftexture_transform&data=05%7C02%7Cbrutzman%40nps.edu%7Cceba4b4d4c234122992d08dd26eec101%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638709529230341250%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=MgDedQ80x57UBkrrNlnWe2AjyvTD3roufgzHyJw0pF0%3D&reserved=0<https://github.com/michaliskambi/x3d-tests/tree/master/blender_tests/texture_transform>
. To just download them, it's probably easiest to "git clone" the
whole x3d-tests repo.
The README inside (
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmichaliskambi%2Fx3d-tests%2Fblob%2Fmaster%2Fblender_tests%2Ftexture_transform%2FREADME.md&data=05%7C02%7Cbrutzman%40nps.edu%7Cceba4b4d4c234122992d08dd26eec101%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638709529230367342%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=Y4dgxu%2FKdWNDwq%2BPbA4NjYCvMQTVQKY9mL2piilbQww%3D&reserved=0<https://github.com/michaliskambi/x3d-tests/blob/master/blender_tests/texture_transform/README.md>
) already describes everything. A short summary:
- I tested transforming base, normal, metallic/roughness textures
(same or differently).
- I added a "real-life example" of using texture transformation (from
Castle Game Engine "examples/fps_game" demo,
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcastle-engine%2Fcastle-engine%2Ftree%2Fmaster%2Fexamples%2Ffps_game&data=05%7C02%7Cbrutzman%40nps.edu%7Cceba4b4d4c234122992d08dd26eec101%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638709529230389095%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=GDfn864P1Fy7yrtQcTapwre0BHqd5LUklaP1OFG3WTM%3D&reserved=0<https://github.com/castle-engine/castle-engine/tree/master/examples/fps_game>
).
- I added glTF exporter outputs, screenshots from Blender, Castle
Model Viewer -> hopefully this all makes it clear what is the desired
output.
- TODO: I planned to do, but did not do this: I wanted to create a
"desired" X3D files, crafted by hand, to show how a proper X3D output
should look like. Not done yet, simply because of lack of time. I
don't want to keep you waiting, so I send you the tests as they are
now. Ping me if you think you need these "desired" X3D files :)
2. Moreover, I added tests for per-vertex colors.
This shows per-vertex colors generated using Blender's "Ambient
Occlusion" (make areas e.g. behind ears nicely darker even without
using real-time shadows) and how they can be multiplied with
material(s) in glTF. This is a feature we talked about -- you
mentioned you wanted to implement it by "premultiplying" the material
* per-vertex color. Hopefully my tests will help make sure it's all
correct :)
They are in:
https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmichaliskambi%2Fx3d-tests%2Ftree%2Fmaster%2Fblender_tests%2Fper_vertex_colors&data=05%7C02%7Cbrutzman%40nps.edu%7Cceba4b4d4c234122992d08dd26eec101%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638709529230409392%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=1kXwxa%2BXccEQGxG0YPawjDh9iLDYlx7I%2Bzx7L5N5WoI%3D&reserved=0<https://github.com/michaliskambi/x3d-tests/tree/master/blender_tests/per_vertex_colors>
Again, I added glTF exporter outputs, screenshots from Blender, Castle
Model Viewer -> showing what should happen.
I hope these are useful! Let me know if anything in this is unclear.
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/20241228/7b0eb11a/attachment-0001.html>
More information about the x3d-public
mailing list