Emission strength based on position?

General discussion about Cycles 4D.
Post Reply
ibentmywookie
Posts: 5
Joined: Thu Oct 12, 2017 5:41 pm

Emission strength based on position?

Post by ibentmywookie » Wed Jan 17, 2018 9:33 am

Hello all,

I'm slowly starting to get the hang of this Cycles4d stuff, but I've run into a bit of an issue that I can't work out.

Basically, I've got a bunch of spheres gravitating towards one big central sphere. In the centre of each sphere is an object with an emission material applied. As they get closer to the large sphere I want the emission strength to increase from 0% to 100%.

Without creating a material for each sphere and manually keyframing is this even possible???

Thanks!
Attachments
example.jpg
example.jpg (66.75 KiB) Viewed 687 times

User avatar
Mario Tran Phuc
Posts: 158
Joined: Mon Nov 14, 2016 4:03 pm

Re: Emission strength based on position?

Post by Mario Tran Phuc » Wed Jan 17, 2018 10:12 am

Hi,

you can do this with the object info node. We covered the position based shading over here at 26 minutes:

https://youtu.be/XY6yS5wA-Rw?t=1587

Cheers,

Mario

User avatar
Mohamed Sakr
Posts: 595
Joined: Tue Nov 15, 2016 8:45 am

Re: Emission strength based on position?

Post by Mohamed Sakr » Wed Jan 17, 2018 1:36 pm

you can also drive it using an attribute.
for example, compute what you want using xpresso, save that into a point weight tag, use that tag (drag it in the nodes area) to create attribute, it will do exactly what you want out of the box.

ibentmywookie
Posts: 5
Joined: Thu Oct 12, 2017 5:41 pm

Re: Emission strength based on position?

Post by ibentmywookie » Wed Jan 17, 2018 3:32 pm

Thanks for the tips guys. I've watched that video several times previously, didn't even occur to me to try that!

I'm not super experienced with xpresso but will look into that later this evening.

Thanks again.

kasezo
Posts: 39
Joined: Mon Mar 13, 2017 5:36 pm

Re: Emission strength based on position?

Post by kasezo » Wed Jan 17, 2018 7:13 pm

if position means on camera view, you can use some textures like gradient with 'window ' optıon ın texture cordınates. and after this try use this gradient to colorizing or mixing objects.

for another option, use mograph colorizing options with effector falloffs. its can be colorize objects under mograph object depending on falloff or any effect on effectors.(plain, shader and etc.)

as a third variant, you can map position information or distance info from xpresso. and you can use it with some xpresso setup abd şt can be colorize object depending distance to main object.

i recommend second way. its simple to use i think.

ibentmywookie
Posts: 5
Joined: Thu Oct 12, 2017 5:41 pm

Re: Emission strength based on position?

Post by ibentmywookie » Thu Jan 18, 2018 7:34 am

Been playing with this for hours, makes me realise how much I still have to learn :?

Using the object /position method I can kinda get them working, but only in x,y or z. I thought combining them would work on a 'global position' type basis, but I must be doing something wrong.

Thought I'd give the xpresso method a try. I think I've got it calculating the distance (maybe) but how do I then use that data with the material?? tried dragging but wouldn't let me.

Thanks!
Attachments
test.c4d
(366.45 KiB) Downloaded 19 times

kasezo
Posts: 39
Joined: Mon Mar 13, 2017 5:36 pm

Re: Emission strength based on position?

Post by kasezo » Thu Jan 18, 2018 11:05 am

here take this, how i say mograph can resolve your problem. here i used instance for 1 sphere. and used this instance for generator object of xp. and after this added a simple plane effector with only color change and spherical falloff. so, xp emitter sends spheres, spheres goes in effectors area and moinstance object changing color. use this for any kind of setup or movement. use object color and give it to emission. and you can see your spheres being emissive when goes in to the falloff area of effector. its means how are they near to center can be lighter or darker.

note, i used moinstance but its can work for other mograph tools to
Attachments
xp x mograph falloff based color.c4d
(131.52 KiB) Downloaded 27 times
mograph falloff based color simple.c4d
(107.19 KiB) Downloaded 28 times

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest