Page 1 of 2 12 LastLast
Results 1 to 15 of 26

Thread: Is there a "if else node"?

  1. #1
    Space Monkey 3DGFXStudios's Avatar
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    3,121

    Is there a "if else node"?

    Is there a "if else node"? Would be handy I there was
    If not... Can someone make it

  2. #2
    Red Mage Celshader's Avatar
    Join Date
    Feb 2003
    Location
    Burbank, California
    Posts
    1,817

    Lightbulb Please consider the Logic node (Add Node->Math->Scalar->Logic)

    Quote Originally Posted by 3DGFXStudios View Post
    Is there a "if else node"? Would be handy I there was
    If not... Can someone make it
    For the Node Editor, please consider the Logic node (Add Node->Math->Scalar->Logic). There's an example of its use here:
    http://lightwiki.net/wiki/How_to_***...esided_surface

    Scroll down to the "Assigning different indexes of refraction to each side of a doublesided surface" section.
    Jen's 3D -- LightWave stuff.
    Jen's 2D -- my comic book.

    Python is my smashing board. LightWave is my S.M.A.K.

  3. #3
    Space Monkey 3DGFXStudios's Avatar
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    3,121
    Oh nice that was what I was looking for. Thanks!

  4. #4
    Space Monkey 3DGFXStudios's Avatar
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    3,121
    What I actually need right now is a Logic node with more operations. What I need is an AND + OR option. Like this for example: A Equal to B OR C OR D etc. Can someone make such a node? Would be nice to have the option to dynamically add the amount of options A B C D E F G etc
    Last edited by 3DGFXStudios; 03-11-2012 at 03:28 PM.

  5. #5
    Code Muppet evenflcw's Avatar
    Join Date
    Feb 2003
    Location
    Stockholm, Sweden
    Posts
    2,642
    Obviously you could use several logic nodes but I get that you want to avoid that. So how do you imagine or prefer this node to work? Should it add a new input so there is always one unoccupied available?
    Last edited by evenflcw; 03-11-2012 at 04:10 PM.

  6. #6
    Super Member XswampyX's Avatar
    Join Date
    Aug 2010
    Location
    Kernow
    Posts
    2,078
    http://www.lwplugindb.com/Plugin.aspx?id=95ec157b

    AS Math Node has two nodes. Logic1 and Logic2. Don't know what they do as they are 32bit.

    Might be what your after?

  7. #7
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,613
    Quote Originally Posted by 3DGFXStudios View Post
    What I actually need right now is a Logic node with more operations. What I need is an AND + OR option. Like this for example: A Equal to B OR C OR D etc. Can someone make such a node? Would be nice to have the option to dynamically add the amount of options A B C D E F G etc
    I've got one like that... unfortunately it is a part of the (commercial) shaderMeister (in this case designed to ease filtering depending on a variety of criteria, but a generic boolean node is included as well)..

    Cheers,
    Mike

  8. #8
    Space Monkey 3DGFXStudios's Avatar
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    3,121
    Here a quick mockup I did. I'm a bit sleepy a the moment so maybe I made stupid mistake. Feel free to tell me if I did , but I think this would be very handy. The logic node is really nice especially in the nodal motion editor.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	SuperLogic_Node.jpg 
Views:	88 
Size:	101.4 KB 
ID:	102534  

  9. #9
    Space Monkey 3DGFXStudios's Avatar
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    3,121
    Quote Originally Posted by Lightwolf View Post
    I've got one like that... unfortunately it is a part of the (commercial) shaderMeister (in this case designed to ease filtering depending on a variety of criteria, but a generic boolean node is included as well)..

    Cheers,
    Mike
    Oh Mike! You are a hero again. Does it do something similar to what I made up in Photoshop just yet? Seems like you read my mind even before I did. I'll check it tomorrow
    Last edited by 3DGFXStudios; 03-11-2012 at 06:06 PM.

  10. #10
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,613
    Quote Originally Posted by 3DGFXStudios View Post
    Oh Mike! You are a hero again. Does it do something similar to what I made up in Photoshop just yet? Seems like you read my mind even before I did. I'll check it tomorrow
    No, a lot simpler. But since you can chain them together...

    It is also meant to be used in conjunction with the filter node, which is essentially an if ... else.

    Cheers,
    Mike
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	BooleanGUI.png 
Views:	56 
Size:	14.1 KB 
ID:	102536   Click image for larger version. 

Name:	FilterNodeGUI.png 
Views:	73 
Size:	15.6 KB 
ID:	102537   Click image for larger version. 

Name:	FilterNode.png 
Views:	53 
Size:	1.9 KB 
ID:	102538  

  11. #11
    Code Muppet evenflcw's Avatar
    Join Date
    Feb 2003
    Location
    Stockholm, Sweden
    Posts
    2,642
    Wow, that AS_Math_Nodes has alot of goodies! Thanks for mentioning it.

    His Logic2 node allow two comparisons. So you'd still be one short and need to use a secondary node for the last one.

  12. #12
    Space Monkey 3DGFXStudios's Avatar
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    3,121
    Quote Originally Posted by XswampyX View Post
    http://www.lwplugindb.com/Plugin.aspx?id=95ec157b

    AS Math Node has two nodes. Logic1 and Logic2. Don't know what they do as they are 32bit.

    Might be what your after?
    Unfortunately I don't use a 32bit version of lightwave.

  13. #13
    Space Monkey 3DGFXStudios's Avatar
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    3,121
    Hey Mike, your node also only makes one comparison right? What I'd like to do is compare a lot of different value's in one single node. It's a lot easier to see whats going on when it's all happening in one node. I need at least 12 comparisons

  14. #14
    obfuscated SDK hacker Lightwolf's Avatar
    Join Date
    Feb 2003
    Location
    Stuttgart, Germany
    Posts
    13,613
    Quote Originally Posted by 3DGFXStudios View Post
    Hey Mike, your node also only makes one comparison right?
    Yup... you want more then you can daisy chain them... which also allows you to change the order quickly.
    Quote Originally Posted by 3DGFXStudios View Post
    What I'd like to do is compare a lot of different value's in one single node.
    It would make the user interface a real pain to design as it's quite tricky to dynamically add controls to a XPanels GUI (which is the one that allows for embedding).
    Unless there's a pop-up to select on of the x comparisons and a common area to edit the individual operation.

    Cheers,
    Mike

  15. #15
    Space Monkey 3DGFXStudios's Avatar
    Join Date
    Sep 2005
    Location
    Earth
    Posts
    3,121
    Quote Originally Posted by Lightwolf View Post
    Yup... you want more then you can daisy chain them... which also allows you to change the order quickly.

    It would make the user interface a real pain to design as it's quite tricky to dynamically add controls to a XPanels GUI (which is the one that allows for embedding).
    Unless there's a pop-up to select on of the x comparisons and a common area to edit the individual operation.

    Cheers,
    Mike
    It's not really necessary to add the comparisons dynamically, a pop-up will do fine. I just thought of it as a screen space saver. It could work like the DP_Extra buffer nodes do with a pop-up that gives you access to 1-10 11-20 21-31 or something like that.

    Chaining logic nodes in a way that they work like a AND OR really confuses
    me even just with one extra comparison

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •