Absolute world position

Node-based Shader Editor

Absolute world position

Postby okoto » Wed Mar 08, 2017 2:11 pm

I'm trying to make an effect relative to your position
I think I need a node that returns the absolute position of the object in the world but I'm not sure if it exists.
For example, if I move this object its slices remained stopped while the object moves.
http://prntscr.com/ehh6u2
Image
The desired result is that if I move this object the slices will not "move".
okoto
 
Posts: 9
Joined: Tue Feb 21, 2017 6:07 pm

Re: Absolute world position

Postby okoto » Wed Mar 08, 2017 11:15 pm

okoto
 
Posts: 9
Joined: Tue Feb 21, 2017 6:07 pm

Re: Absolute world position

Postby okoto » Thu Mar 09, 2017 7:10 pm

I fixed my problem using vertex position, the problem is that the axis does not always match the right direction.
Anyway i am still open to suggestions.
okoto
 
Posts: 9
Joined: Tue Feb 21, 2017 6:07 pm

Re: Absolute world position

Postby Ricardo Teixeira » Sat Mar 18, 2017 3:00 pm

Hello,

Apologies for the delay, the team was away for a couple of days. Can you provide additional information, or a test case? We would love to look into any possible issues on our side.

A sample shader would be awesome!

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Absolute world position

Postby Garrettorious » Tue Sep 26, 2017 12:05 am

Hi, sorry to bump an old thread, but I could also benefit from this very much. I feel like there must be a way to get absolute world position, but maybe I'm just not getting it.
All I want is a node that returns a float3 with the world space pivot of the object the mesh renderer is attached to.

My case:

I'm doing a pseudo meta ball blob thing and i'm doing a bunch of things relative to the objects center. I'm currently passing in the center via script, but Unreal for example has a node for this.

Am I just missing it? I'll admit I'm at a bit of a loss with all the transform matrices. Are there any tutorials on using those?

Thanks!
Garrettorious
 
Posts: 1
Joined: Fri Jun 16, 2017 9:10 pm

Re: Absolute world position

Postby Ricardo Teixeira » Tue Sep 26, 2017 9:40 am

Garrettorious wrote:Hi, sorry to bump an old thread, but I could also benefit from this very much. I feel like there must be a way to get absolute world position, but maybe I'm just not getting it.
All I want is a node that returns a float3 with the world space pivot of the object the mesh renderer is attached to.
My case:
I'm doing a pseudo meta ball blob thing and i'm doing a bunch of things relative to the objects center. I'm currently passing in the center via script, but Unreal for example has a node for this.
Am I just missing it? I'll admit I'm at a bit of a loss with all the transform matrices. Are there any tutorials on using those?
Thanks!


Hey there,

There's the World Position node, not sure if you are looking for something else.

Let us know, we would be happy to help.

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Absolute world position

Postby exerion » Mon Nov 27, 2017 10:27 pm

Hi Ricardo,

Garrettorious clearly stated what he' after.

All I want is a node that returns a float3 with the world space pivot of the object the mesh renderer is attached to.


You must have misread his question. World Position Node is clearly not what he is asking for.

I would also like to know if what Garrettorious asked for is obtainable.

Thanks :)
exerion
 
Posts: 11
Joined: Tue Aug 29, 2017 5:25 am

Re: Absolute world position

Postby Ricardo Teixeira » Mon Nov 27, 2017 10:50 pm

exerion wrote:Hi Ricardo,

Garrettorious clearly stated what he' after.

All I want is a node that returns a float3 with the world space pivot of the object the mesh renderer is attached to.


You must have misread his question. World Position Node is clearly not what he is asking for.

I would also like to know if what Garrettorious asked for is obtainable.

Thanks :)



Thank you for getting in touch and for your interest!

I believe what you are looking for is known as Object to World.

Let me know if that's not the case.
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Absolute world position

Postby tonycoculuzzi » Fri Feb 22, 2019 6:45 pm

Ricardo Teixeira wrote:
exerion wrote:Hi Ricardo,

Garrettorious clearly stated what he' after.

All I want is a node that returns a float3 with the world space pivot of the object the mesh renderer is attached to.


You must have misread his question. World Position Node is clearly not what he is asking for.

I would also like to know if what Garrettorious asked for is obtainable.

Thanks :)



Thank you for getting in touch and for your interest!

I believe what you are looking for is known as Object to World.

Let me know if that's not the case.



I think they mean this:

Image

I'd like to know how to get this value as well. As far as I'm aware, there's no way to get the object's transform's world-position or local-position.

This value would return one Vector3, which would only change when the object moves. A stationary object would always have the same value here, regardless of pixel/screen/vertex position, until moved.
tonycoculuzzi
 
Posts: 5
Joined: Fri May 18, 2018 9:41 pm

Re: Absolute world position

Postby tonycoculuzzi » Fri Feb 22, 2019 9:39 pm

It looks like I was mistaken!

When you said:
I believe what you are looking for is known as Object to World.


This works, for most situations. However, I think I found a bug.

When writing a sprite shader, it appears as if the Object To World node doesn't work unless there is only one sprite active using the created shader. I've made a gif to show what I mean.

Image

When I move the sprite, it should be cycling between green-yellow-red-black, as it's world position changes. This does not work, and stays black, until I disable all other sprites using the same shader, then it does work.
tonycoculuzzi
 
Posts: 5
Joined: Fri May 18, 2018 9:41 pm

Next

Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 2 guests

cron