UPlasma development - Play Plasma from the Unity engine

General debates and discussion about the Guild of Writers and Age creation

Re: UPlasma development - Play Plasma from the Unity engine

Postby Aloys » Thu Feb 21, 2019 3:58 pm

Actually, it's not as bad as you might think. Most alpha-blended meshes are simply decals, which don't have the issue as they are easy to sort in advance. It's only a problem with complex meshes

Well that sounds good at least. (and I I don't usually put a lof folliage in my scenes anyway. :p )

making each face its own scene object (Morrowind did this, and it cut the game's framerate in two)

haha, wow.. yeah that's a rather brutal way of dealing with the issue..

I'm annoyed that the year is 2019 and we still have too deal with surfaces sorting issues.. I guess it's one of those things that is harder to deal with than it looks; but still.. Right now if I had just one wish for a genie coming out of a lamp it would be to have an automated fool proof way of dealing with this.
Transparency sorting issues are the bane of my existence.. >_>
User avatar
Aloys
 
Posts: 1871
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: UPlasma development - Play Plasma from the Unity engine

Postby Deledrius » Thu Feb 21, 2019 6:15 pm

Aloys wrote:I'm annoyed that the year is 2019 and we still have too deal with surfaces sorting issues.. I guess it's one of those things that is harder to deal with than it looks; but still.. Right now if I had just one wish for a genie coming out of a lamp it would be to have an automated fool proof way of dealing with this.
Transparency sorting issues are the bane of my existence.. >_>

I've had similar thoughts in the past.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1288
Joined: Mon Oct 01, 2007 1:21 pm

Re: UPlasma development - Play Plasma from the Unity engine

Postby Sirius » Fri Feb 22, 2019 2:09 am

From what I understood, partial transparency and face sorting are not things you can do easily. CPUs can sort things easily but can't work on big datasets, GPUs can work on big datasets but suck at sorting (especially since we want them to perform incredibly quick...).

Aloys wrote:I'm annoyed that the year is 2019 and we still have too deal with surfaces sorting issues..

Actually, it's even worse nowadays than it was in 2000', because a lot of post processing effects require deferred rendering... Deferred rendering allows you to do outstanding effects like depth-of-field, runtime ambient occlusion, real-time reflections on any surface, an insane amount of overlapping lights in your scene, screen-space global illumination, all of that nearly for free. But it also requires exactly one opaque object per pixel, and is completely confused by partial transparency. Hence the "hack" of only ever allowing one opaque surface per pixel. Most games completely give up on partial transparency nowadays.

Old engines like Plasma and Morrowind's resort to "hacks" to have the CPU sort faces so they are drawn in the correct order, but even then they can't handle intersecting faces...
User avatar
Sirius
 
Posts: 1194
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: UPlasma development - Play Plasma from the Unity engine

Postby Deledrius » Fri Feb 22, 2019 4:45 am

Sirius wrote:From what I understood, partial transparency and face sorting are not things you can do easily. CPUs can sort things easily but can't work on big datasets, GPUs can work on big datasets but suck at sorting (especially since we want them to perform incredibly quick...).

Aloys wrote:I'm annoyed that the year is 2019 and we still have too deal with surfaces sorting issues..

Actually, it's even worse nowadays than it was in 2000', because a lot of post processing effects require deferred rendering... Deferred rendering allows you to do outstanding effects like depth-of-field, runtime ambient occlusion, real-time reflections on any surface, an insane amount of overlapping lights in your scene, screen-space global illumination, all of that nearly for free. But it also requires exactly one opaque object per pixel, and is completely confused by partial transparency. Hence the "hack" of only ever allowing one opaque surface per pixel. Most games completely give up on partial transparency nowadays.

Old engines like Plasma and Morrowind's resort to "hacks" to have the CPU sort faces so they are drawn in the correct order, but even then they can't handle intersecting faces...


It's a legitimately difficult general problem, mathematically.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1288
Joined: Mon Oct 01, 2007 1:21 pm

Re: UPlasma development - Play Plasma from the Unity engine

Postby Aloys » Fri Feb 22, 2019 6:16 am

I know it is. Every time I get to talk to an experienced 3D coder I ask them about it and they start sweating... proper "OIT" Order Independent Transparency, is my holy grail of 3D rendering.. Except no one seems to even want to tackle it.. Even the nVidia and ATI guys seems to shy away from it. :(

Alpha transparency is one of the most useful tool of a 3D artist; and it's one we can barelly use.


Deffered Rendering.


*Blherg*... I remember a talk by John Carmack a couple years ago when he was getting into Rocket building and he looked at how rocket engines worked and said "hey, this system is actually simple. My rendering engine is a hundred times more complicated than that". :D (I'm paraphrasing, and Rocket science is hard for good reasons; but still that stuck with me). Today's rendering engines are horribly complex; and getting worse by the minute. I salute nVidia's efforts of pushing ray tracing hard because it will solve a lot of problems and make rendering pipelines so much simpler... (now we can actually start using this in 15 years when every one finally has one of these GPUs)
User avatar
Aloys
 
Posts: 1871
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: UPlasma development - Play Plasma from the Unity engine

Postby Sirius » Thu Aug 29, 2019 11:45 pm

Hey guys.

Still didn't have as much time as I'd like to work on this, but I'm still going on !
I recently rewrote the whole animation system, have a look...

Teledahn animations

(Oh, and here is a small bonus, just for fun)

Works for both MOUL and CC files (MOUL is not perfect, but mostly working). And objects finally rotate correctly (yay Gahreesen fortress not behaving like a giant version of the Bevin beach ball !). I'm now using my own C# animator instead of the stock Unity one, which simply wasn't suited for the job.

Also, for weeks I was plagued by a bug which prevented me from entirely running the project (RVO screwing up interoperability between C# and C++ - how come there is no way to disable it, seriously ?). But now it's fixed.

I'm also having a look at the Xenko game engine, which is similar to Unity but fully written in C# and full free open source. Might be a better alternative in the future, since it means we could actually fix engine bugs ourselves when needed... Still, for now Unity will be all I need.

Aloys wrote:*Blherg*... I remember a talk by John Carmack a couple years ago when he was getting into Rocket building and he looked at how rocket engines worked and said "hey, this system is actually simple. My rendering engine is a hundred times more complicated than that".

Personally I'd say anything is "simple" until you actually start building it and see all the small issues that make 95% of the difficulty...
User avatar
Sirius
 
Posts: 1194
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: UPlasma development - Play Plasma from the Unity engine

Postby Deledrius » Fri Aug 30, 2019 11:45 pm

Sirius wrote:Hey guys.

Still didn't have as much time as I'd like to work on this, but I'm still going on !
I recently rewrote the whole animation system, have a look...

Teledahn animations

(Oh, and here is a small bonus, just for fun).

Nifty! Are you able to make things physical objects at will?

Sirius wrote:
Aloys wrote:*Blherg*... I remember a talk by John Carmack a couple years ago when he was getting into Rocket building and he looked at how rocket engines worked and said "hey, this system is actually simple. My rendering engine is a hundred times more complicated than that".

Personally I'd say anything is "simple" until you actually start building it and see all the small issues that make 95% of the difficulty...

That's been a lesson I've learned is true for everything I've worked on.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1288
Joined: Mon Oct 01, 2007 1:21 pm

Re: UPlasma development - Play Plasma from the Unity engine

Postby Sirius » Sat Aug 31, 2019 2:52 am

Deledrius wrote:Nifty! Are you able to make things physical objects at will?

You mean, like the harvester behaving like a kickable ? Sure. Any object can be turned into a kickable through the Unity API or UI. Although in the harverster's case, it was my script being overzealous at detecting kickable objects in the first place.
(A few objects can't really behave like kickables because they are statically batched to help with performances. This is a bit similar to objects in Plasma lacking a CoordinateInterface.)
User avatar
Sirius
 
Posts: 1194
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: UPlasma development - Play Plasma from the Unity engine

Postby Aloys » Wed Sep 04, 2019 5:20 am

It's great that you are still working on this. I'm still not sure what you plan to do with it in the long run, but even as a side projet it's cool. :)

Now on to a more important mater.

Bouncing back on the visual scripting discussion from the other thread: if you where to release your project to the community, would it be possible to plug in some visual scripting system?
User avatar
Aloys
 
Posts: 1871
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: UPlasma development - Play Plasma from the Unity engine

Postby Sirius » Wed Sep 04, 2019 9:56 am

Aloys wrote:I'm still not sure what you plan to do with it in the long run, but even as a side projet it's cool. :)

I'd love for it to completely replace Plasma with a few extra features. Then it would be cool to turn it into a framework to create and share fan Ages. But for now it's just an excellent learning opportunity.

Aloys wrote:would it be possible to plug in some visual scripting system?

Huh, good question. I'm not against visual scripting, but in most cases I wouldn't want to bother developing/integrating it (unless it's really fast and painless). For the Plasma emulation part, it's mostly useless anyway.
When we get to the point that UPlasma can behave as a framework for creating Ages, I'll probably write a lot of small scripts to handle levers, doors, journeys and the like. When that happens I'll be really interested into making something both easy to use and flexible, that people can "wire" to create simple puzzles using the Unity inspector. At that point, a node-based workflow might be a nice addition.

But for various reasons, I'm not even quite sure I'll keep using Unity later on. Being locked out of the engine's source code is becoming more and more problematic. On the other hand, I like the powerful renderer, inspector workflow, ability to use C#, and all. :shrug:
User avatar
Sirius
 
Posts: 1194
Joined: Mon Jul 26, 2010 4:46 am
Location: France

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: MSN [Bot] and 3 guests

cron