I want to set additional texture for Fragment shader but something is wrong.
Were i put texture to sampler i get black image on fs0 (i want to post process/displace currentFrame of view3d)
my code in FishEyeFilterTask
override protected function getVertexCode():String
{
return "mov op, va0n" +
"mov v0, va1n";
}
override protected function getFragmentCode():String
{
//trying to get view when context.setTextureAt(1, _t); is call = black screen on all samplers
return "tex oc, v0, fs0 <2d,linear,nomip>n";
}
override public function activate( stage3DProxy:Stage3DProxy, camera3D:Camera3D, depthTexture:Texture ):void
{
// TODO: not used
camera3D = camera3D;
depthTexture = depthTexture;
var context:Context3D = stage3DProxy._context3D;
//set on sampler1 but all saplers are black
context.setTextureAt(1, _t);
context.setProgramConstantsFromVector( Context3DProgramType.VERTEX, 0, _data, 3 );
context.setProgramConstantsFromVector( Context3DProgramType.FRAGMENT, 0, _data, 3 );
}
trying to get view when context.setTextureAt(1, _t); (_t is displacment map texture) is called = black screen on all samplers
I only get something when i put displacment map texture on fs0 but this owerrides screen frame.
yes i am changing fragment code to sample 1to see displacment map but it is black (fs0 also)
return “tex oc, v0, fs1 <2d,linear,nomip>n”;
]]>I’m using the awd exporter for max. I have two problems.
1. When I export with uv’s I get a hard seam on the model. I have attaches a images. A simple cylinder exported with and without the “Include texture co-ordinates” option checked.
2. The smoothing gets really strange. Its like away3d tries to “smooth” the model. This problem disappears if I increase the tessellation.
If I export to .obj non of this problems appears.
The reason I’m using awd is because I need simple animation, like a handle on a bucket raise and material. Is there another file-format that supports this in away3d.
Have a great day everybody!
]]>Thank you!
]]>I would like to know the current capabilities of Away3D in terms of terrain generation.
I know of a couple ways to generate terrain:
- Using heightmaps, it’s fast but not flexible, and kind of boring and repetitive anyway.
- Using actual meshes, it’s very flexible but might be overkill, and possibly you cannot make large landscapes easily for performance reasons (or can you ?).
Recently I found a third way to generate terrain. It’s from the Phyre Engine and is described here (PDF back from 2008, the engine must have evolved since then).
I don’t know the official name of that technique, but based on what I read from the paper I’ll call it “High order surface terrain generation”.
Just read the overview part of the paper for a general idea in terms of terrain “features”. Every single point listed in the Goals subsection is exactly what I am looking for.
Can Away3D allow me to do that currently ?
If yes, could you hint me on how ?
If not, do you think I can reasonably hope to see it added within the next 3 months ? 6 ? 12 ? Unlikely any time soon ?
Thanks a bunch !
I am very new to Away3D, so I ask your patience with my ignorance.
First I would like to say that I am very impressed by the Away3D project and I am extremely grateful to all the contributors.
I am trying to make a globe that supports extensive zooming. The approach I have used in a simple 2D version of my project is to split the image into multiple tiles (3600 in this case) and then use JavaScript to load (swap out the image url) higher resolution jpegs for the tiles that are visible and load low res jpegs for the tiles that are not visible (to save memory).
The further in the user zooms, the fewer tiles are visible but are in higher resolution. When the user zooms out, more tiles are visible but loaded with lower resolution.
Is there a way to do something similar with a sphere in Away3D?
Thanks in advance for your patience and help!
]]>This has probably been discussed in previous posts, but i was unable to find a clear anwser.
I have an earth globe and i want to show higher resolution texture(s) upon zooming in. Away3d has maximum texture size of 2048x2048.
Im wondering whats best practice to show higher resolution textures, and if there are any examples available.
Many thanks!
]]>( I think its posible, look this http://www.youtube.com/watch?v=c0IwvN4IdH4&t=43 )
]]>How to make strategy camera in Away3D like in this video? Is there some examples? Can anyone help?
]]>