Simple model request- sphere

Discussions about UT99
Post Reply
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Simple model request- sphere

Post by JackGriffin »

Can someone make me a simple sphere primitive please? It's not possible in UEd :( If I can specify can you make it with 150-180 faces, 2 sided and normals facing inwards please? This is probably 60 seconds work if you know what you are doing. I don't (obviously).

When I first started mocking up the collapsing zone gametype I needed a sphere to use and couldn't find one. I ended up using the mesh from the redeemer shockwave and it was fine. However as I was tightening the code up the other day my math kept being off and I couldn't figure out why. Eventually I looked at the shockwave mesh and it's not a true sphere, it's actually somewhat oblong. That's why my math kept being slightly off. I really need to fix this.

Thanks if you can do this!
So long, and thanks for all the fish
User avatar
Krull0r
Average
Posts: 37
Joined: Fri Oct 19, 2018 10:31 am
Personal rank: 227 Emitter Expert
Location: Germany
Contact:

Re: Simple model request- sphere

Post by Krull0r »

I can do it for you :)
User avatar
Feralidragon
Godlike
Posts: 5489
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Simple model request- sphere

Post by Feralidragon »

The main issue is always the number of polys, as the less polys you have, the less curvy the sphere is, and the less accurate will that kind of calculation be relative to the real model shape.

I don't think only 200 polys will cut it, especially given the size that you want which is pretty big.
Since it's a single model, I would instead advise to make it at least 1000 polys, as the engine can handle some 1k models in view just fine.

Spheres have a bit more science to them than what they look at first, especially when your next worry is UV mapping: some ways of building spheres are more UV mapping friendly than others.
The ultimate one is making a sphere out of a tessellated cube (this is what games like No Man's Sky do to generate planets).

For whoever's interested: https://medium.com/game-dev-daily/four- ... 956b825db4
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Simple model request- sphere

Post by JackGriffin »

You know as I was looking at the editor spheres and seeing what happens as I increased the face count it occurred to me that the mean distance was changing but I chalked it up to "being so small it didn't matter". Now that I find errors in the math I can see I was pretty wrong, especially with the very large drawscale I'm working on. Reading your reference now I know why. Thanks for that.

Krullor is making it as we speak, and is using your suggestion of vastly increased face count.
So long, and thanks for all the fish
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: Simple model request- sphere

Post by Higor »

Try this:
(importer) https://github.com/CacoFFF/SiegeIV-UT99 ... hieldHQ.uc
(models) https://github.com/CacoFFF/SiegeIV-UT99 ... ter/Models

And this is what it looks like:
Minishield.png
The model has surfaces facing both ways, the inner surfaces are modulated, the outer ones are normal/translucent and two-sided.
And both inner and outer use different textures.

EDIT:
Forgot to say, the minishield actor has a CollisionRadius/CollisionHeight of 50, and a fully spheric hitbox (see: AdjustHitLocation)
https://github.com/CacoFFF/SiegeIV-UT99 ... iShield.uc
So it's safe to assume I made the sphere with a radius of 50 as well.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Simple model request- sphere

Post by JackGriffin »

I had thought of this but I knew the Siege community endured it's share of copying and theft and so I didn't think it was wise to ask. It would be super obvious where it came from, even reskinned.

That being said I'm *super* grateful for you letting me use this. It's exactly what I needed and then some. Thank you very much. Yay community!!

Edit: OMG that looks so sexy in UnrealFX....
2nd (and last) Edit: Imported this into my game and it works perfectly. I had to redo my math to match the different base mesh size but as soon as I did the threshold was spot on. NOW it's right (and I can go to bed lol).
So long, and thanks for all the fish
Post Reply