Mat Classes needs to be rewritten

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Mat Classes needs to be rewritten

Postby GPNMilano » Sat Nov 22, 2008 1:47 am

Material Classes in PyPRP are going to have to be rewritten. Not doing so is going to just cause problems down the line with other classes. SDL Layer animations for example require changing a layer's ambient color according to the SDL variable for that age's time of day.

Here's the problem though, there is no way, to set the ambient color, in the current version of PyPRP. Without setting it, you can't change it, without being able to change it, you can't have a SDL Layer Animation.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Mat Classes needs to be rewritten

Postby Grogyan » Sat Nov 22, 2008 3:25 pm

Probably right, I have my eye on the video texture plugin to Blender to playback a video on a small display in the game, and that would need some core classes to be rewritten.

Plasma can support this, by using bink video as the format

Edit, just had a quick look, looks as though Blender only supports AVI, and I don't know how that part of the program works.
If anyone is daring enough to try, lemme know cause this will be a neat addition to PyPrp and PyPrp 2.0
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Mat Classes needs to be rewritten

Postby Lontahv » Sat Nov 22, 2008 6:06 pm

I've actually seen what happens when the bink stuff in implemented into UruCC or before. Drizzle did a conversion that should've worked with the M5 panels but it didn't. So I'm thinking that you need to have the M5 engine for this. Anyone, feel free to prove me wrong. I'll be happy if I am in this case. :)

Grogyan, PyPRP wouldn't need any base classes to be rewritten for that addition. IIRC from researching implementing this into PyPRP before it's just a new small class that's reffed by plLayer for the texture. Just like I'm pretty sure ENVs are.
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Mat Classes needs to be rewritten

Postby Aloys » Sat Nov 22, 2008 6:11 pm

The lack of animated panels in Uru has always been something I never understood.. And so getting them back in the game is my biggest pet peeve. I asked the question several times over the years and all the answers I got were of the kind "it may be possible but it'd be really hard". We do know it's possible to play bink files on a polygon in a scene because of the Uru intro video (the one with Atrus talking) but there seems to be all kind of problems with it andtuff. Can't be more precise than that I'm araid. :)
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Mat Classes needs to be rewritten

Postby Lontahv » Sat Nov 22, 2008 6:17 pm

The panel in the intro is a python video-overlay. IIRC you call some function like PlayVideoOnScreen or something. This is how Dustin got those flybys in the ULM and internally how Cyan plays those videos when you start up the game (not certain here but it's my best guess).

Edit: Took a look at the Drizzled plBinkLayer and it looks like Drizzle did something odd to it. Now wonder it's not playing right. :roll:
Edit2: Blamed Drizzle prematurely. It's like that in the M5 prp as well. Looks like it's not set up to loop which could explain why it's not playing. Maybe it needs some external trigger I don't have.

Another thought with Amb color. Is there a way we could set this along with the main color with PyPRP. 'cause Blender has no Amb color. Let's rewrite Blender instead--that would fix this. :P :lol: ;)
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Mat Classes needs to be rewritten

Postby Aloys » Sat Nov 22, 2008 6:38 pm

Lontahv wrote:Let's rewrite Blender instead--that would fix this. :P :lol: ;)

That's what I've been saying from the beginning! :D UruBlenderâ„¢
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Re: Mat Classes needs to be rewritten

Postby GPNMilano » Sat Nov 22, 2008 6:54 pm

Since, techincally, PyPRP just reads the blender settings and applies them to Plasma, if we want to keep the colors in the materials tab, couldn't we just set it up so that PyPRP reads the settings for the mirror sliders in the materials, and sets this as the ambient color?
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Mat Classes needs to be rewritten

Postby Nadnerb » Sat Nov 22, 2008 7:32 pm

That doesn't actually seem to follow your logic... wasn't the original intent to enable the setting of different colors per layer? The mir setting is per material, as you stated.. ???

It is possible to set an amb color rather than just an amb value, but it's a global setting in blender. The amb slider in blender sets the amount of the global amb color that affects a particular material. PyPRP ignores the global amb color though, instead pretending that it's always white.
Last edited by Nadnerb on Sat Nov 22, 2008 7:36 pm, edited 1 time in total.
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Mat Classes needs to be rewritten

Postby Lontahv » Sat Nov 22, 2008 7:34 pm

That sounds like a pretty good idea. Also pretty easy to implement since we can just copy the color for that to the GMat class at the same time as we copy the regular color.

There is the problem that the button has misinformation if we do this. :P
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Mat Classes needs to be rewritten

Postby andylegate » Sat Nov 22, 2008 9:35 pm

Talking about the linking panels in Myst V, if you look at Myst V's xLinkingBookDefs.py python file you'll see this:

Code: Select all
from Plasma import *
BookStart1 = '<font size=10>'
LinkStart = '<img src="'
TransLinkStart = '<img opacity=0.7 src="'
kFirstLinkPanelID = 100
LinkEnd = ('*1#0.hsm" align=center link=%d blend=alpha>' % kFirstLinkPanelID)
LinkEndPage = '*1#0.hsm" align=center link=%d blend=alpha>'
LinkEndNoLink = '*1#0.hsm" align=center blend=alpha>'
PageStart = '<pb>'
MovieLinkStart = '<movie src="avi\\'
MovieLinkEnd = ('.bik" align=center link=%d resize=yes>' % kFirstLinkPanelID)
xAgeLinkingBooks = {'Siralehn': (1.0,
              1.0,
              ((((BookStart1 + PageStart) + LinkStart) + 'xLinkPanelNexusDefault') + LinkEnd),),
 'DireboThgr': (1.0,
                1.0,
                (((((BookStart1 + PageStart) + MovieLinkStart) + 'direboWithAlpha') + MovieLinkEnd) + '<img src="xLinkingBookIslandSchematic01*1#0.hsm" pos=128,256 blend=alpha resize="no">'),),
 'DireboTdlm': (1.0,
                1.0,
                (((((BookStart1 + PageStart) + MovieLinkStart) + 'direboWithAlpha') + MovieLinkEnd) + '<img src="xLinkingBookIslandSchematic02*1#0.hsm" pos=128,256 blend=alpha resize="no">'),),


You have MovieLinkStart and MovieLinkEnd, a bit like the ImgStart that we use in the Python for linking books in Uru.

And of course it's defined at the beginning of the python file, "movie src=", where as in Uru we normally have ImgStart as "img src="

I think D'Lanor told me that the reason this doesn't work (I tried it many months ago), is because Uru's Python doesn't know what "movie src=" is.
Or was it Uru's Plasma doesn't know what "movie src=" is? Not sure I remember that right, just that it won't work because one or the other doesn't know what that is.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Next

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 3 guests