Home Technical Talk

3ds Max DirectX Shader problem

Offline / Send Message
Pinned
Hello everyone!

I have some strange issue with DirectX Shader in Max. I have to use some castom shader with Diffuse map and LightMap. It works good on all submaterials in whole scene except only one - some subobject (it is very similar to another 5, has no alphas) of it became invisible (but still exist - I select this invisible things). I check all that I can imagine: UVW-Unwraps (I have channel 1 for Diffuse and 2 for lightmap), MaterialIDs (haha), normals, maps. I tried to detach it and open in newer/older version of max - nothing helps.
I hope, someone faced up this problem and know how to fix it.

I'll be very grateful for any help!

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Need more info.
    What version of 3ds Max?
    Did you write this shader, or are you using someone else's shader? Did you use Shader FX, or another tool?
    If you made the shader, please post a screenshot of the shader graph.
    Have you tried detaching the object, removing the Multi/Sub-Object material, using just a single DirectX material?
  • yhlytk
    Options
    Offline / Send Message
    Need more info.
    What version of 3ds Max?
    Did you write this shader, or are you using someone else's shader? Did you use Shader FX, or another tool?
    If you made the shader, please post a screenshot of the shader graph.
    Have you tried detaching the object, removing the Multi/Sub-Object material, using just a single DirectX material?
    I used 2014 and 2011 (final scene must be in 2011), problem is the same. I didn't make this shader, but I must use exactly this shader (for my test task).

    Yes, I tried detach it, nothing helps :( But V-RayMtl without DirectX works)


  • thomasp
    Options
    Offline / Send Message
    thomasp hero character
    you could try detaching the affected bits, export to obj, reimport, apply the shader again. dies it make the difference?
    another attempt: restart max, start a fresh scene, import the geometry from obj, apply the shader, does it work now? if so, try merging it with your existing scene, see what it does. sometimes scene files just end up cursed for whatever reasons. ;)
  • yhlytk
    Options
    Offline / Send Message
    thomasp said:
    you could try detaching the affected bits, export to obj, reimport, apply the shader again. dies it make the difference?
    another attempt: restart max, start a fresh scene, import the geometry from obj, apply the shader, does it work now? if so, try merging it with your existing scene, see what it does. sometimes scene files just end up cursed for whatever reasons. ;)
    Nope, it doesn't work. I think now, only way, to fix it - remodel this part. But I'm not sure, that it'll help.
  • thomasp
    Options
    Offline / Send Message
    thomasp hero character
    better to take another look at all aspects of your object - uv coordinates, uv channels, normals, any unusual properties or visibility options set (although OBJ should have taken care of that). reloading the shader, .... if you can't figure out why this particular object breaks then what to do if it happens again elsewhere.
  • Eric Chadwick
    Options
    Offline / Send Message
    Check the vertex color and vertex alpha for that mesh. Usually they should be white and 100%.
  • yhlytk
    Options
    Offline / Send Message
    thomasp said:
    better to take another look at all aspects of your object - uv coordinates, uv channels, normals, any unusual properties or visibility options set (although OBJ should have taken care of that). reloading the shader, .... if you can't figure out why this particular object breaks then what to do if it happens again elsewhere.
    Hm, I understand this, but now I fill absolutely frustrated :(
    UV-channel 1 (Diff) is OK - when I assign VRayMtl there are no problems with diffuse. UV - channel 2 (Lightmap) seems OK to me too - I tried to assign it as diffuse to detached object - all parts fit appropriate parts of mesh. 

    May be you can give me an advise about OBJ-export settings, should I do smth unusual there?

  • yhlytk
    Options
    Offline / Send Message
    Check the vertex color and vertex alpha for that mesh. Usually they should be white and 100%.
    I'm not sure, I did it correctly, but it didn't change anything: I applyed VertexPaint modificator and fill Vertex Color and Vertex Alpha channels with white color / erase all - both ways did no changes
  • Eric Chadwick
    Options
    Offline / Send Message
    Collapse your modifier stack, to eliminate any problems from multiple Modifiers, sub-object selections, etc.

    Convert your mesh into Editable Poly, if it isn't already.

    Go into vertex selection mode, select all the vertices, find the Vertex Properties rollout, set Color to white, change Alpha to 100%.
  • yhlytk
    Options
    Offline / Send Message
    Collapse your modifier stack, to eliminate any problems from multiple Modifiers, sub-object selections, etc.

    Convert your mesh into Editable Poly, if it isn't already.

    Go into vertex selection mode, select all the vertices, find the Vertex Properties rollout, set Color to white, change Alpha to 100%.
    I tried it just now with whole scene and with detached part - nothing changes, maybe problem is not with vertex color. :(  
  • Eric Chadwick
    Options
    Offline / Send Message
    I would contact whomever made the shader and ask about this.
  • Eric Chadwick
    Options
    Offline / Send Message
    You mentioned nothing has any alphas. Can you double-check that your diffuse bitmap has no alpha channel?
  • yhlytk
    Options
    Offline / Send Message
    You mentioned nothing has any alphas. Can you double-check that your diffuse bitmap has no alpha channel?
    :) !!! You saved me! Thank you so much!
    Obviously I forgot to delete it after creating the texture only for this sub-object (and this alpha-channel wasn't full 0_o).

Sign In or Register to comment.