Transparent textures in 3D-SubScene
Hi!
I've got a 3D scene with shapes having semi-transparent textures (e.g. texture with alpha gradient to simulate reflections).
When it is shown using a 'normal' Scene, everything works fine, but as soon as I change to a SubScene with black background (subScene.fill(Colors.BLACK)), transparent pixels seem to be blended to white instead of black.
Correct with Scene: http://i39.tinypic.com/2isuq35.png
Incorrect with SubScene: http://i40.tinypic.com/20aayvp.png
As you can see in the screenshots, it seems that only pixels that are not fully transparent are affected.
System information:
Java(TM) SE Runtime Environment (build 1.8.0-ea-b109)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b51, mixed mode)
Windows 7 (x64)
GPU: NVIDIA Quadro 600
Hardware acceleration: DirectX / Direct3D
Is this a bug, missing feature or do I have to do something special to make this work?
Thanks,
Mario
What does it say to the right of the exlamation point? Does it indicate you're using DIrectX 8 or 9? I don't know about dragging textures onto the model here. I always have dragged materials onto a model. (My knowledge of this is somewhat limited, but I've had good luck with applying and editing materials on the models). Make sure you're using the latest drivers for your card. I'm running a fairly wimpy ThinkPad at the moment and if I choose the chrome material it reflects the beach just fine in the Toolkit on an .igs model.
Similar Messages
-
Transparent texture with Mipmap
Hi, I have a problem about transparent texture with mipmap. In no-alpha channel texture it is correct. Does anyone have the same problem as me?
This is my source code:
function uploadTextureWithMipmaps( dest:ITexture, src:BitmapData ) :void
var ws:int = src.width;
var hs:int = src.height;
var level:int = 0;
var tmp:BitmapData;
var transform:Matrix = new Matrix();
var trans:Boolean = src.transparent;
if ( trans )
tmp = new BitmapData( src.width, src.height, true, 0x000000 );
else
tmp = new BitmapData( src.width, src.height );
while ( ws >= 1 && hs >= 1 )
if ( trans )
tmp.draw( src, transform, null, "alpha", null, true );
tmp.draw( src, transform, null, null, null, true );
dest.textureObj.uploadFromBitmapData( tmp, level );
transform.scale( 0.5, 0.5 );
level++;
ws >>= 1;
hs >>= 1;
tmp.dispose();
I append the mipmap0, 1, 2 result to describe this situation. They are generated by a transparent texture after executing the upper function.
mipmap0
mipmap1
mipmap2You were close, but I have fixed your code for you.
public function uploadTextureWithMipmaps( dest:Texture, src:BitmapData ) :void
var ws:int = src.width;
var hs:int = src.height;
var level:int = 0;
var tmp:BitmapData;
var transform:Matrix = new Matrix();
var tmp2:BitmapData;
tmp = new BitmapData( src.width, src.height, true, 0x00000000);
while ( ws >= 1 && hs >= 1 )
tmp.draw(src, transform, null, null, null, true);
dest.uploadFromBitmapData(tmp, level);
transform.scale(0.5, 0.5);
level++;
ws >>= 1;
hs >>= 1;
if (hs && ws) {
tmp.dispose();
tmp = new BitmapData(ws, hs, true, 0x00000000);
tmp.dispose(); -
Stage3D semi transparent textures
I have been playing arounf with the Stage3D with moderate success but i have an issue rendering transparent textures.
as you can see some of the faces at the back are only partially rendered.
E.g. the bottom face is rendered through the front face but not through the side face)
Does anyone have any idea what might be causing this sort of behaviour?
you can see the demo here. (www.spoboyle.co.uk/demo/) click to pause the rotation
I have also included a screen shotI have a solution now for the cube problem (or any convex polygon)
cull the front faces draw the polygon and then cull the back faces and draw again.
so generally when dealing with semi-transparent objects
first draw all opaque objects
then draw all semi-transparent objects in order starting with those furthest away from the camera (convex objects should be drawn twice as mentioned above)
if you have any concave polygons all I can say is good luck!
I have removed all the above links and placed all the files here. -
W3d with transparent textures will be broken transmission problems
W3d with transparent textures will be broken transmission
problems
When the W3D models have Texture with alpha channel, It will
be Crusher and Transmittance (Showing the bottom), If not alpha it
will be normal! please tell me why,Thanks
snap:
have alpha channel:
snap-alpha.JPG
no alpha channel(normal):
snap-no-alpha.JPG
3d model Source file & W3D file:
http://www.3dzone.cn/beijixiong.zip
<---newAs we have written you can get it to work. Just do one of the
following.
1. Make the model a complete mesh. no parts just stuck into
others. Make sure vertecies are welded together properly etc.
2. a) Separate the head,hat,hands etc b) group them together
c) export (the exporter will combine them into one model again).
3. a) Assign a non transparent texture to your model, b)
select the polygons that needs transparency, c) assign the
transparent texture to those polygons
4. Outsource the importing of models to someone else.
I used method 2 as I mentioned in an earlier post and got it
to work, here is the result.
Scarecrow
with transparency working
The url to report bugs to adobe was recently posted, use the
search function. -
Transparent Textures (Again)
Hi guys,
Ive recently been kicking about in J3D and I was wondering how to make a full colour transparent texture over the top of another one. I have done the tutorial at http://swjscmail1.java.sun.com/cgi-bin/wa?A2=ind0207&L=java3d-interest&P=R58182&D=0&H=0&O=T&T=1 which worked fine (albeit very confusingly), producing a grayscale alpha blended image which I could use, but naturally it doesnt look very pretty if its grayscale. At the moment Ive got the actual Graphic produced being created from a jpg rather than the examples fileRect statements.
What I really want is to have a cloud plain, which is made from some colour image, with transparent sections where the transparent image is overlaid. Can this even be done? How would it be done with a single image (which is stil fine)? I suspect its got to do with the RGBA field in Texture2D and the ARGB field in BufferedImage, but as all that is quite confusing to me, Im seeking your wise advice.
Thanks in advanceI have done some stuff with this, and it does have to do with the rgba channels but I don't remember the details. I think I ended up just trying every possible set of TextureAttributes until I found one that works.
I think using a transparent PNG to start with can help too. -
How to get transparent textures to work in M3G
I am trying to make a textured Mesh be transparent in a M3G application. I says in the class documentation:
"For meshes, setting texture blending to MODULATE, framebuffer blending to ALPHA, and alpha threshold to zero will often
produce the desired result."
I have done all of this, but still I don't get any transparacy. Does anyone know why? This is my code:
compositingMode=new CompositingMode();
compositingMode.setAlphaThreshold(0f);
compositingMode.setBlending(CompositingMode.ALPHA);
float alpha = 0.51f;
iAnimatedMesh.setAlphaFactor(alpha);
Image textureImage = null;
try {
textureImage = Image.createImage("/res/blobs.gif");
} catch (IOException ex) {
ex.printStackTrace();
Image2D image2D = new Image2D(Image2D.RGB, textureImage);
Texture2D texture = new Texture2D(image2D);
texture.setFiltering(Texture2D.FILTER_LINEAR,
Texture2D.FILTER_LINEAR);
texture.setWrapping(Texture2D.WRAP_CLAMP, Texture2D.WRAP_CLAMP);
texture.setBlending(Texture2D.FUNC_MODULATE);
Appearance cubeAppearance = new Appearance();
cubeAppearance.setCompositingMode(compositingMode);
cubeAppearance.setPolygonMode(myPolygonMode);
cubeAppearance.setTexture(0, texture);
MorphingMesh mesh = new MorphingMesh(baseVertices,
morphedVertices,
myTriangles,
cubeAppearance);I got this to work now. Here is my new code below:
static final float alpha = 0.5f;
from Initialize method:
compositingMode=new CompositingMode();
compositingMode.setBlending(CompositingMode.ALPHA);
compositingMode.setAlphaThreshold(0.1f);
Mesh iBackground = BackgroundInit();
iBackground.setAlphaFactor(alpha);
from BackgroundInit method:
VertexArray texArray = new VertexArray(numberOfVerticesB, 2, 1);
texelsB = sphereSmooth.getTexels();
texArray.set(0, numberOfVerticesB, texelsB);
VertexBuffer vertexBuffer = new VertexBuffer();
vertexBuffer.setPositions(myPositionArray, 1.0f, null);
vertexBuffer.setTexCoords(0, texArray, 1.0f, null);
Object3D[] obj = Loader.load("/res/07.jpg");
Image2D image = (Image2D) obj[0];
Texture2D texture = new Texture2D(image);
texture.setFiltering(Texture2D.FILTER_LINEAR, Texture2D.FILTER_LINEAR);
texture.setWrapping(Texture2D.WRAP_CLAMP, Texture2D.WRAP_CLAMP);
texture.setBlending(Texture2D.FUNC_REPLACE);
Appearance cubeAppearance = new Appearance();
cubeAppearance.setCompositingMode(compositingMode);
cubeAppearance.setPolygonMode(myPolygonMode);
cubeAppearance.setTexture(0, texture);
mesh = new Mesh(vertexBuffer, myTriangles, cubeAppearance);
return mesh; -
Hello I'd like to convert my directx program to ios and I'm stuck right now on rendering textures.
I messed around and enabled otho camera in open gl ES 2.0 and textures render but I can't get alpha to work.
I used glDrawArrays specifying the colour as my colour with the alpha yet it seems to completely ignore the alpha.
Do I need to enable states as with directx?
I'm very new to OpenGL. (if there's any directx to OpenGL tutorials about they might be nice I did buy an OpenGL book but it's all wrong since it uses glVertex3f etc which isn't VBO obviously that won't work for app store apps)Thank you both guys.
As John said, I believe I'm looking for a gap-free sequence per master record.
The line number of the OrderItems table is the second half of the primary key. The first half of the primary key (DocumentNumber) is the foreign key to the Orders table.
Think of it like line items on an order or invoice. For example, if you were talking to someone on the phone concerning an invoice, you might say, "The pricing for line item #3 is incorrect." In this case, it's good to have a common reference. Or imagine a Microsoft Excel spreadsheet with no row numbers displayed! You'd never get anywhere if you had to explain something over the phone.
If this is tricky to perform, I take it using a sequence and trigger such as the Fusion Order Demo is the best way to approach the challenge for simplicity's sake?
Will -
3D sometimes rendered transparent...? (Windows)
It's actually quite hard for me to reproduce this "glitch" but ever so often after changing/updating the texture of a 3D layer in Photoshop, when I go back into the main document and it updates the texture, it will render "transparent"
I put "white" behind the layer so it could be seen, but it is actually transparent based on luminosity,i think.
if you make the texture layer, completely white you get a very light gray transparent texture...Thank you, and sure thing: http://nickdclements.com/downloads/ps3d.rar
Yes, the smart object does play a large part in the issue.
I mainly use Photoshop 3D objects for label wraps. Wrapping a digital label around a real photograph of a bottle.
Sometimes I can't get the object rotated just right to fit on the picture properly, so I make it a smart object and warp it slightly using transform.
I'm not sure if you can warp, or edit the mesh, so that has been the next best solution. -
Hello,
I want to draw a transparent texture (a cloude texture that is square and reapeating) with soft edges (the cloud shape is defined through the geometry not the texture). For this I've created a geometry with a alpha value of 0.0f at the edges and 1.0f in the inner vertices.
But I'm only able to get it rendered with either the vertex alpha (if I I create the texture with RGB format - no alpha) or with only the texture alpha (when I declare the texture with RGBA format). I've tried many combinations of TextureAttributes (BLEND, DECAL, COMBINE with COMBINE_BLEND, COMBINE_ADD, COMBINE_MODULATE, etc..) but I can't figure it out.
Ciao Matthias MannI've found a transparency tutorial at http://www.j3d.org/tutorials/quick_fix/transparency.html
-
My Offset filter not working in Cs6: Seamless pattern problems
Hi all.
Im trying to create a seamless pattern. using lots of layers.
Im going to filter/other/offset/, adding the vertical or horizontal dimensions for as 2953px (image size is 2953px x 2953px). and checking the ‘wrap around’ box.
But it’s not working & is cropping off loads of the layer, so not seamless at all.
I've tried with another layer and the same thing is happening.
I've 'revealed all' and shows nothing. I’ve tried to delete any transparent stray pixels around the layer I'm trying to wrap.
& I have also selected all & then cropped the image but it’s still happening.
I've googled till my hearts content but found no other idea on how to solve. Any ideas?
All my layers are from brushes I have created and used so lots of transparent textures. But that would be a problem if I have tried all of the above would it?
Many thanks in advance.Thanks. I have attached screen shot.
If you see on the top left and bottom left this is the "white flower copy" layer that I am trying to offset. This is a copy of the white flow with blue centre just to the left of the offset window.
You will see that the offset layer I want to wrap is missing the blue centre. -
How to create glass effect??
hi
i wish to creat a mobile phone on screen and wish to know if it is possible to produce a glass screen?
any help would be great
thank
martinCreate an image which shows a glass effect. Then use this image as a transparent texture on a plane which is your glass.
-
Anybody having trouble pasting texture into the opacity masks box in the transparency window?
Very frustrating, works sometimes, sometimes doesn't. When I cut and paste the texture into the "black box" in the transparency window it doesn't copy and appears white on my document.
this is what I should get in the newest illustrator, but this was done in CS5 - I'm familiar with this process... just don't know why it works sometimes in the newest illustrator and sometimes it doesn't, it's frustrating.
-
Alpha transparency borders on dynamically loaded images for use with textures
Hi there folks. Well, I have been beating my head over this
and am hoping one of you can help me out.
Essentially I have 16bit images that are loaded into my
shockwave application at run-time. These images are user defined
which means that I will not know their size ahead of time. Once the
images are loaded I then create textures and apply them to various
shaders. Ok, all of this works just fine. What I need to do though
is create an alpha transparent border around the images, so when I
apply them to their surfaces I only see the image and nothing
around it. I am doing this because these images will only appear at
specific parts on a surface, textureRepeat will be false, and many
models will be stacked in the same exact location using the same
model resource. I have everything working, but I cannot figure out
the alpha part for the life of me. Also, when I test the alpha
based image by itself it works just fine. It is not until I try and
combine the 16bit (converted to 32bit at run-time) image that I run
into problems.
I have tried:
- Creating a 32bit alpha image in Fireworks with a
transparent border and a black rect for the inside. I then copy the
dynamic image over the alpha image (only after going from 16bit to
32bit in imaging Lingo) and leave a little room at the edges for
the transparency. Well, I get a crazy amount of streaks here even
when I try to up the trans border by around 24 pixels on each side.
- Using another similiar alpha based image as a mask with
copyPixels and extractAlpha/setAlpha like this... (code is a little
rough here)
newImage = new(#bitmap)
newImage.name = "place_Test"
newImage.image = member("place").image
newAlpha = new(#bitmap)
newAlpha.name = "AHH"
newAlpha.image = image(newImage.image.width + 24,
newImage.image.height + 24, 32)
newAlpha.image.useAlpha = true
newAlpha.image.copyPixels(member("vase").image,
newAlpha.image.rect, member("vase").image.rect)
newAlphaInfo = newAlpha.image.extractAlpha()
newAlpha.image.useAlpha = false
--reverse dark to light
iAlphaReverse = image(newAlpha.image.width,
newAlpha.image.height, 8, #grayscale)
iAlphaReverse.fill(iAlphaReverse.rect, rgb(0,0,0))
iAlphaReverse.copyPixels(newAlphaInfo, iAlphaReverse.rect,
newAlphaInfo.rect, [#ink : #reverse])
--newAlphaInfo.copyPixels(iAlphaReverse, newAlphaInfo.rect,
iAlphaReverse.rect, [#ink:#subtractpin])
newAlphaMask = iAlphaReverse.createMask()
rescaleAbs(newImage, newImage.image.width,
newImage.image.height, "place_Test", 32)
destImage = member("place_Test").image.duplicate()
destImage.fill(destImage.rect, rgb(0,0,0))
newAlpha.image.useAlpha = false
destImage.copyPixels(newImage.image, newImage.image.rect,
newImage.image.rect, [#maskImage:newAlphaMask, #ink:#add])
destImage.setAlpha(iAlphaReverse)
destImage.useAlpha = true
member("place_Test").image = destImage
I apologize for the messy code. I have cut and pasted from
all over the place and am getting confused. In any case, I think I
am making this harder then it needs to be and hope someone can
help.
Thank you in advance,
DaveHi, you can try using other texture layer as mask on the same
shader. As usually you create the texture from a dynamic loaded
image, then apply this texture to the shader on the texture list
index 1 (textureList[1]). Next part does the job, create other
texture from a 32 bits image with the alpha information and fill
all pixels with white color, this is very important because the
second texture layer will be multiply with the first texture layer.
This texture set its render format to rgba8888. Apply the mask
texture to the same shader at texture list index 2, verify that the
blendFunctionList index 2 is #multiply.
I include the code of a project that use this masking
approach:
property pMember
property pEarthSphere
property pNightSphere
property pLastTransform
on beginSprite me
pMember = sprite(me.spriteNum).member
me.setupWorld()
end
on setupWorld(me)
pMember.resetWorld()
repeat with i = pMember.light.count down to 1
pMember.deletelight(i)
end repeat
vEarthModelResource = pMember.newModelResource("EARTH MODEL
RESOURCE", #sphere)
vEarthModelResource.radius = 50.000
vEarthModelResource.resolution = 20
vEarthTexture = pMember.newTexture("EARTH TEXTURE",
#fromCastMember, member(3,1))
vEarthShader = pMember.newShader("EARTH SHADER", #standard)
vEarthShader.emissive = color(255,255,255)
vEarthShader.flat = TRUE
vEarthShader.transparent = FALSE
vEarthShader.textureList[1] = vEarthTexture
pEarthSphere = pMember.newModel("EARTH MODEL",
vEarthModelResource)
pEarthSphere.shaderList = vEarthShader
vNightModelResource = pMember.newModelResource("NIGHT MODEL
RESOURCE", #sphere)
vNightModelResource.radius = 50.2000
vNightModelResource.resolution = 20
vNightTexture = pMember.newTexture("NIGHT TEXTURE",
#fromCastMember, member(4,1))
vNightTexture.quality = #lowFiltered
vNightTexture.nearFiltering = FALSE
vNightTexture.renderFormat = #rgba8880
vNightShader = pMember.newShader("NIGHT SHADER", #standard)
vNightShader.emissive = color(255,255,255)
vNightShader.flat = TRUE
vNightShader.transparent = TRUE
vNightShader.textureList[1] = vNightTexture
vMaskNightTexture = pMember.newTexture("MASK NIGHT TEXTURE",
#fromCastMember, member(6,1))
vMaskNightTexture.renderFormat = #rgba8888
vNightShader.textureList[2] = vMaskNightTexture
vNightShader.textureModeList[2] = #wrapPlanar
pNightSphere = pMember.newModel("NIGHT MODEL",
vNightModelResource)
pNightSphere.shaderList[1] = vNightShader
pNightSphere.parent = pEarthSphere
end
on exitFrame(me)
pEarthSphere.rotate(0.0,0.1,0.0)
me.moveMaskNightTexture()
end
on moveMaskNightTexture(me)
vRotationVector = - pEarthSphere.transform.rotation
pNightSphere.shaderList[1].wrapTransformList[2].rotation =
vRotationVector
end -
Transparent background to 3d model - want to see page texture
I have an existing pdf with a photo background
I want to place a rotatable etc model above it but want to see the photo behind rather than that boring grey 3d box
can this be done?
(no access to acrobat 3d at this moment so forgive if it is facile)
thx
gavPDF Reference version 1.7 ("3D Background Dictionaries", page 812) says: "Currently, only a single opaque color is supported, where the color must be defined in the DeviceRGB color space."
The 3D background dictionary has a Subtype key which is described as follows: "(Optional) The type of background. The only valid value is SC (solid color), which indicates a single opaque color. Default value: SC."
This applies to Acrobat 7.0.7+ or to Acrobat 8.0.
Shlomo Perets
MicroType: FrameMaker/Acrobat
training & consulting * FrameMaker-to-Acrobat TimeSavers
FM-to-PDF Assistants: Navigation, Form, Presentation, Multimedia & 3D -
hi can any one help. I recently upgraded to cs4 still running my old nvidia gt8600. the open gl was working perfect for awhile, only probl. was my boris opengl plugins worn't supported. i did researched and found it was my nvidia driver so I updated it an cool all was working great. after about a week ae started crashing telling me that a texturewas to small to render, I have gone through every forum and cant fix this problem. Yes i need to get a decent video card but money is tight and this 1 was working.
any suggestions please!!!!!!!!!!!!!!!!!!!!!!!!!! I need to finish a project
thanks in advanceWhat operating system are you on and what is it you are trying to do? "Texture too small" is more or less a transparency blending problem (see http://aeerrors.myleniumstuff.de/?p=750) or texture cropping problem, so it matters, what you are doing. comp preview res and size e.g. on text layers could be influential. The 8600 series should be just fine. While not exactly a precise comparison, the mobile version works just fien in my Macbook both under OSX and Vista, so something else must be the problem.
Mylenium
Maybe you are looking for
-
I have an apache server connected to tomcat via ajp13. In the tomcats catalina.out file it keeps creating new ajp13 background threads up to its configured limit, and never releases them. When it reaches its limit, you get this error:- Ajp13Connector
-
Whenever i want to update my devise software.i sing in nokia ovi suit but it says the user name or passsword was incorrect or says could not connect to server.Even i had a hig speed internet. WHAT CAN I DO PLEASE HELP
-
iMessage will say "delivered" but it will not be received. Also will sometimes send a text, and it will not go through until I send a subsequent text , sometimes hours later. Like the first message was stuck in some sort of text limbo. Happens spo
-
AIR, Https and invalid certificates
If you have a flex application and access it using https and the site certificate is invalid for some reason the browser gives a warning about the site and an option to continue to the site, if you choose to continue the application loads and runs as
-
Print dialog not remembering settings
I have a very simple saved setting for my Lexmark E332n printer that sets the paper feed to manual. The problem is that since upgrading to Leopard, the manual paper feed setting is not remembered. In fact I have tried deleting the saved setting, sett