Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Softimage® / Realtime Effects / I don't understand the way Softimage 2011 interprets Realtime lights from a Mental Mill CGFX file
  RSS 2.0 ATOM  

I don't understand the way Softimage 2011 interprets Realtime lights from a Mental Mill CGFX file
Rate this thread
 
46309
 
Permlink of this thread  
avatar
  • bkeane
  • Posted: 17 August 2010 02:02 PM
  • Total Posts: 8
  • Joined: 29 August 2008 03:16 PM

I have a couple of standard cgfx shaders which I created in Mental Mill that I’ve been using in Softimage’s realtime view for some time.  Softimage 2011 switched the way it uses cgfx files from referencing a file via an FX Shader node to loading them from an application/bin directory.  This is fine and dandy, but I’ve noticed some peculiar things now happening with my lights that render my shaders useless.

In prior versions of Softimage, the lights in the cgfx shader would be interepreted as a set of floats which corresponded to the XYZ position for each light.  It was a simple enough task to drop a light (or object) into the scene and use its position to drive the realtime parameters.

In Softimage 2011, my lights come into the realtime shader as an astonishing array of obscure floats and I have no idea what to do with them or how to tune them.  Each light is comprised of two sets of 34 parameters labelled “transform_internal_to_light” and “transform_light_to_internal.” Two further sets of 34 parameters come in for “__interal_to_light” and “__external_to_light"-- I’m assuming these are generalized parameters not specifically tied to the current lights.

Enclosed is a pic of what the property page for my cgfx shader looks like.

How do I tune these values?  Am I doing something wrong?

Brian.



Attachment Attachment
Replies: 0
avatar
  • langdon
  • Posted: 17 August 2010 09:52 PM

As far as i know, softimage shaders environment was rewritten with the release of the 2011 version, to be opened to more customizable and external developers, this has caused some issues regarding shading, like many 3d party shaders didnt work anymore (t2s illumination bundle for example), so when it comes to “unexpected” shading/lighting results, this is the first issue that comes in my mind.

Wait for some AD guy to help, i have no idea.
Also would you please share how you enabled Softimage reading Mental Mill shaders?
I thought that was a 3ds Max feature, how you can use mentall mill shaders into softimage?

Thanks



Replies: 1
/img/forum/dark/default_avatar.png

Hi Langdon!

The Mental Mill to Softimage pipeline is fairly clean.  With your Mental Mill graph selected, you can choose to File>Export and set it to Autodesk Softimage format.  This will write out a cgfx file with bindings friendly to Softimage.  It’s worth noting that the free Mental Mill (Artist’s Edition) does not contain the Export menu-- you need to get the full version to do this.  (Although I think there’s a free beta of the new version 1.1 available now which WILL export)

To use the resulting shader in Softimage 2011, you need to drop it inside your [username]/Autodesk/Softimage_2011/Application/cgfx folder.  Any cgfx files you drop into this directory will be available in the rendertree window under the CGFX heading.

Alternatively, you can set up a workgroup directory if you want to share your cgfx shaders with multiple users.  From inside Softimage you can point to a workgroup via the File>Prefrerences>Data Management property page. Drop your workgroup directory location into File/Project Locations section.  Now any cgfx file you put into the [workgroup]/Application/cgfx directory will be available for all Softimage users who point at the location.

It’s a great and simple pipeline… provided the lights were interpreted the same way they were in 2010!

Enjoy!

Brian.
:)

Author: bkeane

Replied: 18 August 2010 07:05 AM  
avatar
  • bkeane
  • Posted: 02 September 2010 12:40 PM

Can anyone on the Softimage team point out what is happening with these realtime light issues?

Thanks!



Replies: 0
avatar
  • gaboraa
  • Posted: 28 January 2011 04:56 AM

I agree with Bkeane. I don’t understand how can I define a light source in Softimage because all of the shaders that I have imported into SI was light independent. So is there any way to use light sources with mental mill exported shaders?



Replies: 0
avatar

I haven’t tried Mental Mill, and I don’t work a lot with cgfx shaders.

But those are 4x4 transformation matrices that you’re getting in the PPG.



Replies: 0
avatar

I got a big fish with several fins. For the enveloping I’d like to envelope first the main body with the main bones and then envelope the fins with another group of bones. I’d like to work this way to prevent the small bones to influence the areas of the main body and vice versa. Is there a way to do this or how do I re-weight certain areas to prevent unwanted conflicts between certain bones. I do this for the first time, so I don’t really have a clue.
wholesale pearl jewelry



Replies: 0
avatar
  • luceric
  • Posted: 15 March 2011 07:12 AM

I don’t know the answer to your question, but Guillaume here smartly suggested that you should probably try first to make these matrices Identify matrices (i.e. put 1.0 in the diagonal) so that at the very least they don’t black out everything.  After that, you shoudl probably ignore these parameters.. they’re probably internal matrices that shouldn’t be shown in the UI



Replies: 0