proyb2, Newbie Posted: 23 October 2011 07:06 AM Total Posts: 17
I plan to add bitmap consist of a piano keys into each plane, as each image must be the power of 2, How do I fit it exactly into a rectangle plane without distorted? And will both plane overlap each other if place side-by-side?
Do I have to create larger bitmap or use 3D model?
Richard Olsson, Administrator Posted: 25 October 2011 07:00 AM Total Posts: 1192
[ # 1 ]
Create a bitmap that looks good in Photoshop and has the right dimensions. Then resize it to the closest larger power-of-two dimensions. So if the texture is 500x300, just scale it up to 512x512. The texture will look stretched in Photoshop, but once you map it to a 500x300 unit plane, it will look right again.
proyb2, Newbie Posted: 25 October 2011 11:23 AM Total Posts: 17
[ # 2 ]
I did that on alternativa3D, some details was lost, so does in Away3D too. Is there any other method?
80prozent, Sr. Member Posted: 25 October 2011 11:43 AM Total Posts: 430
[ # 3 ]
hi
you could use uv-mapping to make shure that only a part of the texture is mapped onto the plane.
the downside of this would be that you would waste some memory by loading a bitmap, but only using a part of it.
you could use the unused part of the bitmap on another mesh (again using uv-mapping) to prevent this memory waste.
Richard Olsson, Administrator Posted: 25 October 2011 11:48 AM Total Posts: 1192
[ # 4 ]
You should not lose detail from doing this. Are you sure the lost detail is not due to something else, e.g. that the plane is displayed bigger on screen than the original texture (and hence the pixels of the texture are stretched/interpolated to match those on the screen) or that you are not using smoothing on the texture?
Can you show screenshots of this?
proyb2, Newbie Posted: 25 October 2011 12:02 PM Total Posts: 17
[ # 5 ]
Stretch to 256x256, is that smooth? I use nearest neighbor and bicube (default) in the resize option: http://i56.tinypic.com/2uqhgjr.png
The line at the bottom of the image is vanish.
I not sure if it the issue with Z-view?
[Embed(source="wu49.png")] private var ImageClass:Class;
public function Away3dHouse() { view = new View3D(); view.camera.z=-320 stage.frameRate = 60;
var image:Bitmap = new ImageClass() as Bitmap;
// create the BitmapMaterial var material:BitmapMaterial = new BitmapMaterial(image.bitmapData); //material.smooth = true; //Tried with or without still the same result.
cube = new Plane(material,28,120);
proyb2, Newbie Posted: 25 October 2011 12:20 PM Total Posts: 17
[ # 6 ]
80prozent - 25 October 2011 11:43 AM
hi
you could use uv-mapping to make shure that only a part of the texture is mapped onto the plane.
the downside of this would be that you would waste some memory by loading a bitmap, but only using a part of it.
you could use the unused part of the bitmap on another mesh (again using uv-mapping) to prevent this memory waste.
UV using blender to export as collada model?
80prozent, Sr. Member Posted: 25 October 2011 12:38 PM Total Posts: 430
[ # 7 ]
for most cases i would do it that way. create Model with uv-mapping in 3d-Application like blender, and port it to away3d using 3ds,obj, collada or awd.
in your case you could do a much easier way.
modifiy the buildUV function in plane.as class.
inside the function you will find this code:
for (var yi : uint = 0; yi <= _segmentsH; ++yi) { for (var xi : uint = 0; xi <= _segmentsW; ++xi) { uvs[numUvs++] = xi/_segmentsW; uvs[numUvs++] = 1 - yi/_segmentsH; } }
lets say the texture you will use is 1024*1024, but you only want to use 1024*512 of it.
change the line
proyb2, Newbie Posted: 25 October 2011 02:27 PM Total Posts: 17
[ # 8 ]
I started using 3DMax studio 2011 but have no idea how to add plane and load into AWAY 4. If you don’t mind, could you advice?
80prozent, Sr. Member Posted: 25 October 2011 04:08 PM Total Posts: 430
[ # 9 ]
sorry - i dont know anything about 3dsmax.
i am using cinema4d.
but the workflow should be the same:
create a plane primitive.
convert it into a editable mesh.
unwrap uvs (probably automaticly done when converting to mesh)
open uv-editor
set the new uvs / save the new uvs
export as *.obj or *.3ds
import in away3d using the away3d loader classes
hope that helps
proyb2, Newbie Posted: 27 October 2011 02:26 AM Total Posts: 17
[ # 10 ]
oh dear, after spent days of persistance and try various methods, I found by setting
material.mipmap = false
has fixed the problem, the bitmap is now as clear as the sky!
Richard, I guess Away3D 4 should update the mipmap code for plane which should be disable by default, it’s nothing but confusion.