TextureMaterial activateForDepth()

Software: Away3D 4.x

mattmogford, Newbie
Posted: 18 June 2013 10:52 AM   Total Posts: 23

Hi All,

I am new to Away3D, and I’m using version 4.1.1b.

I am having trouble with the rendering order of Meshes added to the scene.
(Objects in the distance are rendering infront of Objects closer to the Camera)
I found that in version 4.0 you could call activateForDepth() on a TextureMaterial.
It seems as though this method has been removed.
Can someone please point me towards how to fix this in 4.1.1.

Thanks
Matt

   

mattmogford, Newbie
Posted: 18 June 2013 10:56 AM   Total Posts: 23   [ # 1 ]

I have also tried,
_view.renderer = new DepthRenderer( true, true );

This seems to fix the depth/distance problem, but everything is bright blue with circles instead of textures.

   

mattmogford, Newbie
Posted: 19 June 2013 02:50 PM   Total Posts: 23   [ # 2 ]

Hi Guys,

Does anyone know what happened to this feature please?

Thanks
Matt

   

mattmogford, Newbie
Posted: 24 June 2013 11:29 AM   Total Posts: 23   [ # 3 ]

This seems like a fundamental part of 3D.
The objects in the distance should be drawn behind objects that are closer.
I expected some basic help on this.
I guess I should try StackOverflow instead.

   

John Brookes, Moderator
Posted: 24 June 2013 11:51 AM   Total Posts: 732   [ # 4 ]

You could always supply an example of the issue and what your testing on/with.
So people dont have play some random guessing game :/

random guess.
You using air and you’ve forgotten to include

<depthAndStencil>true</depthAndStencil>

to your application.xml

   

mattmogford, Newbie
Posted: 24 June 2013 11:55 AM   Total Posts: 23   [ # 5 ]

Hi John,

Firstly, thank you for the help. It is very much appreciated.
I didn’t think I needed to give those details as I was just wondering what has happened to the activateForDepth() function.

But I am using AIR, where would I put the depthAndStencil line in the xml?

Thanks again.
Matt

   

mattmogford, Newbie
Posted: 24 June 2013 11:56 AM   Total Posts: 23   [ # 6 ]

Actually I don’t have an Application.xml file as it’s a new Actionscript Web project in FlashBuilder 4.7

   

John Brookes, Moderator
Posted: 24 June 2013 11:56 AM   Total Posts: 732   [ # 7 ]
<initialWindow>
  <
title>TouchProxyTest</title>
  <
content>TouchProxyTest.swf</content>
  <
visible>true</visible>
  <
fullScreen>true</fullScreen>
  <!--<
autoOrients>false</autoOrients>-->
  <
aspectRatio>landscape</aspectRatio><!---->
  <
renderMode>direct</renderMode>
  <
depthAndStencil>true</depthAndStencil> <!-- required for 3D -->
 </
initialWindow
   

John Brookes, Moderator
Posted: 24 June 2013 12:00 PM   Total Posts: 732   [ # 8 ]

In that case. If its not an air app then I dont know what the issue is.
The only other thing that can give wrong rendering order is materials with alpha.

As for activateForDepth(), no idea never used it or needed it.

   

mattmogford, Newbie
Posted: 24 June 2013 12:15 PM   Total Posts: 23   [ # 9 ]

Ok thank you.
in my second post, that seems to fix the problem of depth. But instead of textures i get blue circles.
have you seen this before?

   

mattmogford, Newbie
Posted: 25 June 2013 09:22 AM   Total Posts: 23   [ # 10 ]

This has now been solved, for anyone looking for the answer see this other post.

http://away3d.com/forum/viewthread/4673/

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X