[Closed] script generated material is blurry
not sure what is causing this.
I have one material that was manually created and a second that was generated by max script, using identical settings. yet the second (lower one) is blurry.
Both image use the same bitmap file and bitmap object
I’ve poured over the material and bit map nodes in slate looking for what might be different, and I can’t find it. Perhaps an experienced eye can point me in the right direction.
What are we supposed to be going by? You have posted neither the code nor the resulting bitmaptexture settings…
The manual process I’m trying to replciate is :
given a simplediffuse shader, grab its bitmap texture, and create a new shader with some transparency.
Here is the code that generates the shader
fn makeTransMaterial obj= (
--get bitmap from obj
myBitmapFile=obj.material.diffuseMap.bitmap.fileName
myMap=Bitmaptexture fileName:myBitmapFile
local assetName=(json.getProp sceneData.data"assetName")
myName=("trans_"+assetName)
--make new transparent material
envObjects.transMaterial = standard diffuseMap:myMap selfIllumMap:myMap opacityMap:myMap showInViewport:true name:myName
envObjects.transMaterial.opacityMap.alphasource=1
),
--which I then assign with:
obj.material=envObjects.transMaterial
--envObjects is the parent struct that all this happens inside of.
I’ll see if I can provide the bitmaptexture settings later. But, as you can see form the screen grab, both materials use the exact same bitmaptexture object.
(they were however, created on different workstations, with different viewport renderers -the original artist used nitrous for the manual creation, and my machine uses direct x. perhaps some strange hardware differences are creeping in to the resulting bitmaptexture’s display?))
That -does- look puzzling…
The shot on the right, is that in-viewport or a render? (I don’t think you mentioned that detail)
Perhaps try comparing the materials using the Compact material-editor instead of Slate – the differences may be more apparent there if they’re somewhere obscure. Under the DirectX Manager rollout perhaps?
One looks to be showing Realistic Material in Viewport, while the other might be showing Shaded Material in Viewport. That difference will effect viewport quality.
-Eric
both objects are in one viewport.
the blurry object was copied (shift-drag) from the non-blurry object, then the script was run.
Presumably any object specific display settings are identical.
only the material is different