-
Notifications
You must be signed in to change notification settings - Fork 74
Design API for custom materials in a-frame component "io3d-data3d" #15
Comments
This has relevance for Home Story as we would like to change the materials in a backed model |
Following problems need to be solved to make material editability on baked models a good experience for users:
of course we can already offer editability before solving this issue. but for user experience I recommend that this should be adressed. @Kasparlogic @frederic-schwarz @AVGP we should probably discuss this soon in a meeting |
@Aadjou yes please, taking it to slack |
updated title to be more specific (considering that not all issues are related to a-frame components) |
btw. any updates on this one? |
I'd also love to have this, as the current workflow really slows down prototyping, having to wait for the bake process to complete whenever I make even the slightest change to the material configuration. Please make this happen 👍 |
@Aadjou thx for pointing this out. another solution proposals:
regarding the material mixup after baking: i suggest to introduce a "Do not optimize model" checkbox in lighting tab. this would result in optimizing function not being used, keeping the original material structure in place. doing this on a material level in the editor would be quite exhausting because we do not have a multiselect feature. |
API design proposal for embedded material definitions: <style type="text/data3d">
#house .wall27, .wall12 {
diffuse-color: #0ee;
diffuse-texture: url('https://...');
specular-texture: storageId('/whatever...');
}
</style>
<scene>
<a-entity id="house" io3d-data3d="url:http://..."></a-entity>
</scene> @AVGP if i am not mistaking, style elements with custom https://jsfiddle.net/3dio/spv10272/ chrome, firefox and safari do not complain at all :) can anybody try IE pls? |
using CSS syntax would be cool:
|
@urish what do you think? |
I'm not sure CSS would be the best way to go, see the following discussion: |
@urish thx for your feedback. to unblock you i wrote some example code using undocumented data3dView methods: https://codepen.io/tomas-polach/pen/rGVjbg?editors=1010 pls make sure to use the specific io3d.js version from the example (not the "1.x.x" dist URL) because the data3dView methods will most likely change in the future. does that help you or did i miss something? |
Looks great, thank you! |
happy to help! would love to know what you are working on (...if it's not confidential) |
Sure, it is a VR Workshop for AngularConnect |
that's cool!! this might be interesting for you as well: https://github.com/archilogic-com/aframe-gblock allows to load google blocks models directly as components (material changes there work differently because its indexed buffergeometries with vertex colors) but you can get a lot of 3d content and build a cool scene pretty quickly |
Awesome, thanks! I love that :) |
proposal using support for custom materials could look like this: <a-assets>
<a-asset-item id="my-mat" io3d-material="colorDiffuse: #fff; colorSpecular: #09f; mapDiffuse: texture1.jps"></a-asset-item>
</a-assets>
<a-entity io3d-wall="h:2.4, l:3, material_front: #my-mat" position="2 0 -1" rotation="0 12 0"></a-entity> |
this is also relevant for the architecture toolkit:
|
End goal: Allow people to assign custom materials & textures to
io3d-data3d
entities.Components:
io3d-data3d
After @tomas-polach asked an important question during #4, Madlaina brought up the question how we would do this for
io3d-data3d
.The possibility to change textures and colors on materials is opening up many possibilities, e.g. changing the diffuse map without having to change the lightmap allows more dynamic materials without needing to re-bake.
The outcome should fulfill the following criteria:
(i.e.
<a-entity base-data3d="" base-material="colorDiffuse: green">
)base-material
to any a-entity to get our shaders onto anya-entity
The text was updated successfully, but these errors were encountered: