chetto1983 / jsc3d

Automatically exported from code.google.com/p/jsc3d
0 stars 0 forks source link

high resolution texture #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, i'm trying to get a hd texture render with jsc3d but at this very mment 
it failed.
My file is 4096x4096 px and the model is a wavefront obj.
this is my canvas setting :     

viewer.setParameter('SceneUrl', 'calculatrice/001zb.obj');
    viewer.setParameter('InitRotationX', 0);
    viewer.setParameter('InitRotationY', 0);
    viewer.setParameter('InitRotationZ', 0);
    viewer.setParameter('ModelColor', '#FFFFFF');
    viewer.setParameter('BackgroundColor1', '#FFFFFF');
    viewer.setParameter('BackgroundColor2', '#383840');
    viewer.setParameter('RenderMode', 'texturesmooth');
    viewer.setParameter('Definition', 'high');
    viewer.init();
    viewer.update();

should i change or add a parameter to the canvas to get a full hd render.
or should i add a parameter to my mtl file.

thank in advance for your reply.

Original issue reported on code.google.com by remib7...@gmail.com on 30 Aug 2013 at 2:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Your texture will be internally resampled to 512x512, which is the maximum 
available texture size in current implementation. See 
http://code.google.com/p/jsc3d/source/browse/trunk/jsc3d/jsc3d.js#3784.

It's not difficult to modify the implementation slightly to enable larger 
sizes. While this may result in more visible texel discontinuity in texturing 
because jsc3d's rasterizer only has a nearest-neighbor filter to grab texels. 
To solve this, you may also need to enable mipmapping by adding this line:

  viewer.setParameter('MipMapping', 'on');

to the initialization part.

Original comment by Humu2...@gmail.com on 30 Aug 2013 at 2:44

GoogleCodeExporter commented 8 years ago
many thanks for your reply

Original comment by remib7...@gmail.com on 30 Aug 2013 at 3:59