www.BinaryAlchemy.de :: View topic - Volume shader - mapping spherical density?
 SearchSearch   RegisterRegister  ProfileProfile   UsergroupsUsergroups   Log inLog in 
If you create a new post, please use a topic that describes your problem
Documento sin título
 
Volume shader - mapping spherical density?

 
Post new topic   Reply to topic    www.BinaryAlchemy.de Forum Index -> Shader Problems / How do I...?
View previous topic :: View next topic  
Author Message

Pitcher



Joined: 23 Mar 2005
Posts: 114
Location/Company/Country: Gimmick VFX/Denmark

PostPosted: Fri Jun 21, 2013 12:44 pm    Post subject: Volume shader - mapping spherical density? Reply with quote

I have a sphere I want to render with the built in particle volumetric shader. Now I need to map the density so it is spherical - imagine the earths atmosphere for instance where I might want to control the density with a gradient from the centre of the sphere and out to the circumference where the density fades out, and likewise for coloring.

I have been through the various permutations with gradients but fail to get a really three dimensional mapping of spherical density.

Am I missing something simple here or is it not easily done?

Morten
_________________
Morten Bartholdy
Colorshop VFX
Denmark
Back to top
View user's profile Send private message Send e-mail

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri Jun 21, 2013 1:12 pm    Post subject: Reply with quote

I am not sure if it is possible with a gradient (is it 3D?). If it is, then you have to set the texture projection to implicit. Otherwise the UVW values are mapped to the polygons you see.
See:
http://www.binaryalchemy.de/develop/shd_vol/vid/Making_the_Sky.wmv

If the gradient is not 3D, then you have to create one.
Vector state(intersection point) -> Vector coordinate (world to obj)-> Vector Math (subtract object center 0/0/0 or anything else) -> Vector to Scalar (Distance/length) -> change range (0-20 to 0-1) ->Gradient mixer
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Pitcher



Joined: 23 Mar 2005
Posts: 114
Location/Company/Country: Gimmick VFX/Denmark

PostPosted: Fri Jun 21, 2013 3:37 pm    Post subject: Reply with quote

The 3D vector stuff did the trick - thanks Holger!
Here is my first test:

https://dl.dropboxusercontent.com/u/763668/BA_Volume/Earth_Volumetric_Atmosphere.png.jpg

It would be nice if this was a ready to go compound distributed with Softimage.

Morten
_________________
Morten Bartholdy
Colorshop VFX
Denmark
Back to top
View user's profile Send private message Send e-mail

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri Jun 21, 2013 3:48 pm    Post subject: Reply with quote

I have a volume primitive shader for that. But that is in the volume collection.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Pitcher



Joined: 23 Mar 2005
Posts: 114
Location/Company/Country: Gimmick VFX/Denmark

PostPosted: Fri Jun 21, 2013 5:07 pm    Post subject: Reply with quote

I see. I actually bougth that long time ago, but haven't installed it for the last versions of Softimage since the volume shader was part of the factory install. How does it play with the Ba_Volume Fluid?

Morten
_________________
Morten Bartholdy
Colorshop VFX
Denmark
Back to top
View user's profile Send private message Send e-mail

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri Jun 21, 2013 5:48 pm    Post subject: Reply with quote

The fluid shader was the first part of the new volume shader version.
Then some other shaders have been updated (Like the primitive shader).
There is not yet a new volume shader, so baFluid used the Softimage build in one.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    www.BinaryAlchemy.de Forum Index -> Shader Problems / How do I...? All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 
Documento sin título
 



Powered by phpBB © 2001, 2002 phpBB Group



Number of shameful bots caught by Anti-Spam ACP: 1667