Notifications
Clear all

[Closed] Barycentric point

Ok, one last question.

Can I do this at render time? Maybe at render time I’ll be able to run a loop by screen pixel? No?

You could write a render effect that writes colored pixels to the rendered image based on the object, its UV coordinates, etc. That’s gonna be slow, though, and you’re really only messing with the pixels – so it’s not exactly a proper procedural.

I’d almost say you’d be better off rendering your procedural straight to a bitmap and using that bitmap as the map for the object.

Your best bet is still going to be either writing a full texture plugin, or playing with the plugins that let you render e.g. Direct3D shaders directly in-render… and author Direct3D shaders (or wait for later max versions with mental mill, etc.)

1 Reply
(@castorblast)
Joined: 11 months ago

Posts: 0

Can I do this using MAXScript? Any example available?

This means I must use the SDK, right?

Ok. I know C++, so this won’t be a problem. The thing is: I have no idea how to actually install this SDK and work with it. I’ve been looking for examples, tutorials, etc., but it is as if the 3DStudio SDK developers work in a Top Secret way or something like that. =/

Any thoughts?

the bitmap thing – check the help file for getPixels and setPixels

The other bit – yep, would require the max SDK. This forum section covers the 3dsMax SDK as well, I’m sure there’s others here who have gone through the SDK setup. The SDK help file seems to have a small ‘quick start’-ish section using the app wizard, but I wouldn’t know the finer details of what goes where and how to link things

you dont need sdk for that. this is a bit of code i stripped so may not work.
pposx and pposy are bitmap pixel coordinates. so top left would be 1,1 etc


screen_width = 256 
screen_height = 256
 
theCanvasBitmap = bitmap screen_width screen_height color:black
setPixels theCanvasBitmap [pposx,pposy] pixel_color
 
display theCanvasBitmap
theCanvasBitmap.filename = "c:\	est.tga"
save theCanvasBitmap

you do need the SDK for the latter bit; “Your best bet is still going to be […] writing a full texture plugin.”

Page 2 / 2