tag:blogger.com,1999:blog-3237601924105701672024-02-19T14:30:28.485-08:00A Technical Artist's BlogUnknownnoreply@blogger.comBlogger5125tag:blogger.com,1999:blog-323760192410570167.post-21424295434600860672012-07-06T10:30:00.000-07:002012-07-13T17:18:58.943-07:00CyberStrike - Breaking Ground<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-xovnb9Ue-86v6lPus17VzgbyVO7yotPPmrTD0UVoXK35wMclZOvGEbGqB0CtMF4jsozApCzNsclEftqC8am5cW0NYIuNICZwdYuZejaJik1JTMxQHLYvqd5PmFe8-G1QV3Kz11DYz3fw/s1600/Concept_NodeView.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-xovnb9Ue-86v6lPus17VzgbyVO7yotPPmrTD0UVoXK35wMclZOvGEbGqB0CtMF4jsozApCzNsclEftqC8am5cW0NYIuNICZwdYuZejaJik1JTMxQHLYvqd5PmFe8-G1QV3Kz11DYz3fw/s400/Concept_NodeView.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">CyberStrike Concept Art</td></tr>
</tbody></table>
In addition to using this blog as a technical-art dump, I'm also going to be using it as a development blog for a project i'm working on in my spare time called "CyberStrike".<br />
<br />
Whenever I hear someone say the words "We are going to make this awesome mod," or "I have an idea for a game," 99 times out of 100, the scope of their project is just too unrealistic for it to ever get finished. Most of the time it's because there is some lofty gameplay goal that can't be achieved without an experienced programmer, or it might be because there's no incentive for anyone on your team to actually do what you want when you want them to do it. In other words, the lack of discipline. These are all very real problems that I knew that i'd encounter if I ever wanted to start my own game project. Furthermore, because i'm actually employed by a game company, I could never actually finish a title and get it published by some other company without getting fired and then sued into oblivion. So how am I going to get this game made with those kind of obstacles? Read more to find out.<br />
<br />
<br />
<a name='more'></a><br />
<br />
<br />
Ever since I was 16, I've been learning the ins and outs of 3d modelling and modding. There wasn't anything that I wasn't willing to learn. I was like a sponge when I was in college, soaking up information everywhere that I could. If there was something that I didn't understand, it would drive me insane until I had a firm grasp on the concept. This attitude still persists in me today, and that flame for knowledge burns brighter now than it ever has before. This passion for understanding every facet of the game development pipeline is what I believe has led me down the path of being a Technical Artist. However, there has always been one facet of game development that I have not been familiar with. And the lack of knowledge in this particular area is what has been stopping me from creating my own game prototype.<br />
<br />
The area of development i'm talking about is programming and scripting. I know enough about everything else, but I don't know much about actually coding a game and making it all work, and it's been quite an obstacle for me when it comes to doing the things that I really want to do. Luckily I've been able to teach myself the basics of scripting with all of the MAXScript stuff I was doing back when id Software was having me do absolutely nothing for 4 months after RAGE shipped. After that, I thought to myself, "Well, if I can do this, I can probably do UnrealScript." After I made that call, I had to make sure that I didn't fall into the trap of biting off more than I can chew with whatever project I wanted to undertake. I really wanted to keep the scope of the project small, so I decided that instead of making a full fledged game, I would focus on developing a small prototype that would feature basic gameplay elements that will define the game. Furthermore, The art style would have to be something that was unique and polished, but also something that wouldn't take me 2 years to produce by myself. Keeping all of that in mind, I decided that the best genre of game to try and make was that of a top down shooter. Something similar to geometry wars, but instead of just a crazy shooter, It would be fun to focus more on strategy.<br />
<br />
Enter CyberStrike. A top-down, cyber-techno-punk shooter that takes place in cyberspace. Artwork heavily influenced from Ghost in the Shell's depiction of cyberspace, as well as fantasy user interfaces from Minority Report, Tron: Legacy, and anything from Stark Industries. I want the game to feel like a visual representation of the player "hacking" his way through a series of advanced defensive AIs on a quest to disable some kind of oppressive AI construct that's censoring the internet. The story is simple enough and the art style is unique (As far as I know), and it's drawing from an already successful game (Geometry Wars). In my opinion, if I actually finish this prototype, I think it has a good chance of actually getting released. However, who's going to release it?<br />
<br />
This is the part of the planning process where I realized I only have two options. The first option is that my place of employment makes it. Since i'm employed there, I can't shop the game around to publishers or else i'll be fired. So I've decided to develop the game in my spare time on my own as a personal project, and when it's done, i'm going to attempt to pitch it to the awesome guys who run my company. If the pitch fails, I can always just release the game for free to the community. Either way, people will get to play the game, and I get to keep my job. These are the only two realistic options that I have that allow me to stay employed at such an awesome studio.<br />
<br />
So, like I said before the jump, I'm going to be using this blog to talk about the development of CyberStrike whenever I make a big update. I'll be talking about some of the challenges I've faced and discuss the solutions that I've come up with. Hopefully it'll help some people who are trying to get their own project off the ground.<br />
<br />
I'll leave with a video that shows the current state of the project. Cheers!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/XF16r-wdS70?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<br />
<br />
<br />Unknownnoreply@blogger.com8tag:blogger.com,1999:blog-323760192410570167.post-64242983496831212702012-01-19T19:13:00.000-08:002012-01-19T19:14:25.450-08:00Gradient Mapping - An Awesome Way to Get Cheap Variation in TexturesI was reading over the<a href="http://www.valvesoftware.com/publications/2010/GDC10_ShaderTechniquesL4D2.pdf"> Left4Dead 2 zombie variation techniques</a> when I read about how they used gradient mapping to add crazy amounts of variation to their zombies. In the FX world, we used to use gradient mapping for things like fire and clouds to get some interesting color transitions, but I don't remember ever hearing about people using it for anything other than that, since it's a relatively difficult concept to grasp unless you have someone show it to you. Not only that, but once you decide to use gradient mapping in your workflow, you have to have a custom shader written for it, and you need to educate your character artists on the best way to texture their assets so that they will work well with the gradient mapping technique.<br />
<br />
I thought this was a great idea, and it was clearly the most optimal method to get variation among vast numbers of zombies in that game. So I started wondering what the possibilities would be if I applied the same technique to general props in the environment. First i realized that whatever scene you were making would have to justify using this unorthodox technique. In other words, I wouldn't really use the technique unless I had a scene where I really needed to re-use texture assets and have a high amount of color variation. I wouldn't use this technique to make a bunch of different brick textures, because frankly i think it would be a bit unnecessary. However, I would use this technique if I had to make something like a market, where you'd need lots of different fruits, spices, and other various props that you may want to reuse with different colors.<br />
<br />
Since there's going to be a bazaar in my scene, i realized that gradient mapping would fit perfectly for generating a large amount of various colors for bazaar booths that reuse the same assets over and over, but in different scales and colors. This is a perfect opportunity to test this technique out, so I started doing some tests.<br />
<br />
First, lets talk a little bit about how gradient mapping works in the first place. All gradient mapping does is substitute the value of a pixel in your gradient mask (the black and white image) with the color from your Gradient Map. So if half of your gradient mask is composed of black pixels, then those will be substituted with the color from the gradient map that corresponds with that black value. I tried to lay out a visual guide of what happens, which you can see below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikKxsy83Pbvq2_wxHvZL3YlLLw_O7tcNuZXUEkar43E8ydOL9O3k9rRwtNua93nfBTUtA8noHqjfQNELB-EkU_MsGgw2L6lIKljmxN1MnFgKJX_SvThhrOwwbCZT2lK7MoYWIpEwe3jGPT/s1600/figure_B.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikKxsy83Pbvq2_wxHvZL3YlLLw_O7tcNuZXUEkar43E8ydOL9O3k9rRwtNua93nfBTUtA8noHqjfQNELB-EkU_MsGgw2L6lIKljmxN1MnFgKJX_SvThhrOwwbCZT2lK7MoYWIpEwe3jGPT/s1600/figure_B.jpg" /></a></div><br />
Think of GradientMask_A as a constant. This is ALWAYS how you are going to visualize how the engine will interpret your gradient map. The reason for this is because when gradient mapping is applied in the engine, we are actually using the X channel of our texture coordinates as our base "lookup" table. This will always look like GradientMask_A, because the X channel of the texture coordinate data is always going to be 0 to 1, which will always be visualized as a gradient starting with black on the left that changes to white on the right.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCfsx6x9tysV4i61Zynwu3GUdUz7w3A9g72JwgUlKpsPsDT7uEPuoJur9CNtAi557bXxQFr900zelonAuC0hF4onMwI-7UUq8RZfn2S4xkZUhE_f_sPdWyp4Xt3_tFNP42RNgQgzWH2AFm/s1600/figure_C.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCfsx6x9tysV4i61Zynwu3GUdUz7w3A9g72JwgUlKpsPsDT7uEPuoJur9CNtAi557bXxQFr900zelonAuC0hF4onMwI-7UUq8RZfn2S4xkZUhE_f_sPdWyp4Xt3_tFNP42RNgQgzWH2AFm/s400/figure_C.jpg" width="400" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><br />
This is probably the hardest part to really understand about how gradient mapping works in a game engine. Think of GradientMap_A as the map we'll be importing into the engine. When we apply a gradient mask to this, what it is doing is looking up the UV coordinates of our gradient map, and taking the color value of that pixel and mapping it to any pixel in our gradient mask that corresponds with that value in UV space... so really, a gradient mask is simply an 8 bit 2D texture coordinate map!<br />
<br />
So now that we know that the standard black to white gradient is a constant that won't change, we can start calling it our "Gradient Coordinate Table". Lets look at some actual examples of what a decent gradient map can achieve.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD_FhkUMCZ1bvozotL3ur5JwrONDHZfB_CkAiHP_ut-WB7In_RQZKVL8XU12hDu419SaupjAgOooq2YSDEr2weIHtMen4ZoC9Rgo_ZVGU7N1axLZFP83qE28cslIQSIlNQ2vcq3Wtgqh1e/s1600/figure_D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD_FhkUMCZ1bvozotL3ur5JwrONDHZfB_CkAiHP_ut-WB7In_RQZKVL8XU12hDu419SaupjAgOooq2YSDEr2weIHtMen4ZoC9Rgo_ZVGU7N1axLZFP83qE28cslIQSIlNQ2vcq3Wtgqh1e/s640/figure_D.jpg" width="241" /></a></div><br />
<div style="text-align: left;">The black and white image at the top is our Gradient Mask. Notice how most of the wood is given a whiter value. This means that the colors to the right of the gradient map will be assigned to those white values in the gradient mask. It's simply replacing the values of the gradient mask with the colors in the gradient map. However, since you can only have 256 values from white to black, I think this means that you can only have a MAXIMUM 256 colors applied to your texture when using this gradient map technique. For this reason, your gradient map's optimal resolution is 256 units wide. Again, I could be wrong about that, but I don' think I am. The height of the gradient map depends on how many gradients you want to store into your gradient map table. a good rule of thumb is to have each of your gradient maps be 16 pixels high by 256 units wide. So if you have 8 gradients in your map, your resolution should be 256x128. The 8 pixel thickness is to maintain a decent color integrity during mip-mapping. If you're running low on texture budget, another thing you could do is just made each gradient 256 x 1 pixel, and make sure that your gradient map never gets mip mapped to lower resolution in game, or else you'll get errors.</div><br />
Here is an example of the gradient map i'll be using as a demonstration. It's 256X64<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaoxs91YX06ppcvrPdB2BpLAAB08-JcPTuuhccJzoHyJjTdv9jZrEPP87fkdXk6k0Yl8gPf3Mk8QXLD07zogpLVO18u0SBfnljwEGXVe8sCxJVawTSnoVeKNGUG7P3yAsNMIC3LbjO8jpw/s1600/figure_E.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaoxs91YX06ppcvrPdB2BpLAAB08-JcPTuuhccJzoHyJjTdv9jZrEPP87fkdXk6k0Yl8gPf3Mk8QXLD07zogpLVO18u0SBfnljwEGXVe8sCxJVawTSnoVeKNGUG7P3yAsNMIC3LbjO8jpw/s1600/figure_E.jpg" /></a></div><br />
<br />
When you assemble the shader in UDK you get pretty much the same result you see in Photoshop.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWL6fApIIjQw3dVDSEV9hNUHjCzWrOyk9RbrNkb9zp3kWg2-JwWuUU-MDioCTwEt9q0gj2Hbjo4FbiC-umwM3fe08Irp1phNMeS9bpVBtzHES26RTyZbC1_WJie5In8S0waqTsIarm7MUQ/s1600/figure_G.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWL6fApIIjQw3dVDSEV9hNUHjCzWrOyk9RbrNkb9zp3kWg2-JwWuUU-MDioCTwEt9q0gj2Hbjo4FbiC-umwM3fe08Irp1phNMeS9bpVBtzHES26RTyZbC1_WJie5In8S0waqTsIarm7MUQ/s400/figure_G.JPG" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><span style="text-align: left;"><br />
</span></div><div class="separator" style="clear: both; text-align: justify;"><span style="text-align: left;">The node labeld Y-Coordinate is the coordinate along the gradient map texture... so setting it to 0.7 would set it just about along the lines of the 3rd gradient down, which gives us what we see in the shader preview window. It's a pretty easy setup too. </span></div><div class="separator" style="clear: both; text-align: left;"><br class="Apple-interchange-newline" /></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">If you want to learn a bit more, check out Valve's power point on the subject that I linked at the top of the post.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">Cheers!</div><div class="separator" style="clear: both; text-align: center;"><br />
</div>Unknownnoreply@blogger.com11tag:blogger.com,1999:blog-323760192410570167.post-71874643308851384222011-12-07T16:32:00.000-08:002017-10-21T08:07:17.941-07:00Making Quick macroScripts in 3DS Max<br />In this post, i'm going to show you how to create a quick max script.<br />
<div>
<br /></div>
<div>
<a name='more'></a><br />
<br />
A macroScript is essentially a script that you can execute with a button, or by assigning it to a hot-key in max. They are extremely easy to make, and I'm going to walk you through the steps of doing it. First we are going to make the script and map it to a button in a custom floating toolbar. Then after that, we'll edit the appearance of the button, and bind it to a key.<br />
<div>
<br /></div>
<div>
We're going to make a script that takes the current object in the selection, and set its position to the origin in world space. In other words, the object that is selected will be moved to [ 0, 0, 0 ] in world space coordinates. I'm making this script because I find myself typing "0, 0, 0" into the bottom coordinate bar all the time, and i'm sick of doing it. It takes like 3 seconds and a couple of clicks to do it, but we can cut those seconds and mouse clicks out of the workflow by making a button that does it all in one stroke. </div>
<div>
<br /></div>
<div>
The first step is to go to the Customize drop down menu in 3DS Max, and click on Customize User Interface. This will bring up a window with a bunch of options on it. Click on the "Toolbars" tab, and over there on the right side you'll see a button that says "New". Click that. </div>
<div>
<span class="Apple-style-span" style="font-size: x-small;"><br />
</span></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFHplzDFqwHT9EPHnhf3SOtyf9xpF4uJ3ipZCAjQX1ATOCE5uZXg-9PLCqcLQ50NP5EYU7nLhNHAH_VTQojXpHpvO9LSdA6EjfxVJYtjfF5xPj-yj2wRdMzLn7onUFgD3vbg6FEf-6wH7F/s1600/pic2.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="392" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFHplzDFqwHT9EPHnhf3SOtyf9xpF4uJ3ipZCAjQX1ATOCE5uZXg-9PLCqcLQ50NP5EYU7nLhNHAH_VTQojXpHpvO9LSdA6EjfxVJYtjfF5xPj-yj2wRdMzLn7onUFgD3vbg6FEf-6wH7F/s400/pic2.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">I made a large, condescending red square to show you where to click. </td></tr>
</tbody></table>
<div>
When you click the "New" button, you'll be prompted to name your Toolbar. This will create a new tiny, empty toolbar for you to place custom buttons on.<br />
<br /></div>
<div>
Next, go ahead and go to the MAXScript tab, which should be directly next to the Customize tab you clicked earlier, and go to MAXScript > New Script. This will bring up the fancy Max Script editor, which will be where we write our script. After that, go ahead and hit F11, or go to MAXScript > MAXScript Listener. this will bring up the MAXScript Listener, which is a super useful tool that will help you debug your script as well as output commands you perform in Max as you do them. If you don't see the Macro Recorder section, just go to your MAXScript listener's Macro Recorder drop-down menu, and click "Enable". If you still don't see it, it may be because it has been scrunched up at the top, so you'll have to drag the section down a bit to see it. It should look like this.</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiAXQI3lpchpyh6UA2OuzUUTF1pBwt7UYjUlLF7X6zj3jNZAzf6F1JW6kHvpMm9R9-Uhp8iPYRgswh4pETWGDALZrr5CpLsCs6qnbbSI_uPmk7Fm2p-MDs1xsdf5v_u7eBOxmrKt5TZMzH/s1600/pic3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiAXQI3lpchpyh6UA2OuzUUTF1pBwt7UYjUlLF7X6zj3jNZAzf6F1JW6kHvpMm9R9-Uhp8iPYRgswh4pETWGDALZrr5CpLsCs6qnbbSI_uPmk7Fm2p-MDs1xsdf5v_u7eBOxmrKt5TZMzH/s320/pic3.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
To clarify, the white space is for debugging, and testing small blocks of code. The downside is that there isn't any syntax highlighting in this window. The window with the pink background color is the macro recorder, and as you do stuff in Max, the corresponding script command will appear in this window. This will help you figure out most commands just by looking at it. In many cases, you can simply copy/paste text from this window, and make a script out of it with very few modifications. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
So if you have an object in the scene like a box, and you move it around, you'll see that a bunch of commands appear in the macro recorder that say something along the lines of "move $ [45.7762,0,0]". Lets break this down really quick. "move" is the method used to move nodes around in 3D space. It takes 2 arguments. The object being moved, and a vector that tells the script how many units to move it by. the "$" character represents the selected objects in the scene. The vector is a list of 3 floating number values that represent the X, Y, and Z axis respectively. The syntax for a vector is always in square brackets like this: [10, 0, 0]. So in other words, when we see the command "move $ [45.7762,0,0]", we know that it means in literal terms, "move the selection on the X axis 45.7762 units". Pretty easy, eh? </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Unfortunately, we can't use the move command to achieve what we want, because the "move" command is for offsetting the object from it's initial position. In order to actually SET the position of the object we want, we have to access it's position, and change it through script. To do this, go ahead and select an object in your scene and type into the bottom listener window, "$.pos" and hit enter. If all goes well, you'll get a 3 point vector that represents the position of the selected object's XYZ coordinates.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmlniSvTBBH7K-iDEsDoT7IaDqhEqP3fnE-QJzz_OmjtRjnGJwXhksOsURY43pzvD7LqszmPZBL-eSQwd-FJWjzT-wtsLQRZYUsYfDyUb1WivGyC18GZvmFoy7_VFlgr3mVCGDhaPhf1Qa/s1600/pic4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmlniSvTBBH7K-iDEsDoT7IaDqhEqP3fnE-QJzz_OmjtRjnGJwXhksOsURY43pzvD7LqszmPZBL-eSQwd-FJWjzT-wtsLQRZYUsYfDyUb1WivGyC18GZvmFoy7_VFlgr3mVCGDhaPhf1Qa/s1600/pic4.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
You can modify the position of your selected object by simply typing something like $.pos = [0,0,0] . Here you are actually modifying the position of the selected object by providing a point in world space for it to move to. So remember that little toolbar that we made earlier? The one named after Tim "The Toolman" Taylor? Well.. go ahead and highlight that line of code ( $.pos = [0,0,0] ) and drag and drop it into the toolbar. If it works the way it should, you should now see an icon in that toolbar. When you click it, it should execute the block of code you just dragged up there. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now I want you to right click on the newly created button and go to "Edit MacroScript". This will bring up the actual code for the button in your MAXScript Editor. You should see this:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjph8loPaNxVkzN24vC6kej0RdcffWBkjRJqngUYYLbKM-2plnfSg_ZNxRI0xv-kgcEPzHNlbOvBrDNPvMFa6Q_fmVx9OdD-KzXZc6ilqrzkKWlptQwF-aJh82L1uDVkjKGQicZS3kFJq9z/s1600/pic5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjph8loPaNxVkzN24vC6kej0RdcffWBkjRJqngUYYLbKM-2plnfSg_ZNxRI0xv-kgcEPzHNlbOvBrDNPvMFa6Q_fmVx9OdD-KzXZc6ilqrzkKWlptQwF-aJh82L1uDVkjKGQicZS3kFJq9z/s1600/pic5.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The term macroScript in bold blue type is what defines the actual command. The word Macro after it is what the command is called. You can change it to something like "CenterWorld", the "category:"DragAndDrop" is where the command will show up in the customize user interface menu. The Tooltip is this yellow box that appears when you mouse over the button. Feel free to change these to whatever you want. For this tutorial i'll just leave the values as default. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
You may need to close your customize user interface window and re-open it again to see the changes, but now you should be able to see your new command under the "DragAndDrop" category in your MainUI Group. Now you can bind this to a key, and simply snap your selected object to the origin whenever you want. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
ProTip: If you try using the command when there's more than one object in your selection, you will probably get an error. To fix this, edit your script so that instead of saying "$.pos = [0,0,0]", make it say "selection.pos = [0,0,0]".</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
If you want to learn more about Max Script... please head over to <a href="http://vimeo.com/album/1514565/page:1">http://vimeo.com/album/1514565/page:1</a> and check out this guy's tutorials. They are very concise and to the point, and are way better than anything you'll learn concerning MAXScript on this blog.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<br /></div>
</div>
Unknownnoreply@blogger.com4tag:blogger.com,1999:blog-323760192410570167.post-12458057187119586842011-12-04T03:14:00.000-08:002011-12-04T22:11:16.571-08:00The Beauty of Tiling Trim Textures<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgblESVIFU55_ORRRrMd_-tHeDo-oyNVd2RZcaIbr-0EMK38IQH0-frZK0PAzMURxaiIjLfdd3RltDqLC29CKmuMiB7ulwQG_p_TmjO3cS8llb94qaSsY1EUhxEU44-CxGdQWeIA85eY5wS/s1600/1242011_C.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgblESVIFU55_ORRRrMd_-tHeDo-oyNVd2RZcaIbr-0EMK38IQH0-frZK0PAzMURxaiIjLfdd3RltDqLC29CKmuMiB7ulwQG_p_TmjO3cS8llb94qaSsY1EUhxEU44-CxGdQWeIA85eY5wS/s320/1242011_C.JPG" width="320" /></a></div><br />
I've been working on The Pit for over a year now. Unfortunately, work has been insanely slow because of multiple distractions and procrastination, but every once in a while I'll catch a creative wind that gets me excited to work on the project again.<br />
<br />
Anyways, what's got me excited this time around is the sudden realization that tiling textures play a major role in in large scale environments. Well, I guess I've always known the importance of tiling textures, especially since I've done so much work with them when I was working for Digital Extremes on The Darkness 2. I specifically remember doing pretty much all of Jackie's Mansion (the exterior parts) with tiling textures. When it comes down to it, using tiling textures is the only way to maintain a high fidelity texel density across your whole scene, without going overboard on memory consumption. Don't get me wrong, I think that creating unique pieces for the focal points and other specific areas is definitely warranted, but should be used sparingly.<br />
<br />
<br />
<a name='more'></a><br />
<br />
<br />
That was the problem I had with The Pit; I created too many unique assets that couldn't really be re-purposed, and wound up modeling my way into a corner. I burned myself out, because I wasn't getting the modularity I wanted with those specific models. They were only useful in certain situations, and I wanted more than that. The time I was putting into the scene wasn't returning enough satisfaction... so I put the project on hold up until recently.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_h_6JUJP2yHcaW554rUAg4yTQv2MkvhaGKtn3eHPKMKEDPVarSE6WWZo4VMa0O78dZfTBCYPnsYmF82PlFUaRfYvXr4ynuNtjWNOhkVsQkKv8J9ja4HxV2gaMTHDmwDJjEVGg5P5hP_P7/s1600/1242011_A.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_h_6JUJP2yHcaW554rUAg4yTQv2MkvhaGKtn3eHPKMKEDPVarSE6WWZo4VMa0O78dZfTBCYPnsYmF82PlFUaRfYvXr4ynuNtjWNOhkVsQkKv8J9ja4HxV2gaMTHDmwDJjEVGg5P5hP_P7/s320/1242011_A.JPG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Notice the meshes designed for radial use. They were modeled for this one unique area. <br />
And therefor can't be used in other areas</td></tr>
</tbody></table><br />
<br />
When I picked up the Wacom tablet for the first time in months, I figured that the best thing to do was start making assets that would either work like lego pieces, or enable me to quickly create architectural elements that would work like lego pieces. I was also getting sick and tired of making high poly assets and baking down normals, because that takes too much time for someone who doesn't have it. So I went through my texture library and mustered up all of my tiling textures to see what i had to work with.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuVdpU3ZgxWUtXcu4maP-YfLAk13zFWqtumsWVuD3Hq-fvB9G-Rf0AeMieGSAhBIU53Ze9-0zrBGK9xIFww4j_R60MSHVfTpsHmKBzGIl80qUNfo8fRUdrhhyphenhyphenMt25p8bNMyjvW8tiGVFXo/s1600/1242011_B.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuVdpU3ZgxWUtXcu4maP-YfLAk13zFWqtumsWVuD3Hq-fvB9G-Rf0AeMieGSAhBIU53Ze9-0zrBGK9xIFww4j_R60MSHVfTpsHmKBzGIl80qUNfo8fRUdrhhyphenhyphenMt25p8bNMyjvW8tiGVFXo/s320/1242011_B.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">(bottom right image is made up of 3 layers that are made visible<br />
via vertex colors of the mesh that it's applied to.)</td></tr>
</tbody></table><br />
There isn't much on these initial set of textures to really use as trim, other than some of the horizontal patterns on the top right texture. The only thing to do at this point was to make a couple more tiling textures whose sole purpose was to be used as trim, or repeatable patterns on a mesh. As a result, I created a texture with nothing but horizontal, tiling patterns that could be re-arranged via UV space to form several different patterns to be used on architecture.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg8jdMIQvRMToM7VO-Cmp2E27O0vNaGmOesnL1IFboqU3XmvZb0gQ7yOlibM8qMw54_GGaqWaK3UPQ9PrJyQEb5ywpg6sRjY2pdjxD09v0rS8J2_-BrDgWe1DhU9Os9Hf1ev2ZulJ93CLl/s1600/1242011_D.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg8jdMIQvRMToM7VO-Cmp2E27O0vNaGmOesnL1IFboqU3XmvZb0gQ7yOlibM8qMw54_GGaqWaK3UPQ9PrJyQEb5ywpg6sRjY2pdjxD09v0rS8J2_-BrDgWe1DhU9Os9Hf1ev2ZulJ93CLl/s320/1242011_D.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Tiling Texture, designed to be used as trim. </td></tr>
</tbody></table>I now have a decent library of textures to start quickly creating and texturing architectural assets. However, another thing I wanted to try and do was create an actual mesh who's sole purpose was to be bent and shaped to create window trim and doorway trim. With this asset i should be able to get high fidelity custom shaped assets that would fit perfectly as decorative trim.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfGKBditOwML8cSCUNU0nUuOzTxOHUWYZ-ILn6PHxfYpHuiSY8gcnYSf8TTsnfaLqAfNbe6YnfyBtbts-30dDpk8N0gUA94YCgr8lQy4wusLkhfyf7pCML1PZ_idtdaJckCYePby3UPEwk/s1600/1242011_E.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="199" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfGKBditOwML8cSCUNU0nUuOzTxOHUWYZ-ILn6PHxfYpHuiSY8gcnYSf8TTsnfaLqAfNbe6YnfyBtbts-30dDpk8N0gUA94YCgr8lQy4wusLkhfyf7pCML1PZ_idtdaJckCYePby3UPEwk/s320/1242011_E.JPG" width="320" /></a></div><br />
After about 30 minutes of messing around with my trim textures, I was able to come with a much more visual appealing style of wall architecture to use as a decent base. See below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs2BYkPMbE0LlIKcVFLBZBdZ6Z49GUPsgXutop5xadEamPdiVvJqpQ8OIyF914jzRVhSlVDi6GlCq_neDLbWRvXKQFWnanEuYYhNWiqZDwu41mLAMKCG3vUpUa13Me2Jb-VvwslkM-m5ta/s1600/1242011_F.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="148" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs2BYkPMbE0LlIKcVFLBZBdZ6Z49GUPsgXutop5xadEamPdiVvJqpQ8OIyF914jzRVhSlVDi6GlCq_neDLbWRvXKQFWnanEuYYhNWiqZDwu41mLAMKCG3vUpUa13Me2Jb-VvwslkM-m5ta/s320/1242011_F.JPG" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div><br />
Looking forward, creating more complicated pieces will be much quicker and much easier now that I have some high quality tiling textures to work with. Thanks for reading.Unknownnoreply@blogger.com10tag:blogger.com,1999:blog-323760192410570167.post-19122672933727473922011-12-02T12:19:00.000-08:002011-12-04T03:15:23.261-08:00Hello World!This post marks the first of many (hopefully) in which i'll be discussing personal game art. Look forward to reading about workflows, tools, and tutorials.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div>.Unknownnoreply@blogger.com