Home Coding, Scripting, Shaders

Tech Artist - What are you working on: FOREVER Edition!

1151618202156

Replies

  • Norman3D
    Offline / Send Message
    Norman3D polycounter lvl 14
    Very nice man!
    I don't even know where to start scripting something like this. Do you have any pointers?

    Keep up the great work!
  • mLichy
    It wasn't that hard actually. I just used the MeshProjectIntersect I believe, to get the closest point on a mesh and go from there. It stores geo info in Voxels to get positions fast.


    On a side note, i've been working on some retopo tools to put into that UI. Doing the Edge Extrude was a sob, but I got it like 95% good. Sometimes it flips, as you will see, so im not sure how i'd solve that.

    http://www.matthewlichy.com/retopoTools/retopoTools.html
  • Norman3D
    Offline / Send Message
    Norman3D polycounter lvl 14
    mLichy wrote: »
    It wasn't that hard actually. I just used the MeshProjectIntersect I believe, to get the closest point on a mesh and go from there. It stores geo info in Voxels to get positions fast.


    On a side note, i've been working on some retopo tools to put into that UI. Doing the Edge Extrude was a sob, but I got it like 95% good. Sometimes it flips, as you will see, so im not sure how i'd solve that.

    http://www.matthewlichy.com/retopoTools/retopoTools.html

    Thanks for the tip!

    I noticed in that video that the edge flips once it's bellow the sphere's equator. You are taking the sphere's normal into consideration, right?
    Perhaps, since it's bellow the equator the normal points down (thus a minus value somewhere?) And that might affect the edges negative orientation?
    Just a very wild guess.
  • Farfarer
    mLichy wrote: »
    Oh man, where were you about a month ago when I was doing tedious multiple mesh intersection snapping with Max's crappy snap tools. This is brilliant stuff.
  • mLichy
    ^ Thanks dude!

    Norman: Yeah, that might be because of it. Although I'm creating the face via vertexes in a certain order all the time, so i think sometimes its just the wrong order. So I'm going to try not to create a face, if the Normal.Z is < 0 (Flipped, I think), then re-create the face another way.
  • mLichy
    I think I'm on the right track, I got it flipping now more often the proper way, but it still flips the wrong way sometimes....

    I think Im going to try and do a distance check now. Take 1 vert, check the 2 new verts and see which ones closest and build a face based on that. Although I still will prob get a flipped face sometimes...
  • mLichy
    I got my retopo tools about good now. I ended up just letting the user hit Alt + Left click to flip the Edge, which after u do it once during a session, it seems to be good from then on. Trying to have the script detect it was not working at all.....

    Since I changed to another interface as well, now you can do Ctrl + Left click to remove edges, and Shift + Left mouse Scales the Brush Size.

    You can use Modifiers with this tool, like Turbosmooth while creating new edges.

    http://www.matthewlichy.com/retopoTools2/retopoTools2.html
  • mLichy
    Also just added a method, so if you hold Ctrl while moving the mouse, now it selects the nearest edge, so u can change directions and keep working without exiting.
  • Norman3D
    Offline / Send Message
    Norman3D polycounter lvl 14
    sweet man! You should upload your videos to youtube so I can find them later on :P
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    Norman3D wrote: »
    sweet man! You should upload your videos to youtube so I can find them later on :P
    promoting this, as YT is the fastest streaming video server I know. The videos on your site take ages here to buffer.
  • mLichy
    Oh really? It loads fast for me. I don't use Youtube usually because it takes like 30 min or so to even view it online, same with Vimeo. Unless they changed it.

    But ya, YT might be better for more views too. Ill upload them to

    http://www.youtube.com/user/mLichy911?feature=guide
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    I am just guessing but you are from Germany? The Telekom seems to have some backbone issues there to the main YT pipe. Its part of the reasons why they asked for network fees for big content providers to help out extending their network.
    Here in Sydney (AU) YT is quite unmatched, snappy and fast - no buffer interruptions at all.

    And yes plus you might get a better spread with you videos & it gets easier to share / embed.
  • mLichy
    I'm from USA, Washington State.
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    So yesterday this idea for a script came into my head where you could preview how a group of objects tiles based on a defined size tiling plane. I figured this would be useful for creating some sort of object pattern to bring into zbrush for sculpting, it could also be used after to layout the sculpted objects for baking (but this script as you will see isn't written very efficiently, so I would be afraid to try this very high poly meshes).

    The script spits out errors that have to do with the shader group I have assigned and constraining my instances, but it still works as I intended.

    I should have probably done something to group the instances when they are created because it clutters up the root of the scene, and makes them harder to delete.

    I'm not much of a scripter, and you will see that by looking at my code, I have cobbled various snippets together from various sources, but hopefully this might spark someone to make a version of this with much better functionality :)

    The script can be downloaded here:
    http://www.acowan.com/files/scripts/acTiling.py
    Default tiling is very large (been working with UDK Units), but you can just change it in the code.

    And here is how it works, (images are better than a wall of text)
    tilingscript.png
  • Mark Dygert
    I'm not a technical artist but I do write scripts from time to time, mostly just to save myself from "death by momentous task". This time around I got tired of shuffling objects around renaming materials and triangulating meshes when I was exporting to UDK. So I wrote a quick, simple little script that handles that stuff for me.

    FBXport
    http://www.polycount.com/forum/showthread.php?p=1504963#post1504963

    There could be some egregious code etiquette I didn't follow or a smater way to handle parts of it and I would love to hear how it can be done better or differently.
    (
        curObject  = $
        curObjectName = $.name
        curObjectPos = curObject.position
        exportfolder = maxfilepath + "Exports\\" 
        exportpath = exportfolder + curObjectName
        
    [COLOR=YellowGreen]     -- Create Exports folder if it doesn't exist[/COLOR]
        if doesFileExist exportfolder  == false do (makedir exportfolder)
    
    [COLOR=YellowGreen]     -- Moves the object to the world 0 0 0 node[/COLOR]
        curObject.pos = [0,0,0] 
    [COLOR=YellowGreen]
        -- Changes the material name to match the object name[/COLOR]
        curObject.material.name = CurObject.name 
        [COLOR=YellowGreen]
        --Add the "turn to  poly" and limit the number of sides to 3[/COLOR]
        modPanel.addModToSelection (Turn_to_Poly ()) ui:on 
        curObject.modifiers[#Turn_to_Poly].limitPolySize = on 
        curObject.modifiers[#Turn_to_Poly].maxPolySize = 3
    
    [COLOR=YellowGreen]     -- Exports the object as fbx with default settings[/COLOR]
        exportFile exportpath selectedOnly:true #noPrompt 
        
    [COLOR=YellowGreen]     -- get rid of turn to poly modifier[/COLOR]
        max modify mode
        deleteModifier curObject 1 
    
    [COLOR=YellowGreen]     -- moves object back to original position[/COLOR]
        move curObject curObjectPos 
    )
    
  • mLichy
    Nice ^.

    Even though it might be somewhat simple to do stuff like this sometimes, or seem simple, its always nice. I do these sorts of things. All that kind of stuff can save alot of time/headache in the end/over time.
  • leslievdb
    Offline / Send Message
    leslievdb polycounter lvl 15
    indeed sometimes a couple of simple scripted actions can save you a shitload of time ^^

    nice work guys
  • mLichy
    For example, Max doesn't let u convert UV Verts to Mesh Vert selection, that I know of, so I made a script to do it for someone while at Turn10.

    He had a ton of rotated/scaled elements in an object for Grass, and they were uneven in Z, so it was basically impossible to select all the upper verts normally, but using UV Verts, they all were overlapped the same, so it made it 100x easier and faster than selecting them normally, and the script was really fast to make.
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Awesome stuff going on in here, especially you mLichy. Dont have Max on me but is the source code available for the shirnk wrapper and stuff? My end I have been playing with webgl and got phong shading model in. Using three.js engine to remove the extra crap needed to initialize webgl etc just so I can get down to prototyping faster. Ignore the half lambert thing on the side, need to do a selection gui thing soon. Hoping to take this to a full fledged model viewer but just adding stuff slowly to it.

    http://dl.dropbox.com/u/391285/modelviewer/index.html

    EDIT: O and spec is broken (gamma stuff). Its on the to do list of which there is a lot haha. Need to code up a JSON exporter for Maya for quicker exporting.
  • mLichy
    ^ Thats cool!

    I don't have the tool up for download yet. Although If you don't have Max, it probably wont do u much good for another app. I'm using built in Voxel Methods to do the projection to make it fast/accurate. I do want to learn how to make my own Voxel method someday though and not have to rely on any built in methods.
  • mLichy
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    mLichy wrote: »
    For example, Max doesn't let u convert UV Verts to Mesh Vert selection, that I know of, so I made a script to do it for someone while at Turn10.

    He had a ton of rotated/scaled elements in an object for Grass, and they were uneven in Z, so it was basically impossible to select all the upper verts normally, but using UV Verts, they all were overlapped the same, so it made it 100x easier and faster than selecting them normally, and the script was really fast to make.

    good idea

    although I think you can do it by making the selection in the UV editor and then popping an edit poly on top of the unwrap modifier without dropping out of subobject mode - it definitely works on faces at least
  • mLichy
    ^ Hmm... yeah if it works on faces i'd assume it works on Verts. My script sort of does that, it collapses the UV down to Poly though and sets the Vert selection if I remember right.
  • Norman3D
    Offline / Send Message
    Norman3D polycounter lvl 14
    Cool stuff guys!

    Tonight I did a bit of Z-scripting in notepad! yay!

    [ame="http://www.youtube.com/watch?v=oi-AufylRPY&quot;]http://www.youtube.com/watch?v=oi-AufylRPY[/ame]

    Edit: spelling, going to sleep now hehe
  • mLichy
  • Gestalt
    Offline / Send Message
    Gestalt polycounter lvl 11
    I was inspired by this post on gradient mapping http://technical-eden.blogspot.com/2012/01/gradient-mapping-awesome-way-to-get.html so I decided to try it on a shader. I have no idea if this is how gradients would normally be used for shading, but I think it's cool.

    Gradient shading:
    A9mMg.jpg

    The gradient is clamped in the x and y. You can stack multiple gradients on one texture and change between them using the y value. I'd imagine this could be used as a fast way to have multiple unique shading types with a lot of direct control. I have no idea about performance but the gradient texture is 256 across.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    A guy at work showed me how to get started with Actionscript....

    http://www.laurenscorijn.com/Sirius.swf
    (Keep refreshing, it's always different!)

    So i'm making a spaceship game now! Haven't been having this much fun in years, right now I've got some really cool code that builds a procedural bitmap, from tiny fighters to huge capships. Plus it also builds a designation and name that reflect the ships (future) stats.
    Movement code is totally whack, I spent 5 minutes on that so far. Been focusing on the random algorithms for now.
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    mLichy wrote: »
    ^ Thats cool!

    I don't have the tool up for download yet. Although If you don't have Max, it probably wont do u much good for another app. I'm using built in Voxel Methods to do the projection to make it fast/accurate. I do want to learn how to make my own Voxel method someday though and not have to rely on any built in methods.

    ah. Yeah I should look into how to do ray projections in Maya. Maybe might see if the Live tool has some answers hidden in the documentation somewhere.

    @Xoliul: Thats looking cool. Mind elaborating on the building ships from a bitmap? Definitely interesting.
  • C86G
    Offline / Send Message
    C86G greentooth
    Just a small question:
    How come there a visible seams on my model with a normal map (from xnormal) when rendered with standard scanline in Max but NOT when I display the Model in realtime with Xoliul shader?
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    C86G: Because the tangent spaces are different. If it's fine with a shader, be glad. Scanline is NOT what most games look like and shouldn't be used at all for game art imo...

    Haidda: Sure man, it's based on this guy's work: Dave Bollinger Pixel Spaceships (page died, hence wayback). Basically you just create a sort of mask texture for random values: some pixels are always solid, some never, some have a random chance (those make the big difference in shape)
    I improved it quite a bit so it's not restricted to 12x12 pixels. If the ship's a multiple of 12, it generates a base array, then rescales it and does another pass. There's still a bug where it skips pixels if the multiple is 3 or 6 though (easy to fix).
    Also the names are linked with the size now!
  • C86G
    Offline / Send Message
    C86G greentooth
    Thankx Xoliul. The Xoliul SHader did a perfect job. I was just testing the standard scanline renderer for fun. But good to know everything is fine if Xoliul Shader shows so : )
  • mLichy
    Decided to try my hand at some AI in 3DS Max. Spent like an hr on this. Playback is slow though, Camtasia had a problem for some reason, but its smooth realtime in viewport otherwise.

    http://www.youtube.com/watch?v=qm39PHVfEAQ&feature=youtu.be
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    you certainly learned the wrong language for doing awesome things like that. Something like that screams though more like Unity or AS3. Nice stuff
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    Hey Renderhjs, have you used Pixel Bender in Actionscript yet ?
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    Xoliul wrote: »
    Hey Renderhjs, have you used Pixel Bender in Actionscript yet ?

    yes and its to slow for what I needed. With stage 3d there seems to be a new run with shaders on screen space that you can use and or pixel bender 3d filters that seem to run at good performance. But I haven't looked into those yet.


    Btw. also flash related, this weekend is GameJam, I prepared this prototype of Adobe AIR that supports up to 16 game controllers.

    fd_gameJam_gamepad_in_AIR.gif

    I have 3+ xbox360 controllers, 2 SNES USB and some logitech gamepads lying at my desk - and it works flawless :)
    It uses a native process extention in AIR 3.1 which is a way of AIR (AS3 the language in my case) communicating with native compiled executables. Will post some pictures from my camera tomorrow of the hardware setup as it looks kinda crazy.
    As for the gameJam I obviously don't know yet what the theme will be but I want to make a 4 player game with 4 gamepads all hooked into 1 computer.
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    You mean too slow to continuosly update ? I'd use it as a pre-process solution only, to generate my graphics from perlin noise and so.
    I do find it a bit rough around the edges, and the toolkit is a bit sub-Adobe-standard, it has more issues than any other of their products I've ever used.

    Those controllers are interesting, but you can only get access through those when using AIR, right ? Not with just Flash running in browser >
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    that's right, but adobe is working on it to make it work even in the browser. Its actually only available in AIR TV (the AIR version that is bundled with some TV remote hardware boxes). I had to find a different way via the native extensions, will release some code after the GameJam.
  • mLichy
    Yes, Maxscript is wrong for it, hehe. I'm just messin around. I might try my hand at it in Unity or something though.
  • mLichy
  • e-freak
    that is the best thing i've ever seen in max :D how much code is this?
  • mLichy
    Just using RayCasts and Distance < > treshholds.

    I have Path Constrains working now somewhat, although its a bit choppy and not always 100%. But I wanted it to be able to wander yet and also avoid moving targets yet without freaking out or looking too static.

    http://www.youtube.com/watch?v=pq6GjVK4qbw&feature=youtu.be
  • Xoliul
    Offline / Send Message
    Xoliul polycounter lvl 14
    I got random planets working, out of a single Perlin noise function!

    http://www.laurenscorijn.com/Sirius.swf
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    gamepad setup with 4 hooked up controllers communicating with Adobe AIR

    gamjam_gamepad_setup_prepare.jpg

    that's my desk at work, I am using FlashDevelop to compile my Actionscript stuff.
  • SpeCter
    Offline / Send Message
    SpeCter polycounter lvl 14
    Nestea, we got another fellow IceTea drinker over here :D

    These are not original snes controllers right? If they are, how are they connected?
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    they are USB SNES gamepads, a co-worker brought them in for me. Each cost around $ 10,- so a cheap bargain. They feel like the real thing and have the same type of buttons but simply connect via USB.
    And yes hot days here gotta drink cool stuff.
  • NBLM
    Offline / Send Message
    NBLM polycounter lvl 13
    I'm writing on a C library to control 8x8 bi-color(red and green) dot matrix modules.
    I have ten pieces, should be big enough for a decent clock?
    [ame="http://www.youtube.com/watch?v=NRALAQnRt9E&amp;feature=g-upl&amp;context=G29845d2AUAAAAAAAAAA&quot;]8x8ledMatrix.mp4 - YouTube[/ame]
    Yes this should be a greentooth
  • mLichy
    ^ Thats awesome. I've always been interested in doing things like that.
  • Spatz
    Offline / Send Message
    Spatz polycounter lvl 13
    Norman3D wrote: »
    Cool stuff guys!

    Tonight I did a bit of Z-scripting in notepad! yay!

    http://www.youtube.com/watch?v=oi-AufylRPY

    Edit: spelling, going to sleep now hehe


    wow thats so cool! ...do you plan release GoUVlayout like GoMax?
  • Norman3D
    Offline / Send Message
    Norman3D polycounter lvl 14
    Spatz wrote: »
    wow thats so cool! ...do you plan release GoUVlayout like GoMax?

    I released it on friday! Forgot to post it here.

    Download

    I might do Zbrush<->Topogun next :)
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    My GameJam Game this year: Quadroid

    This years theme was the Ouroboros snake. I worked with iLKke (who works with me at soap creative) on this game within 48 hours.
    I used as prototyped before on the gamepad input: adobe AIR and stage3d hardware acceleration using the starling framework. The game uses booth analog sticks on a xbox controller (walking and aiming). Game mechanics work in that sense that you can attack and shield in only one direction but are exposed on the other side for attacks.
    All the motion is scripted (head nudging, particles,..) and I am quite happy with the result.

    QuadDroid_progress_day3_0.jpg?1327804877

    [ame="http://www.youtube.com/watch?v=tEoJWIZzPKA&quot;]Quadroid Sydney GameJam 2012 - YouTube[/ame]

    I uploaded the source code because I couldn't manage to compile the AIR app into an standalone version (native extention issues with AIR 3.1). There are some instructions on how to compile it for those that are interested, warning sloppy code :)
    http://globalgamejam.org/2012/quadroid
1151618202156
Sign In or Register to comment.