Considering Unity - Qs re polycounts, LW3D, and mouse input

I’ve started to explore Unity and might take the plunge (Indie version for now). I’ve had a game idea for years that I’m starting to move seriously on, and am excited about Unity so far.

Sorry to make you wade through details, but if anyone has experience to help me judge any of the following questions, I’d be grateful!

1. My concept calls for a 3162-triangle object–AFTER culling backfaces. It would NOT have to collide, and could even be an untextured solid color (though a pattern would be nicer). But it would have to have shading, rotation in a plane, and would have to be visible in its entirety. (It’s hard to explain but think of it as a flat slab with a complex coastline cut out of it, framing the game. The jagged edges of the “hole” would have thickness. It can’t be a static image because my game calls for it to be rotated, and so the light on the edges would change. Collision isn’t a worry because I can apply other means to make sure the game action never touches it. It’s visually important, but the only true interaction is that it rotates in response to what you do. Yet all that coastline detail IS vital (long story) so simpler isn’t really a good option even for low-end users.

So… is that practical in any way shape or form? I’m prototyping the game in Flash now and it handles that element OK (I fake the thickness with a second coastline offset 2 pixels). But real 3D in Unity would be great! Would 3162 triangles just kill, say a 64 MB Radeon 9600 Mobility? (In fact, I’d rather the game run on even an old G4 iMac with 32 MB! Am I dreaming?)

If that polycount makes you do a spit-take, then what kind of polycount CAN I get away with? I don’t see how I can simplify the coastline any further without losing vital detail, but we’ll see. There would of course be a whole 3D game with other objects (much simpler) going on in the middle of the “hole.” And I don’t want it to need a really high-end machine… all I have is a PowerBook G4!

2. I may need up to 200 (smallish) objects on-screen at once, reacting as collider triggers with each other AND implementing physics. Only about 3 to 10 of them would actually be moving, but they’d have to bounce off all the rest. And the rest can’t be a static mesh because they’d be deployed in different arrangements. They CAN all be simple sphere colliders though. Again this is hard to explain, but imagine 200 robots that seldom change formation, but shoot at each other with projectiles that richochet from robot to robot using physics. Seen top-down.

Am I crazy? Would this push the system reqs high? (This quantity is killing my Flash prototype–I’m getting maybe 12 fps on a G4 and 20 on a G5, when I’d rather have 30 on both.) Maybe I should just use Torque 2D since my concept can work OK top-down, but I prefer the 3D style, and a terrain that has highs and lows.

3. How hard is it to work with Lightwave (which I’m actually only just re-learning after LONG absence)? The manual says “The Lightwave FBX exporter only supports one texture/material per object. If you need more, then you have to split your object into seperate parts. Map each object seperately and load them all into Layout, then export.”

What is the implication of that in practice? When would that cramp my style? I’m stuck with Lightwave since I’ve already bought it for other reasons.

4. I’d also like to implement very custom mouse and gamepad control. To that end:

a) Can I read raw mouse x and y delta, and do my own thing with them that varies during the course of the game? (Like ignoring x at times, and ignoring y at others, and applying math to the mouse delta before using the result to move my player object?)

b) Can Unity stop the mouse from hitting the screen edges and interfering with the above? (I’d have the mouse pointer hidden anyway.)

c) Can I read raw gamepad joystick values, and do my own thing with them? So that I can react to x and y differently when the stick is near center, vs. when it’s near the edge? Such as ignoring small motions at times… but ignoring everything BUT small motions at others?

d) Can I trigger force feedback vibration effects? (Not needed, just cool!)

5. How smoothly can a ball, driven purely by physics, roll over a mesh terrain? If the terrain has gently rounded hills and valleys will the ball roll in nice gentle curves too? Or with the triangles of the terrain mesh make the ball wobble and jitter? I want the surface to “feel” very smooth as you watch the ball’s movement. (Example: a robot rolls a slow but heavy round bomb towards an enemy, and the curves of the terrain make it follow a weaving course.)

I’m thinking of half a dozen hills and valleys, nothing TOO complex, so maybe I can afford enough polys to keep the ball’s movement smooth?

Many thanks for any advice or reactions! I’m willing to put some time into the 15-day trial, as long as there’s hope that Unity is the right engine for this.

Also, if any of the above would demand the Pro version (more than I can afford–for now) that would be helpful to know.

That’s a piece of cake for any video card. A thread on this topic is here, but in general a card like Radeon 9600 can push like 20-30 million vertices/second. Considering that multiple pixel lights means drawing objects multiple times, you’re still safe with 100 thousand or so vertices in a scene.

