ZBrushCentral

Zbrush to Unity - Model viewer Tutorial

Tired of Modeling?
Have no way to show off your hard work?
Take a break and build yourself a custom coded model viewer in Unity (A now free game engine at unity3d.com).

Don't know how ? Best time to learn starts now. Here is a quick example [Click here](http://www.houseoftutorials.net/3dturntables/) Hit go, and adjust the speed and the whirling begins. The tutorial will show you the GUI building / Static Variables / Model Exporting and more. Enjoy

(Hint the HD button makes the video 100 times better)

[youtubecp]/p/E3519744BD0B4DF2&hl=en_US&fs=1[/youtubecp]

Very nice.
Thanks for your contribution.
Can you offer the scripting in a document, so I dont have to type it all and subject myself to errors…

Also, I watched your videos, and could you offer the code for changing models?
Super kind of yah

It would be cool to be able to switch between materials too, like ambient occlusion map etc, but I guess you coiuld do that with level change buttons…

Thanks Again
Rasa

I commented the area in the control script to show the model switching code (aka switching level code)

All of the levels must be placed in your File / Build Settings for the code to work. (see picture)

[Picture-10.jpg]

Then its a simple

//Make a background box
GUI.Box (Rect (5,290,90,85), “Models”);

//Make the first button if (GUI.Button (Rect(10,310,80,20), "Model 1")){ Application.LoadLevel (0); } //Make the first button if (GUI.Button (Rect(10,330,80,20), "Model 2")){ Application.LoadLevel (1); } //Make the first button if (GUI.Button (Rect(10,350,80,20), "Model 3")){ Application.LoadLevel (2); }

Yes the Material thing could be handled Via a scene but let me look to see if theres a material code. (if I find it I will add a vid, your right that would be handy)

enjoy!

Scripts added to post.

very nice. get some sleep hey.

Thank you thank you. Now I am for sure making the time. Right now… no sleep over here.
I will send you the link with some models on it when Im finished.

man thats so cool. downloading unity now.
I was getting my fingers into udk… now unity, lol im going to be coding again… haha self infliction.

So Python, C++, Java, and Mel… TD-College here I come? You do training to right?? I could learn on my own but need structure to succeed. With this sort of thing anyway.

so are there any maximum model resolutions or normal map resolutions etc? Basic guide to getting the best with a reasonable download time for clients… I will explore anyways…

ok, blah blah… THANK YOU.

haha one more question: Background Environment? I guess I could put a plane on the level right? …will see.

lates

any quick way to have the model always rotating, just a little… like really slow, until you move the slider?

and having it so the model starts to rotate when the view starts?
the stop and go are still good… I just think it would feel better if it was already going. Or you could rotate it with a mouse drag on the model.

In the controlScript

change the static variables to

static var triggerGo: int = 1;
static var hSliderValue : float = 5.0;

and it will auto start
5.0 is the speed default in this case and the slider will increase and decrease from that mid value.

Sleep heh (who sleeps) :wink:

Teaching is just group learning, In this business teachers are learners and learners are teachers.
The moment you stop, you somehow believe there is nothing more to learn. Teachers that think that are idiots.

Standards are subjective to the client’s connection to the web.
I would think the top hitters looking at models are connected at a high rate. But I think it would be easy to divide a webpage into a highres / full res to dumb it down a bit.

Change the texture resolutions down a bit for the slow ones.

Use the scene to change textures because if you dont you will be building custom scripts for models to handle texture names. (which will be different).
Your question opened up a new section for me though (Shaders), and wow this engine has so much depth every time I close a door there is 3 that open with new ideas.

http://3dsolutions.ca/Models/Zack/index.html

Updated With Background and changed model name from model 1 to LowRes etc
I cant really seem to get any models in over 30 thousand polys. Took 5 seconds from hitting enter on the website address(i am using the streaming build and have two high res models and one low res.)
I imagine, If I broke my model up into smaller parts, I could get a fairly detailed one in. I would like to try to push it!

Now I just need to get a real model in there.... but it work's! Note if you do this with the 30day pro trial you will get a Trial Version Logo... so, just go to Help-enter serial number-from the internet-choose the free version... and voila! no more Trial Version watermark. The rotation settings you just gave me are perfect! no tweaking required, and I can still stop and start the model. Thanks again lol Thanks again! I used the streaming setting? And I put a higher resolution model in level 2(#1)... so I am guessing that streams in, while level one plays? So that normal map... im honestly used to displacement... is it like a bump or more like a full on displacement? No possibility of displacements hey? I am going to play a bit.... I will give some more feedback too.

Good Job

I think the next thing that would be nice is a wireframe shader.

I updated mine with a wireframe box.

heh added a cannon To mine

WASD to move it around

mouse to fire

great one… Lets do something productive with it.

Since the remaining videos have more to do with game logic than Zbrush I would say your more than welcome to join the fun at my youtube channel. Its separate from the playlist at the top which is only the Zbrush potential application of unity / portfolio building.

http://www.youtube.com/user/cannedmushrooms#grid/user/38D79E57A640D733