Page 1 of 12 12311 ... LastLast
Results 1 to 15 of 166

Thread: Kryslin's lScripts

  1. #1
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,526

    Kryslin's lScripts

    Since I seem to be posting these things all over the place, I'd figure I'd start a thread down here and post (repost) them here...

    First up is the BiasComb and Bias Show tools...
    BiasTools.zip

    BiasShow has been updated to handle vertices that don't have a bias map assigned to them.

    The zip file contains two lscripts; BiasComb and BiasShow.

    These are both fire-and-forget lscripts for use in Modeler.

    Bias Comb Usage :
    1) Hide the geometry you don't want to have combed (Not really necessary, but why take chances?).
    2) Run lscript
    3) If the model has no existing bias maps, choose (new), and enter a name in the text box. Otherwise, choose an existing bias map
    ***The script cannot tell the difference between a bias map and one re-mapped to the 0...1 domain. Things could get ugly if you choose
    ***the wrong bias map. The remapped version this script produces ends with a "_rm".
    4) Choose a surface to comb away from.
    5) Choose which surfaces to comb (ctrl-click to select multiples)
    6) Choose how the bias vector gets computed; either vector addition, or interpolation between the vertex normal and the computed bias vector. Vector addition gives results closest to Sasquatch quick combing.
    7) Choose whether you want to overwite the existing map, or average the new bias map with the existing one. If you are generating a new map, it will lock in overwrite, whether you choose it or average.
    8) Press "OK".
    9) Wait. It's slow, I know. I wrote this to be as memory friendly as possible, so very little gets loaded into arrays.
    10) Done!

    Multiple passes of combing are supported. By creating a box or sphere, you can hide various portions of geometry, choose average, and brush away from the surface you assigned to you brushing object.

    Usage of Bias Show:
    1) Select some polygons or vertices.
    2) Run lscript.
    3) Choose your bias map.
    4) If you have a weight map for fur length, you can choose it. If not, select Fixed.
    5) Press Ok.
    6) 2pt. Polygons representing the bias vector stored in the selected map are created in the first background layer available.
    7) Done!

    The geometry in the background layer is disposable, and least for now.

    I hope people find these useful, or at least amusing. It's been tested on Lightwave 2015.3, and should work on 11.6.3.
    I make no guarantee for suitability of purpose. Use at own risk. Free to distribute. If you modify it, I'd like a copy of the change.
    I've stomped most of the bugs. If you find one, let me know.

    Neither of these scripts likes malformed geometry, so no 1 & 2 pt polygons. The results aren't pretty.
    (I'll be working on correcting this later. Got more alpha testing to do for someone...)
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  2. #2

  3. #3
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,166
    The script seems to work here but the Bias Show script gets interrupted by this:

    Click image for larger version. 

Name:	Capture.PNG 
Views:	190 
Size:	75.2 KB 
ID:	136716

    When I close the debug window, the script continues and finishes creating the visual guides. Not sure why it does that but I thought you should know.

  4. #4
    Registered User Oldcode's Avatar
    Join Date
    Jan 2004
    Location
    Boston
    Posts
    414
    Hey Kryslin,

    So, these tools are to comb hair in Modeler, yes? Also, what exactly is a Bias Map? I don't think I've ever heard the term before. Sorry for my ignorance.

  5. #5
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,526
    Because I had the debugger enabled. Grrr...

    Open BiasShow.ls in notepad (or similar), and either delete the debug(); statement, or put a // in front of it, and save it. I'll update the zip file...

    I can be sooooo stooopid!
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  6. #6
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,526
    Quote Originally Posted by Oldcode View Post
    Hey Kryslin,

    So, these tools are to comb hair in Modeler, yes? Also, what exactly is a Bias Map? I don't think I've ever heard the term before. Sorry for my ignorance.

    A Bias map is a type of RGB vertex map that has vector information stored in it. You can see what a Bias Map looks like under the surface window -> advanced->vertex color map menu item. Fiber FX uses it to determine the directions hair 'grows'. You use BiasComb to generate the map, and send the object to layout. Under Styling, there's an option to use a Bias Map. Click the remapped option if you're using a bias map whose values have been remapped to the 0...1 range. You can also choose how strong the effect of the bias map is.

    The overall effect is similar to Sasquatch's Quick Combing. With the right placement, you can get fur "just right" with only a single combing pass.

    - - - Updated - - -

    Updated Zip:
    BiasTools.zip

    Debug line squashed.
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  7. #7
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,166
    I got it to work in Layout. Just a 'junky' test so nothing exciting to show. But it does work!

    For anybody new to using the Bias Map feature in FiberFX, look under the Styling tab and apply the map from the list at the bottom. You also need to turn up Direction Bias before you see anything in the render. (Just crank it up to 100% and adjust from there as needed.)

  8. #8
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,166
    @Oldcode, the old FiberFX Strand Modeler (in Modeler) can also be used to generate a Bias Map. Strand Modeler does not 'auto comb' like Kryslin's tool does, but if you need specific direction control, it's another option. I used this a few times years ago to quickly knock out hair for a few background characters.

    @Kryslin, Thanks for creating these scripts Steve! I think these tools are going to be very useful additions to my FiberFX toolkit.

    BTW, I tried the latest and the debugger no longer pops up. Yay!

    Will play with this more when I get home tonight.

  9. #9
    Super Member Kevbarnes's Avatar
    Join Date
    Nov 2006
    Location
    Gloucestershire UK
    Posts
    509
    - Not sure where to post this, but I'll stick it here for now. - This shows an additional use of your script -

    Just used you excellent 'Show Bias' to generate fiber guides.

    Click image for larger version. 

Name:	1_GenerateGuidesFromBiasMap.JPG 
Views:	259 
Size:	66.0 KB 
ID:	136718 Click image for larger version. 

Name:	2_ExtendingGuidesForFeatherShape.JPG 
Views:	261 
Size:	94.8 KB 
ID:	136719

    As the guides are generated from the bias map they are automatically grown at the combed root angle which has saved a bit of time

    I used a weight map of 10% to get an initial short guide then add 5 more nodes using Strand tool. this gives me 6 nodes per fiber to shape the feathers (as detailed in a previouse post). This is not necessary if you only need fur

    The benefit of fiber guides is that get dynamic simulation on them from Bullet or LW dynamics.
    "one rig to rule them all"
    PC Spec: Intel i7 X980 3.33GHz | 24Gb | ATI FirePro V5800 | W7
    https://vimeo.com/kevbarnes/showreel
    https://littlstar.com/kevbarnes
    https://www.talenthouse.com/kevbarnes

  10. #10
    Super Member Kevbarnes's Avatar
    Join Date
    Nov 2006
    Location
    Gloucestershire UK
    Posts
    509
    Quote Originally Posted by Kryslin View Post
    Updated Zip:BiasTools.zip
    Not sure i'm installing latest version - biascomb has same version 1 in header.
    "one rig to rule them all"
    PC Spec: Intel i7 X980 3.33GHz | 24Gb | ATI FirePro V5800 | W7
    https://vimeo.com/kevbarnes/showreel
    https://littlstar.com/kevbarnes
    https://www.talenthouse.com/kevbarnes

  11. #11
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,166
    I think it was just Bias Show that was updated in the last one, for the Debugger error.

  12. #12
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,526
    Yes, it was just Bias Show that was updated. I don't even think it has a version number.

    And gee, someone figured out another use for Bias Show.
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  13. #13
    Super Member JohnMarchant's Avatar
    Join Date
    Mar 2003
    Location
    Murcia, Spain
    Posts
    3,018
    Thanks allot indeed.
    Dell XPS 15
    15.6-inch (3840 x 2160) 4K 282ppi IPS LCD
    Intel i7 7700HQ 2.8GHz
    Windows 10 64Bit
    NVidia GeForce GTX 1050 Ti
    1TB SDD
    32Gb Ram

    LightWave 2019.03

    Very nice Laptop

  14. #14
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,526
    Should have a small update to both tomorrow.

    I've made the remapped bias map generation optional, and added versions to the menus to both.
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  15. #15
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    7,166
    Looking forward to it.

    I meant to try Bias Tools on my 'Brudders' characters this weekend and compare it to the FiberMesh and Edit Guides versions. I suspect it will hold up respectably well, especially for how little effort it takes to use the tool. Maybe I can run that test after you release the next build.

Page 1 of 12 12311 ... 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
  •