For collision, a couple thousand triangles is not a problem either.

Should be fine. Unity uses Ageia’s PhysX for physics calculations, and that is a pretty fast physics engine.

Just try Unity! :slight_smile:

Yes. You setup Input Axes that map to some input device (e.g. “Horizontal” that maps to mouse movement) and then you do whatever you want in your scripts. Input script reference is here.

Yes. Mouse delta movement is not bounded by screen edges.

Yes. Again, just setup input axes to map to joystick, read their values and do whatever you like with them.

Not at the moment.

“Very smoothly”. Though it actually depends on the smoothness of the terrain! You can turn on “smooth sphere collisions” on a mesh collider to make it smoother :slight_smile:

No, nothing of the above requires Unity Pro.

Don’t tempt me :lol:

Thanks a lot for the input. I’ve been reading the PDF manual and it sounds worth a try for sure.

Any Lightwave 3D 8 users have any comments on limitations/issues?

well i’m not much help cause i haven’t had a chance to buy unity :frowning: but working with the demo of unity, lightwave was a breeze. not sure on your specific question but unity does import lightwave material assignments. and more than one material per object will import. it doesn’t import the actual material settings but it keeps the assignments. i’m not sure why you’d have to split your object up as opposed to just assigning materials to different parts of your model. anyway, i don’t really know! try it!

This was a bug in the lightwave fbx exporter and we have successfully worked around it for the next unity release, so textures / material color will come through into unity 100% correctly then.

woohoo! thumbs up to otee

Sounds great. I’ve read the PDF manual and tutorial and expect I will jump on Unity as soon as I’m done traveling and have a real Internet connection!

Three basic newbie questions about scripting:

  1. Is complete Unity scripting reference available without being on the Internet? (Downloadable scripting docs, or maybe scripting command reference is part of the built-in help?)

  2. Is there a recommended text editor that will facilitate proper JavaScript syntax (maybe with color coding or auto-formatting)? That’s something I find very helpful with Director/Lingo and Flash/ActionScript. Any reason to prefer BBEdit or SubEthaEdit or some other app? (I know I can make do with BBEdit Lite but I’m willing to pay for more syntax assistance!)

  3. Is there any kind of string processing? Like pulling substrings out of a longer string, or finding a substring within a string? I don’t see that in the script reference site. (I know 3D games don’t always make use of a lot of strings, but it seems to come up a lot for me.)

TIA again.

Yes. It’s part of the built-in help.

Just pick any you like. We use SubEthaEdit here.

Unity uses an open source .NET implementation (Mono). So you get not only String class, but also collections, input/output, networking and lots of other goodies.

Another fast reply from Denmark! Thanks–I think I’d better start learning about .NET.

So to get my brain around this as a Lingo/Flash guy… the full arsenal at my disposal in Unity scripts would be:

  1. The commands in Unity’s Script Reference

  2. The commands of .NET (whatever that may be–Google and Wikipedia, here I come!)

  3. Commands that plug-ins may add (if I get the Pro version)

Am I getting warm?

(I’ll strive to pay back everyone’s time by answering newbie questions here once I no longer am one!)

  1. Yep.

  2. Most (a big most) of the .Net stuff is supported. Most likely anything you find will run.

  3. Yep. With the pro version you can also write your own plugins with C/C++ if you like. (might have been said already)

HTH,
-Jeremy

Thanks–I’m up in running in Unity now.

I was wrong: my model doesn’t have over 3000 polys. It has over 4000. And indeed, Unity animates it effortlessly on a low-end (early aluminum PowerBook) system, complete with 2048x2048 texture.

In fact, what looked “sort of like ice” in LightWave looks near photo-realistic in Unity.

I’ll have to try porting my game logic into Unity before I buy, but so far so good! I wasn’t keen on starting the game over, but the benefits are clear!

I think it’s a safe bet to say anything you have done before you can do in Unity. Some things may require a slightly different approach, and others will be a heck of a lot easier in Unity. Either way, I am 99.999% sure you can do everything you have done.

Good luck,
-Jeremy

Yep, I think it looks promising. Half of my physics and geometry code isn’t even needed :slight_smile:

OK, I’m an honest citizen now! Indie license. I didn’t need the whole 15 days to decide :slight_smile: A Pro upgrade can come later.

$249… that comes to approximately 3 cents for every answer I’ve gotten on these forums, from OTEE and others. Thanks, all!

Now it’s time to get cracking and build 65 levels :shock:

Welcome to the family of Unity users who finally came to their senses and bought a licence. :wink:

Good luck in your future projects.

-Jeremy

Thanks–I’ll be encouraging others to give Unity a chance too.