• Home
  • Index
  • Search
  • Download
  • Server Rules
  • House Roleplay Laws
  • Player Utilities
  • Player Help
  • Forum Utilities
  • Returning Player?
  • Toggle Sidebar
Interactive Nav-Map
Tutorials
New Wiki
ID reference
Restart reference
Players Online
Player Activity
Faction Activity
Player Base Status
Discord Help Channel
DarkStat
Server public configs
POB Administration
Missing Powerplant
Stuck in Connecticut
Account Banned
Lost Ship/Account
POB Restoration
Disconnected
Member List
Forum Stats
Show Team
View New Posts
View Today's Posts
Calendar
Help
Archive Mode




Hi there Guest,  
Existing user?   Sign in    Create account
Login
Username:
Password: Lost Password?
 
  Discovery Gaming Community The Community Real Life Discussion
« Previous 1 … 10 11 12 13 14 … 245 Next »
Took me two weeks to get asteroid field to work

Server Time (24h)

Players Online

Active Events - Scoreboard

Latest activity

Took me two weeks to get asteroid field to work
Offline Rotorist
09-21-2018, 06:11 PM,
#1
Member
Posts: 26
Threads: 6
Joined: Jan 2018

We are all pretty used to the way asteroids work in Freelancer and we took for granted how smooth they are!

I haven't realized what a challenge it is to make an asteroid field that spreads out long distances without stuffing GPU's memory with millions of objects. I had to figure out a way to dynamically place asteroids around the player as the player moves around in the field, and also to ease out the eye sore when asteroid pop out of nowhere, I had to write a shader that makes the asteroid transparent when they are far away and solidify as player gets closer.

On top of that, if the asteroid field is foggy, the sun has to look more gloomy, and lighting has to adjust along with it. It was truly a lot of work to do simple asteroids. But I finally achieved something that looks half decent:

https://www.youtube.com/watch?v=IbnHG7XO...e=youtu.be

You may occasionally see distant asteroids popping out, but usually it doesn't bother my eyes that much.

Actually the real challenge was how to render the asteroid field when the player is some distance away from it. I made a very stupid algorithm to line the asteroid "cells" (each cell is pre-loaded with randomly placed asteroid objects) along the edge of the field, increased the transparency threshold in the shader, and actually it didn't look too bad from a distance.
Reply  
Offline Nerva Regis
09-21-2018, 08:40 PM,
#2
The Professor
Posts: 1,032
Threads: 113
Joined: Jul 2014

That looks really nice!
Reply  
Offline Enkidu
09-21-2018, 08:42 PM,
#3
UN| Unioners
Posts: 4,145
Threads: 390
Joined: Apr 2013

(09-21-2018, 06:11 PM)Rotorist Wrote: We are all pretty used to the way asteroids work in Freelancer and we took for granted how smooth they are!

I haven't realized what a challenge it is to make an asteroid field that spreads out long distances without stuffing GPU's memory with millions of objects. I had to figure out a way to dynamically place asteroids around the player as the player moves around in the field, and also to ease out the eye sore when asteroid pop out of nowhere, I had to write a shader that makes the asteroid transparent when they are far away and solidify as player gets closer.

On top of that, if the asteroid field is foggy, the sun has to look more gloomy, and lighting has to adjust along with it. It was truly a lot of work to do simple asteroids. But I finally achieved something that looks half decent:

https://www.youtube.com/watch?v=IbnHG7XO...e=youtu.be

You may occasionally see distant asteroids popping out, but usually it doesn't bother my eyes that much.

Actually the real challenge was how to render the asteroid field when the player is some distance away from it. I made a very stupid algorithm to line the asteroid "cells" (each cell is pre-loaded with randomly placed asteroid objects) along the edge of the field, increased the transparency threshold in the shader, and actually it didn't look too bad from a distance.


Great work. We could use some of your skills on the Discovery Dev team.

[Image: XTF1d6x.png]
THE SYNDIC LEAGUES
(A co-operative of Rheinland's outlawed trade unions, determined to take the underworld for themselves.)
Information | Recruitment | Message Dump |
Feedback | Diplomatic channel
(Links pending redevelopment).
Reply  
Online Laz
09-21-2018, 08:46 PM,
#4
(Sorta) Retired Code Monkey
Posts: 1,904
Threads: 106
Joined: Jan 2014

(09-21-2018, 08:42 PM)Riehl Wrote: We could use some of your skills on the Discovery Dev team.

Being good with C# doesn't mean those same skills will apply to working with ini files. To clarify, I'm just saying the skills aren't that comparable or transferable.

Reply  
Offline Alley
09-21-2018, 08:54 PM,
#5
Member
Posts: 4,524
Threads: 406
Joined: Jun 2009

Looks great! You can also abuse of hardware instanced meshes if you want to beef up performance when using the same mesh a lot

Laz Wrote: Alley was right.
Reply  
Offline Durandal
09-21-2018, 09:15 PM,
#6
Member
Posts: 5,106
Threads: 264
Joined: Apr 2009

That's a really smooth transition between nebula and open space.
Reply  


  • View a Printable Version
  • Subscribe to this thread


Users browsing this thread:
1 Guest(s)



Powered By MyBB, © 2002-2025 MyBB Group. Theme © 2014 iAndrew & DiscoveryGC
  • Contact Us
  •  Lite mode
Linear Mode
Threaded Mode