Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Go Back   mental images Forum > mental ray > mental ray - Shaders > mr Shaders - Writing mental ray Shaders

Reply
 
Thread Tools Display Modes
  #1  
Old January 10th, 2010, 21:50
bigbossfr bigbossfr is offline
mi Dev Forum User
 
Join Date: Aug 2009
Posts: 10
Red face Maximum buffer = 44 ? After is crashing with a texture.

Hi,
I write my first shader based on p_shaders (thanks Pavel).
It is just a constant color with many buffers.



Here the problem :
- when i create > 44 framebuffers with no texture, all is good.
- when i create > 44 framebuffers with texture on "render slot" or buffer slot, my Maya crash :
Code:
DB   0.3  fatal  041061: invalid tag value 0x31dc4aa0 requested
- when i create <= 44 framebuffers with texture on "render slot" or buffer slot, all is good.



It is the first time i am programming in C++ . I don't know C++...

Please see the code (and cleaning if you want ).

Thank.
Attached Files
File Type: zip 44buffers.zip (7.9 KB, 2 views)
File Type: zip 54buffersCrash.zip (8.8 KB, 7 views)

Last edited by bigbossfr; January 10th, 2010 at 22:28.
Reply With Quote
  #2  
Old January 11th, 2010, 12:32
Puppet's Avatar
Puppet Puppet is offline
mi Dev Forum User
 
Join Date: Dec 2004
Location: Moscow, Russia
Posts: 331
Default

Possible you have unnecessary variables in your p_buffer_writer_t struct.
It should have same parameters with same order that *.mi file have.

You also don't need static_param_dof (it's for p_physical_lens_dof shader only).

You don't need ',' after last parameter in *.mi file.
__________________
Pavel Ledin
Reply With Quote
  #3  
Old January 11th, 2010, 21:32
bigbossfr bigbossfr is offline
mi Dev Forum User
 
Join Date: Aug 2009
Posts: 10
Default

Hi Pavel,
Thank for your answer !
So :
- i deleted all the static_param_dof in the p_static_param.h. I don't know if i have unnecessary variables.
- at the end of my p_buffer_writer.mi, i put :
Code:
boolean "restore_normal"	#: shortname "restn"
So, normaly now, my .mi is good.


My Maya crash again (with my 54 buffers) when i connect a texture (it is not crashing when i put nothing, just a color) .

I don't know why .

Here the files cleaned with your advice.

Thank you Pavel.
Attached Files
File Type: zip 54buffersCrashv2.zip (8.7 KB, 4 views)

Last edited by bigbossfr; January 11th, 2010 at 21:34.
Reply With Quote
  #4  
Old January 12th, 2010, 07:45
Puppet's Avatar
Puppet Puppet is offline
mi Dev Forum User
 
Join Date: Dec 2004
Location: Moscow, Russia
Posts: 331
Default

I'm talking about these lines:

Code:
miBoolean specialC1_pass;
miBoolean specialC2_pass;
...
miBoolean specialC54_pass;
In p_buffer_writer_t and possible in static_param too.
__________________
Pavel Ledin
Reply With Quote
  #5  
Old January 12th, 2010, 20:30
bigbossfr bigbossfr is offline
mi Dev Forum User
 
Join Date: Aug 2009
Posts: 10
Unhappy

If i delete all this lines, my shader doesn't compile, i have many error like :

Code:
p_buffer_writer.cpp(288) : error C2039: 'specialC10_pass' : is not a member of 'p_buffer_writer_t'


I don't know what i can do.
Reply With Quote
  #6  
Old January 12th, 2010, 21:07
Puppet's Avatar
Puppet Puppet is offline
mi Dev Forum User
 
Join Date: Dec 2004
Location: Moscow, Russia
Posts: 331
Default

Just delete all error lines too
like this:
sp->specialC10_pass = *mi_eval_boolean(&paras->specialC10_pass);
It's not used in your code.
__________________
Pavel Ledin
Reply With Quote
  #7  
Old January 12th, 2010, 22:35
bigbossfr bigbossfr is offline
mi Dev Forum User
 
Join Date: Aug 2009
Posts: 10
Talking

Yeahhhh, it is working now.
Thank you very very much Pavel !
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +1. The time now is 14:21.