PDA

View Full Version : Adding bitmaps?


Gibbz
06-06-2007, 09:33 AM
Hey Guys,
Is it possible to bitmaps together?
Currently im reading in a row of 2 bitmaps, adding them together in a loop and setting that row into my new bitmap. However it takes about 30 seconds to add 2 x2048 textures.... and ill be doing this on about 100 objects, which would be about 50mins!

If theres no way inmaxscript ill just do it via c++ SDK.

Cheers

JohnQ
06-06-2007, 09:37 AM
Hello there,

I also had the very same question. I would be very happy if someone would post the answer.

-Thanks

ypuech
06-06-2007, 09:44 AM
Built-in MAXScript bitmaps methods are good but slow. Do you looked at .Net ? There's some interesting classes in GDI+.

Yes, in C++ it will be (very) much faster and not difficult to implement. You can create an Utility or a new MAXScript command to perform this operation.

rdg
06-06-2007, 10:43 AM
I am not sure I understood exactly what you want to do.

Recently I tried something like this in maxscript.
In the end I used aftereffects to stich the bitmaps.

Rename them if they aren't already a numbered sequence.
Import the sequence into aftereffects and offset the sequence to have the images arranged like you want. Render it.

You can still use maxscript to rename the files to have the right order ...

Georg

Moosley
06-06-2007, 06:37 PM
Compositing bitmaps in Maxscript is slow, I've written a couple of functions which scale and composite bitmaps but they are slow on the larger maps. You can try speeding things up a bit by converting your bitmaps to array's before working on the data in the loops, just make sure you increase your maxscript memory first ;)

As ypuech says, if you're using max 9, investigate using the GDI+ classes in .net, they're about a million times faster.

magicm
06-06-2007, 09:44 PM
The avguard extension (http://www.maxplugins.de/max9_32.php?search=avguard&sort=Author) has a function for this, I think it's called PasteBitmap. It lets you specify the source and destination regions/locations, so it should be able to do what you want.

Martijn

CGTalk Moderation
06-06-2007, 09:44 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.