Archive for the ‘Portfolio’ Category

Dotnet+Maxscript+GDI

I have been learning and using dot-net in 3ds max a lot recently. I think its time i show some of my learnings in Dot-net GDI . Here is an example of using a dot-net label as progress bar with GDI. I tried to replicate the look of pre-max9 polygon counter as asked in tech-artist.org forum(here).

(
global _dupPolyCounter
try (destroyDialog _dupPolyCounter) catch()

rollout _dupPolyCounter "Duplicate Polycounter" width:250
(
	local _min = 100,_max =200
	group "Progress Test"
	(
		label _bdgt "Budget:" pos:[20,25]
		spinner spn_max "" pos:[65,25] range:[100,1000,_max] width:55 type:#integer
		label _crnt "Current:" pos:[140,25]
		spinner spn_val "" pos:[185,25] range:[1,spn_max.value,_min] width:55 type:#integer
		dotnetcontrol lbl "label" height:10 width:200 pos:[25,50]
	)
	local acolor = dotnetclass "system.drawing.color"
	
	mapped fn dispose gdiobj =
		(
			gdiobj.Dispose
		)
	on lbl Paint args do
	(
		local margin = 2
		graphics = args.graphics
		width = ((lbl.clientRectangle.width)/40)
		_val = ((float(_min)/_max)*40)
		X = lbl.clientRectangle.X+margin
		Y = lbl.clientRectangle.Y+margin
		for i = 1 to _val do
		(			
			rect = dotnetobject "System.Drawing.Rectangle" X Y (width-1) (lbl.clientRectangle.Height-2*margin)
			_col = acolor.green
			if i > 35  then _col = acolor.red else (if i>27 then _col = acolor.yellow else _col = acolor.green)
			foreBrush=dotnetobject "System.Drawing.SolidBrush" _col
			graphics.FillRectangle foreBrush rect
			X += width
			dispose #(foreBrush)
		)
	)
	on spn_val changed val do
	(
		_min = val
		lbl.invalidate()
	)
	on spn_max changed val do
	(
		_max = val
		spn_val.range = [1,spn_max.value,_min]
		lbl.invalidate()
	)
 	on _dupPolyCounter open do
	(
		lbl.backColor = lbl.backColor.Black
	) 
)

createDialog _dupPolyCounter
)

I hope to post more snippets in future..

Post Effects Vision Shader

Started learning some shader writing in HLSL and 3ds Max recently. Here is my first shader. Its a post effects shader for 3ds max. I tried to get the night vision and thermal vision effects using this shader. So here’s what i have got.

You can view the same video at http://www.youtube.com/watch?v=wXxdq_mFAzg

The shader uses 2 gradient maps for Thermal Vision and Night Vision. I have added control for Black level adjustment, which controls the blackness in the scene(as shown in the video).

Currently working on Detail Normal Shader for 3ds max, will post it soon.

Self-Promotional Plug Alert!

The NormalMap Widget Script that i had created has been added to polycount wiki. Thanks EricChadwick for adding it. I have also added some decent images to the post.

Read it here – http://wiki.polycount.com/wiki/Normal_map#Pre-Created_Templates

Scripts release(Select Non-Planar and Broken Wall Creator)..

Lately i have got some request for the Broken Wall Creator script, so finally got time to make it releasable. It has got some bugs so please bare with it and comment here if found any. Use only the top view to create the broken wall because of some bugs.
Someone on Tech-Artist.org wanted a script to select non planar faces. I had a script that was written a while back so thought of releasing it as well.
Please download the scripts from
Broken Wall Creator
Select Non-Planar Faces

Installation Instructions for Select Non-Planar Faces
————————-
* Drag and Drop Select_NPR.mzp in to 3dsMax viewport.
* From the Customize User Interface menu option you can now assign Select_NPR to a Toolbar. The command is located in the “Akira Scripts” Category.

NormalMap Widget for 3ds Max

Been busy learning to create forms using dotnet in maxscript. Earlier today stumble across Steev “kobra” Kelly’s tutorial for easily creating normal map details in 3ds max and use photoshop to add it to a base map. So thought of writing a script for quick normal map renders based on the tutorial.

Steps for usage:
1. Run the Script :D. Find it in Customize User Interface->Toolsbar->Catogery->Akira’s Scripts-> NormalWidget
[singlepic id=17 w=128 h=96 float=]
2. Select the Highpoly and hit setup.
[singlepic id=18 w=128 h=96 float=]
3. Scale the highpoly to fit the template plane.
[singlepic id=19 w=128 h=96 float=]
4. Hit render and save the image.
[singlepic id=20 w=128 h=96 float=]
5. Use it to add details in the base map. Idle to create a library of normal maps for using across objects like nuts,bolts,cracks,etc.

[singlepic id=21 w=128 h=96 float=]

6.Enjoy.

Hopefully will include render size options in the next update. Suggestion are welcome.

DOWNLOAD:
NormalMapWidget
NormalMapWidget(Mirror Link)

Some Old Game-Art..

Finally found time to revisit some old work.

LowPoly:

[imagebrowser id=1]

HighPoly:

[imagebrowser id=2]

MentalRay Utility Gamma Adder..

This script was written for a friend who had a scene with 150 textures and wanted to add Utility Gamma & Gain(MI) for every diffuse texture. Thought this might be useful for MentalRay users out there.

Features:
– Adds Mental ray Gamma and gain utility to the diffuse map channel, only if a bitmap texture exists.
– Currently adds only for Arch and Design,Standard Material and Multi Material in the diffuse map channel.

Download Link:
http://www.scriptspot.com/3ds-max/mentalray-utility-gamma-adder

Broken Wall Generator..

Here is a little maxscript inspired from Gunnar Radeloff’s demo reel(here). It generates a broken wall from an interactively drawn curve or a existing shape. Options to control wall width, no. of columns, brick width, height and length. Will be adding more features in future.

Best PC Game of the Year(India) and Featured in Autodesk Game Reel

Ghajini, The Game for which i was the Level Editor and Technical artist has won The Golden Cursor Animation award for the Best PC Game 2008-09. And the game has also been featured in Autodesk GDC Games Show reel 2009.
Wow…. I am very excited. I am very proud to be a part of the game and the company i’m working with FX Labs.

https://photos.app.goo.gl/WFyu4HHA3SCAtG3C6

Links:
Ghajini- The Game
About the Award
The Golden Cursor Animation Awards

M1 Abrams Tank Model and Rig

This is a model of M1 Abrams Tank made in 3ds max. Its a highpoly model done for practice and i tried to rig the tank threads. The video shows the threads rig done mostly with scripted controller, i tried to automate the process as much as i can with self detecting terrain for wheel placement and rotation of threads and wheel controlled by a spinner on main controller. Tnx for watching.

https://photos.app.goo.gl/NNicVbPHkAf8dJm36

From Tank Render
From Tank Render
From Tank Render
From Tank Render

Tank Thread Rig from akram on Vimeo.

Return top