Inside an object


A place to ask questions or discuss issues relating to implementing applications with Axiom. If you are unsure of where to post, post here.

Veteran

Posts: 109

Joined: Tue Aug 29, 2006 8:59 am

Location: WI, USA

Post Mon Mar 08, 2010 9:37 am

Inside an object

How do I texture the inside and outside of a mesh object?

Say I am making a sphere for atmosphere.
I want to have a transparent texture and display clouds outside.
and when the camera is inside I want to paint that sky blue.

Do I need two objects?
theMouse
"Behold the Power of Cheese!"
User avatar

Site Admin

Posts: 1272

Joined: Thu Mar 02, 2006 11:29 pm

Location: Boston, MA, USA

Post Mon Mar 08, 2010 4:22 pm

Re: Inside an object

That's probably a bad idea. What you might want to consider is changing the skybox/spere/cube once you have closed the distance to your planet beyond some threshold. I.e. if your camera is > 8Km from the surface of a planet render a space skybox, and add a cloud layer to your planet. Once your camera is < 3Km from the surface stop layering the clouds on the planet and switch to a cloud skybox. Just my $.02.
Borrillis
The Steward of Axiom

Veteran

Posts: 109

Joined: Tue Aug 29, 2006 8:59 am

Location: WI, USA

Post Mon Mar 08, 2010 4:59 pm

Re: Inside an object

sounds good
do you think it would be hard to create a dynamic materials for a skybox object?

I was thinking different colors of sky for different types of atmosphere.
and some blending (i.e darker colors directly overhead, and "whiter" at the horizon?
theMouse
"Behold the Power of Cheese!"
User avatar

Site Admin

Posts: 1272

Joined: Thu Mar 02, 2006 11:29 pm

Location: Boston, MA, USA

Post Tue Mar 09, 2010 6:01 am

Re: Inside an object

Take a look at the DynamicTextures sample.
Borrillis
The Steward of Axiom

Veteran

Posts: 109

Joined: Tue Aug 29, 2006 8:59 am

Location: WI, USA

Post Tue Mar 09, 2010 10:12 am

Re: Inside an object

I used this code to generate the sun and planet objects:
http://www.ogre3d.org/wiki/index.php/ManualSphereMeshes
I noticed at the top of the page that the original code had the sphere pointing inward.

What if I did an atmosphere as two of these one pointing inward one outward.
same position/size.
theMouse
"Behold the Power of Cheese!"

Return to General Q & A

Who is online

Users browsing this forum: MSN [Bot], Yahoo [Bot] and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.