Omy Posted January 20, 2013 Share Posted January 20, 2013 Hi I want to have different textures applied to each side of the box. there are copies of box and i want also to have the texture to be as a texture sequence how this can be done using a shader or as using a color map. I have a two sided texture material would be great if some one could help with my setup double_sided_textures.hipnc Quote Link to comment Share on other sites More sharing options...
sanostol Posted January 20, 2013 Share Posted January 20, 2013 You shader right now is twosided but with respect to the normal, what is correct when reading title of this topic. when You invert the primitives they render the second texture. but in the text it seems more like you want to have different textures per primitive(side) of the boxes. without taking the normal into consideration. if this is the case there are several ways to do this . Like: -You can assing a primitive variable that contains the prim id and then use that variable to switch between textures at the render (in vex) -You can assign a primitive string variable per polygon that contains the path to the teuxture You want on that side and use this variable to drive the texture map parameter at the render stage Quote Link to comment Share on other sites More sharing options...
Omy Posted January 21, 2013 Author Share Posted January 21, 2013 hmm basically i have two sets of image sequence.one side of a box has to have one sequence and other side of the box has to have other set of sequence could anyone share a setup Quote Link to comment Share on other sites More sharing options...
sanostol Posted January 21, 2013 Share Posted January 21, 2013 one way of doing it two_textures.hip Quote Link to comment Share on other sites More sharing options...
Omy Posted January 21, 2013 Author Share Posted January 21, 2013 hi Martin, could you tell me where the images are pointed.I see that there is only one texture map,but in the render the result looks ok for one box.. and also how to make this work if there a copies of box.i want to have each random textures as an image sequence applied to front and back side of the boxes Quote Link to comment Share on other sites More sharing options...
Omy Posted January 21, 2013 Author Share Posted January 21, 2013 hi Martin, could you tell me where the images are pointed.I see that there is only one texture map,but in the render the result looks ok for one box.. and also how to make this work if there a copies of box.i want to have each random textures as an image sequence applied to front and back side of the boxestwo_textures_o1.hip Quote Link to comment Share on other sites More sharing options...
bloomendale Posted January 21, 2013 Share Posted January 21, 2013 hi Martin, could you tell me where the images are pointed.I see that there is only one texture map,but in the render the result looks ok for one box.. and also how to make this work if there a copies of box.i want to have each random textures as an image sequence applied to front and back side of the boxestwo_textures_o1.hip Examine Material SOP (/obj/box_object1/material1). There is one local override of the "map" parameter in shader which points to a different texture map. Quote Link to comment Share on other sites More sharing options...
sanostol Posted January 21, 2013 Share Posted January 21, 2013 yes it happens in the materialSOP. You can use that geometry as input to the copysop, open a detail view to better see what happens on the primitives Quote Link to comment Share on other sites More sharing options...
Omy Posted January 21, 2013 Author Share Posted January 21, 2013 aah and is there a way to apply this concept to be applied for the image sequnce Quote Link to comment Share on other sites More sharing options...
sanostol Posted January 21, 2013 Share Posted January 21, 2013 texture sequence just means adding $F to the path, for exampel for the sequence "texture.0001-0100.exr" it means texture.$F4.exr again I'm not sure if that is what You ask for Quote Link to comment Share on other sites More sharing options...
Omy Posted January 21, 2013 Author Share Posted January 21, 2013 hi yes.thats what I am trying for.. Quote Link to comment Share on other sites More sharing options...
sanostol Posted January 22, 2013 Share Posted January 22, 2013 did it work for You ("texture.$F.exr) Quote Link to comment Share on other sites More sharing options...
Omy Posted January 22, 2013 Author Share Posted January 22, 2013 Humm not yet.. Dont know whats wrong with my setup two_textures_o2.hip Quote Link to comment Share on other sites More sharing options...
Omy Posted January 23, 2013 Author Share Posted January 23, 2013 any fix? Quote Link to comment Share on other sites More sharing options...
Omy Posted January 25, 2013 Author Share Posted January 25, 2013 would be great if someone could correct my setup cheers Quote Link to comment Share on other sites More sharing options...
Omy Posted January 31, 2013 Author Share Posted January 31, 2013 bump Quote Link to comment Share on other sites More sharing options...
anim Posted January 31, 2013 Share Posted January 31, 2013 so you have 2 sequences and want to have front sides of boxes as random frames of first sequence and back sides as random frames of 2nd sequence? here is very simple way of doing that (I used butterfly sequence for both, but feel free to replace them with different ones) two_textures_fix.hip 1 Quote Link to comment Share on other sites More sharing options...
Omy Posted February 1, 2013 Author Share Posted February 1, 2013 (edited) thank u very much Tomas edit: having one more question why the textures on sides are distorted any fix for that? Edited February 1, 2013 by Omy Quote Link to comment Share on other sites More sharing options...
anim Posted February 1, 2013 Share Posted February 1, 2013 you mean side faces of the box? there are literally no uvs on them for now (0,0,0), but you can just add them to the box prior to copy there is as well no texture assigned to them (which can put weird rubbish in there), you can do that by filling in the map parameter on your shader or assign to map attribute as it's done for front and back or you mean front and back sides? the whole face will be in 0-1 uv space (back is actually in 1-2, but that doesn't matter it you use tiling, default) so unless that faces aspect ratio matches the image aspect ratio, it will be distorted so you can either correct the ratio of the box or manipulate uvs Quote Link to comment Share on other sites More sharing options...
Omy Posted February 1, 2013 Author Share Posted February 1, 2013 cool, i assigned map attrib for other faces as well. thank you :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.