Simple model request- sphere

Discussions about UT99

Simple model request- sphere

Postby JackGriffin » Wed Oct 24, 2018 4:13 am

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!
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3682
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Simple model request- sphere

Postby Krull0r » Wed Oct 24, 2018 9:35 am

I can do it for you :)
User avatar
Krull0r
Novice
 
Posts: 25
Joined: Fri Oct 19, 2018 10:31 am
Personal rank: 227 Emitter Expert

Re: Simple model request- sphere

Postby Feralidragon » Wed Oct 24, 2018 1:44 pm

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
User avatar
Feralidragon
Godlike
 
Posts: 5036
Joined: Wed Feb 27, 2008 6:24 pm
Location: Liandri
Personal rank: Work In Progress

Re: Simple model request- sphere

Postby JackGriffin » Wed Oct 24, 2018 2:02 pm

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.
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3682
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder

Re: Simple model request- sphere

Postby Higor » Wed Oct 24, 2018 5:46 pm

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.
Higor
Godlike
 
Posts: 1681
Joined: Sun Mar 04, 2012 6:47 pm

Re: Simple model request- sphere

Postby JackGriffin » Thu Oct 25, 2018 1:57 am

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).
"You damn kids, back in my time we made the items, maps and games ourselves with an unwieldy engine using counter-intuitive crash-prone tools and we liked it so much we built communities around this which nowadays look like cults because they're quasi-parallel societies based on the same old games." -Hellkeeper
User avatar
JackGriffin
Godlike
 
Posts: 3682
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: Hack coder


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest