png as mtl Kd texture caused transparent phenomenon, how to remove.
- Dominant language
- HTML
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
What steps will reproduce the problem?
1. loading obj + mtl (mtl mapped with png)
2. use jsc3d to render 3d obj+mtl
What is the expected output? What do you see instead?
My expected output should be solid display(attachment2) as preview in 3D tools,
just like when the mtl is using jpg instead of png mapping with obj. (cause jpg
didn't contain transparent layer)
instead , i see quite obvious transparency in (attachment1)
and do not know how to remove the transparent effect.
What version of the product are you using? On what operating system?
current version. OS: windows8.1
Please provide any additional information below.
1.transparent view as attached.
2. mtl generated:
(as you mentioned only Kd or map_Kd few param will be taken by obj loader)
newmtl _teapotdefault
Ka 0.60000 0.60000 0.60000
Kd 0.80000 0.80000 0.80000
Ks 0.00000 0.00000 0.00000
Ns 5.00000
map_Kd newmapv7.png
3. jsc3d viewer setting:
var canvas = document.getElementById('cv');
var viewer = new JSC3D.Viewer(canvas);
viewer.setParameter('SceneUrl', 'v7_map.obj'); viewer.setParameter('InitRotationX', 0);
viewer.setParameter('InitRotationY', 0);
viewer.setParameter('InitRotationZ', 0);
//viewer.setParameter('ModelColor', '#ffffff');
viewer.setParameter('BackgroundColor1', '#B9EBFF');
viewer.setParameter('BackgroundColor2', '#DFF6FF');
viewer.setParameter('RenderMode', 'textureflat'); // texturesmooth etc
viewer.setParameter('MipMapping', 'on');
viewer.setParameter('Renderer', 'webgl');
viewer.init();
viewer.update();
```
Original issue reported on code.google.com by `haibo...@solstice.sg` on 14 Aug 2014 at 9:22
Attachments:
- [loading png as texture will be transparent.png](https://storage.googleapis.com/google-code-attachments/jsc3d/issue-100/comment-0/loading png as texture will be transparent.png)
- [solid texture effect in pure color mode.png](https://storage.googleapis.com/google-code-attachments/jsc3d/issue-100/comment-0/solid texture effect in pure color mode.png)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the viewer settings with the supplied v7_map.obj, its MTL using map_Kd newmapv7.png, and the PNG attachment; compare textureflat or texturesmooth with the WebGL renderer against the JPG case. Done means identifying whether the PNG alpha is being honored incorrectly and making the rendered texture solid like the expected preview.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100