Moi Render

Next
 From:  NightCabbage
3662.1 
Hi Michael

So, I have a bit of a feature request :)

I just saw, in PaQ's thread, this script:

script: /* render view to clipboard */ var v = moi.ui.getActiveViewport(); if ( v != null ) { moi.view.lineWidth = 4; v.renderToClipboard( 2560, 2560 ); moi.view.lineWidth = 1; }

And it got me excited - because it's almost exactly what I need...

So I make games, and many have small graphics, so they don't need a high quality renderer with fancy features - as they're generally so small (30x30 for a tank, etc.) that you can't really make out the detail anyway.

So I was wondering if you could extend this current rendertoClipboard function to add a few features? :D

Here's my little list of things...

- Render with lineWidth = 0 (I tried setting it to 0, but I think it's limited to a min width of 1)

- Render with transparent background

- Render with all on-screen displays turned off (viewport labels, grid, xyz icon, etc.)

- Anti-alias edges of shapes (perhaps you could use the graphics card to do this? or is it all software rendered?)

- Choose shading style - eg. default, none (100% colour), smooth, etc.




Possible? :)

I think a basic MoI renderer would be awesome!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3662.2 In reply to 3662.1 
Hi NightCabbage, I do plan to eventually have some kind of basic render built in to MoI.

But it will require quite a bit of UI to go along with it, and setting up lots of UI tends to take quite a bit of design time for me to do it well. That's why I'm not quite sure when a basic built-in render will happen in MoI.

That script you show is really more similar to a screen grab - it just redirects what is normally drawn in a viewport to a specific sized bitmap and then puts that on the clipboard.

So it basically has all the limitations of what the screen display has, it's not really easy for it to have all the exact same functionality as a regular full render would have.


> - Render with lineWidth = 0 (I tried setting it to 0, but I think
> it's limited to a min width of 1)

Yeah line width can't go to zero but you could hide all curves and edges to get the equivalent. To do that go to the Scene Browser types section, and click on the little eye icon for Curves and also Edges, that will hide all of those from view.


> - Render with transparent background

There's no way to do this currently because there is not really any concept of a viewport window having a transparent background, it always has a colored background.


> - Render with all on-screen displays turned off
> (viewport labels, grid, xyz icon, etc.)

There is not currently any way to turn off the viewport upper-left labels (remind me when v3 betas are underway and I can add that), but you could use a modified script to turn off some of the other things like the grid and xyz icon.

For example this version will turn off the grid, the grid xy axis lines, and the xyz icon for the image generation and then turn them back on:

script: /* render view to clipboard */ moi.view.showAxisIcon = false; moi.grid.display = false; moi.grid.showXYAxes = false; var v = moi.ui.getActiveViewport(); if ( v != null ) { moi.view.lineWidth = 4; v.renderToClipboard( 2560, 2560 ); moi.view.lineWidth = 1; moi.view.showAxisIcon = true; moi.grid.display = true; moi.grid.showXYAxes = true; }


> - Anti-alias edges of shapes (perhaps you could use the
> graphics card to do this? or is it all software rendered?)

It's done by the graphics card. You may be able to get this by forcing anti-aliasing to be turned on in the video driver settings, but sometimes that can also mess up the mechanism that MoI uses for doing selections, so be ready to go and turn it back off if you get selection problems after that.


> - Choose shading style - eg. default, none (100% colour), smooth, etc.

This is probably where you're talking about making a pretty extensive UI to manage a lot of settings... That's the kind of thing that takes quite a while to design.


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  NightCabbage
3662.3 
That's cool, I just thought I'd bring this up now, given I figured you would have thought of it at least a little bit.

I think it would be awesome for MoI to have a built-in renderer... even starting with really basic features, and then adding in new things as time goes by.

After I finish a few of my current game projects, I was thinking about making a small easy to use renderer to go with MoI :)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All