Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No more outlines since V4 #742

Closed
5 tasks done
whitespacecode opened this issue Jun 21, 2024 · 8 comments
Closed
5 tasks done

No more outlines since V4 #742

whitespacecode opened this issue Jun 21, 2024 · 8 comments
Labels
bug Something isn't working p3-minor-bug An edge case that only affects very specific usage (priority) PR welcome regression The issue only appears after a new release

Comments

@whitespacecode
Copy link

whitespacecode commented Jun 21, 2024

Describe the bug

Using the @pmndrs/vanilla package to create an Outline around the Mesh fails in V4

On V3.9
image
On V4.x
image

No console error's..
I used @hawk86104 example to create this and noticed the outline's break in V4

Reproduction

https://stackblitz.com/edit/tresjs-basic-9b2xts?file=src%2Fcomponents%2FTheExperience.vue

Steps to reproduce

Change the package.json so Tresjs uses V4 and the outline will be gone

System Info

/

Used Package Manager

npm

Code of Conduct

@alvarosabu
Copy link
Member

Hi there @whitespacecode I'm really not familiar on that package so maybe @hawk86104 can support us here

@alvarosabu alvarosabu added PR welcome p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release bug Something isn't working labels Jun 26, 2024
@alvarosabu
Copy link
Member

Or why not using Tresjs Postprocessing package directly https://post-processing.tresjs.org/guide/effects/outline.html ?

@whitespacecode
Copy link
Author

Wait.. @alvarosabu There is a post-processing.tresjs!?
I will look into that tomorrow. Thanks

@hawk86104
Copy link
Contributor

hawk86104 commented Jun 27, 2024

@alvarosabu @whitespacecode
It's been a while since we last got in touch.🤓
Sorry, I have been busy recently with the ecosystem of Tress in China, mainly improving small functionalities across various industries: https://opensource.icegl.cn/

Regarding the version dependency of Tress, I have not upgraded to 4.x because the upgrade would cause many issues with the previous functionalities. I did a brief check and found quite a few problems, so I plan to wait until the 4.x version is more complete and stable before upgrading.
As for the outline effect, we are using a shader-based method rather than post-processing.

@whitespacecode
Copy link
Author

I noticed when i use the outlines package directly on the mesh everything works.
It should normally extract the geometry from its parent and that's where it's failing suddenly. So i'm not sure what changed in V4 to the TresMesh

//This works fine on V4
const outlines = Outlines()
const mesh = new THREE.Mesh(geometry, material)
mesh.add(outlines.group)

@hawk86104
Copy link
Contributor

@whitespacecode @alvarosabu
#766 (comment)
The issue arises from the use of a proxy for ‘primitive’ in ‘setPrimitiveObject’, leading to copies and shallow copies that result in the loss of the source object’s properties and methods. Awaiting an official fix.

and this is tvt v4.x branch:
https://github.com/hawk86104/icegl-three-vue-tres/tree/V4.x

@whitespacecode
Copy link
Author

whitespacecode commented Jul 11, 2024

@whitespacecode @alvarosabu #766 (comment) The issue arises from the use of a proxy for ‘primitive’ in ‘setPrimitiveObject’, leading to copies and shallow copies that result in the loss of the source object’s properties and methods. Awaiting an official fix.

and this is tvt v4.x branch: https://github.com/hawk86104/icegl-three-vue-tres/tree/V4.x

Thanks for your fix and insight! I do prefer the shader-based outline more, your fix works in my example.
Alvarosabu did some changes to primitive recently #764

@whitespacecode
Copy link
Author

This is fixed in V4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working p3-minor-bug An edge case that only affects very specific usage (priority) PR welcome regression The issue only appears after a new release
Projects
Status: Done
Development

No branches or pull requests

3 participants