Babylon.js runtime rendering API

Tutorial

Introduction:

Product: RealAPI
Official website: https://realistic3.com
Documentation: Babylon.js | Realistic3D
Demo: https://bbl.real-api.com

We are introducing free tool for rendering your 3D scenes including Babylon.js scene at runtime by using RealAPI (beta). Currently RealAPI is beta version that offers free of cost, empowering users to generate realistic and high-quality 3D images effortlessly via simple API calls. Join our community and help shape the future of 3D rendering!

Installation

npm install real_api_bbl

Requirements:

  • Signup free account (You will need this for API Key Authorization)
  • App Key
  • Product Key
  • Instance ID (Optional, default is 0)

Getting started

Import:

import * as REAL from "real_api_bbl";

Lights:

Area light

const options = {
    width: 1,
    height: 2,
    intensity: 2,
    diffuse: new BABYLON.Color3(0.66, 0.56, 0.2)
}
const light = new REAL.AreaLight(scene, options);

Sunlight

const options = {
    intensity: 2,
    shadowEnabled: true,
    diffuse: new BABYLON.Color3(0.66, 0.56, 0.2)
}
const light = new REAL.SunLight(scene, options);

Point Light

const options = {
    range: 20,
    intensity: 2,
    shadowEnabled: true,
    diffuse: new BABYLON.Color3(0.66, 0.56, 0.2)
}
const light = new REAL.PointLight(scene, options);

Spotlight

const options = {
    range: 20,
    angle: 1.5,
    intensity: 2,
    shadowEnabled: true,
    diffuse: new BABYLON.Color3(0.66, 0.56, 0.2)
}
const light = new REAL.SpotLight(scene, options);

Render a job:

Step 1: Get render scene
const eye = mainCamera; // Camera or eye to render the view (Optional)
const renderScene = await REAL.Scene(scene, eye);
Step 2: Create new job
const api = REAL.API;

const params = {
    "cred": {
        "insID": 0,
        "appKey": "ABC",
        "prodKey": "XYZ"
    },
    "type": "new",
    "render": {
        "expFrom": "app",
        "output": "PNG",
    }
}

const response = await axios.post(api, params);

Response:

{
    "msg": "SUCCESS",
    "data": {
        "jobID": "1711638968_373829",
        "expFrom": "app",
        "finished": false,
        "status": "NEW",
        "url": "https://....."
    }
}
Note:

You can also render .blend, .gltf, .glb or .fbx directly by changing render parameter in request body

For example:

{
  "cred": {
    "insID": 0,
    "appKey": "ABC",
    "prodKey": "XYZ"
  },
  "type": "new",
  "render": {
    "ext": "glb",
    "expFrom": "app",
    "output": "PNG"
  }
}
Step 3: Upload scene
const uploadUri = response.data.url;
const renderScene = await REAL.Scene(scene, camera);
const request = await axios.put(uploadUri, renderScene);
OR

If you have file such as .blend, .gltf, .glb or .fbx then can be passed directly

const request = await axios.put(uploadUri, glbFileBlob);
Step 4: Submit job
const params = {
    "cred": {
        "insID": 0,
        "appKey": "ABC",
        "prodKey": "XYZ"
    },
    "jobID": "1711638968_373829",
    "type": "render"
}

const response = await axios.post(api, params);

Response:

{
    "msg": "SUCCESS",
    "data": {
        "jobID": "1711638968_373829",
        "expFrom": "app",
        "finished": false,
        "status": "WAITING"
    }
}
Step 5: Check job status

You can either check live status or jobs through socket or by using API request

  • Using SOCKET
  • Using REST API
    Please visit official docs or YouTube video regarding how to connect with Socket
const params = {
    "cred": {
        "insID": 0,
        "appKey": "ABC",
        "prodKey": "XYZ"
    },
    "jobID": "1711638968_373829",
    "type": "result"
}

const response = await axios.post(api, params);

Response:

{
  "msg": "SUCCESS",
  "data": {
    "jobID": "1711638968_373829",
    "expFrom": "app",
    "finished": true,
    "result": "https://.....",
    "status": "COMPLETED"
  }
}
3 Likes

Hello and welcome to the community!

I really appreciate you sharing this project with us! You must have put a ton of your time into it.

Allow me to make some comments.


Registration:

  1. you don’t have a Login/SignUp button on your webpage
  2. After figuring out that I need to go to the Console I tried to register:

    However it seems it went through and I’m waiting for the PIN for 15 minutes+ already (The Resend link produces the same error).
  3. The sign up page doesn’t allow automatic password generation.
  4. Put a link to the docs so anyone can easily sign up.
    image

Usage policies:

Free, yet the usage policies says:


This is not transparent.


To be honest there are existing services like this and I don’t see any added value here. There are several GPU rendering farms available already.

Adding a light or multiple lights by API seems to be an overkill for me. To properly and professionaly light a scene you need to see the results in real time and it can last quite a long time to achieve satisfactory results.

That means everyone would need to use a 3D software to set up the lighting. Since I already use a 3D software I can render the image with it - for FREE. You can for example leverage the Python scripting capabilities of Blender + a simple express.js server to make the renders on a remote server. I wrote something similar a few years ago and it took only a few hours to put all together.


Privacy of the models
There is a risk leaking the 3d models on a FREE(?) platform not backed up by a software/hardware giant?


Sorry my friend, I don’t think anyone would pay for this. Maybe I am missing something crucial here but you should come up with something valuable for the user, with a feature which will be worth to pay for.

HOWEVER:
One thing that would make sense for me and maybe for others as well:
A lot of webshops are going 3D nowadays. It’s important to run the webshop application on as many devices as we can. Mainly mobile devices.

We try to drain as low energy from the device’s battery as we can so it could make sometimes more sense to display prerendered/rendered-on-demand images from multiple angles for a given product instead of putting a realtime 3D rendering engine into the app.

So you could provide these renders with your app without the need to setup the lights and the camera manually. This doesn’t need PRO lights and some predefines lights could work in most cases.

You can even aim higher. AI can generate 3D models from images nowadays. What about a service where I could upload a few images of my product and the service could generate a sequence of images each from a slightly different angle?

Another use case/business case:
Real estate developers are going 3D as well. They need to create as much cool/attractive images of their apartments/offices as they can even before the foundation of the building was laid. What about to create a service which will automatically generate a lot of renders from the 3D model by moving the camera trough the building/areas of the building? The user the chooses which ones he/she wants to keep.


This is my humble opinion. Don’t let it kill your vision of creating something what makes sense for you!!

1 Like

@roland Please give me some moment to check this again. And could you please DM me on Discord?

1 Like

It is free of Cost.
In 2023 It was launched for Unity3D with Paid version. But it has been made completely free of cost as long as we have beta version.
All versions such as for babylon.js, three.js and blender so it is completely free rendering and there are no hidden charges.
Don’t worry about you will be charged for anything. You don’t have to link a card or pay for rendering
Regarding documentations it has been updated you can read again
And for non-beta version will have some features to pay like for businesses those wants unique rendering for each customer or private rendering room

1 Like

I have used all of these services, also I was one of their customer in past. And I don’t see any of such product you can directly implement inside your projects. And I still believe my project is much unique from them. As they need everything inside their server in the form of common blender/3d max/maya etc format. And when businesses who are using three.js/babylon.js and unity having customers they cant force each customer to export file into blender and manually render.
Even some tools like renderfox have API for blender rendering but you have to manually convert your scene inside blender and then upload the file. Then they take 10 minutes for analyzing scene. Then rendering starts.
So rendering took 10 seconds. Analyzing took 10 minutes. You result is ready in 10.10minutes even it is simple scene with single box and sunlight.
That is why I am working so long around 2 years on this solution and many of the rendering algorithm are self written.

1 Like

Are you aware of this?

https://doc.babylonjs.com/features/featuresDeepDive/scene/renderRemoteScreenshot

We can DM each other here on the forum. :slight_smile:

It is fine. We are just working on some database update I hope singup issue will be resolved

1 Like

@roland The issue regarding email verification has been resolved.
image

Also for the convenience of understanding we added Login/Signup instead of Console button.

Regarding Usage Policy you mentioned before also has been updated.

Thanks for correction and if you still face any issue kindly let us know

1 Like

Hi and welcome to the Community,
I have seen this post before and wasn’t sure if I should comment. :thinking:
In fact, there are many things I’m not sure about regarding this project of yours. I don’t want to be rude or discourage you, since, clearly, you did put a lot of efforts into this. And part of it feels like it could eventually make sense. And it seems like, technically, you know your subject and overal, did a great job :heart_eyes:

However, this looks to me like one of these ENG projects, that’s probably based on a good idea, that’s probably great from a tech standpoint (so it seems) but… is completely lacking all aspects needed for commercialization. To make this clear (and this is my opinion only), I don’t see this as a product or service that’s ready to go com and visible. I also don’t know what your expectations are?

This shows already in the so-called ‘usage policies’. These are very obscure to me and I really get the feeling that there is no positionning of your app/service. Not to mention that the content is very naïve and grammatically incorrect (english is also not my language and not much better than yours, but even I am striked reading this content).

It seems like you are claiming some unique advantages. But these do not show in your message and highlights. Why?

I also went through the entire video and, from a CX perspective, there are parts of it I do not fully understand. If you register per app with app and product key (and then, if it is price based on app/product) why do you need to enter them manually in the manifest. They should be already there and (if price based) they should even be blocked. Some steps in the process seem to be really flawless while others seem to be very cumbersome (and unnecessary).

Of course, that’s my opinion only (a simple PM and designer’s opinion) - and I’m also not qualified to assess the tech part of the project. But when it comes to marketing, com (and policies), I’m afraid there will be some more efforts required before you can allow yourself to become more visible (than just in this forum).

I hope you won’t mind my comments. Don’t mind me anyway. The others are used to read my ‘shit comments’ :face_with_hand_over_mouth: :grin: :rofl: I hope you’ll find your way around the parts still needed to make your project a success :pray:… and meanwhile, have a great day :sunglasses:

4 Likes

We greatly appreciate your feedback, as all opinions are important to us. For more detailed discussions, Discord is available for direct messages, but we respect your preference.

First, it seems like you might not fully understand the main application of our product.

Secondly, if there is pricing, some features will require payment. For example, basic features of ChatGPT are free, but advanced features come at a cost.

If you refer to my previous response, as clearly mentioned, you can view the screenshot below or check the comment yourself:

Lastly, I want to emphasize that we’ve spent almost three years developing this product. We understand how things will work, so there’s no need to worry about being blocked. We haven’t asked for any personal details, such as linking a payment method or providing card information. Even linking your mobile number is not required unless it’s necessary for security reasons.

Our primary goal is to continually improve the product. When we introduce pro features, you’ll be able to explore them accordingly

1 Like

Thank you for your feedback. We truly appreciate you taking the time to share your thoughts with us. We understand that clarity in communication is crucial, and we’re sorry if the usage policies were not as clear or precise as they should be. We’ll review the content and ensure it’s written in a more professional and grammatically correct manner.

Your point about positioning is noted, and we’ll work on making our vision and value proposition more transparent. We’re constantly striving to improve, and your input helps us move in the right direction.

If you have any specific suggestions or areas you’d like us to address, feel free to share, and we’d be happy to consider them. Thank you again for your patience and understanding

1 Like

Thank you for sharing your honest opinion—it’s valuable to hear different perspectives, especially when it comes to commercialization. Regarding your reply we already have such product successful in China. We understand that while the technical aspects are important, there are other crucial elements needed to make a project market-ready. We’re actively working on improving those areas, including communication, branding, and overall market positioning.

1 Like

Thank you so much for your candid feedback! We really appreciate your honesty, and rest assured, we don’t mind your comments at all. In fact, we see them as helpful and constructive. We understand that there’s always room for improvement, especially in marketing, communication, and refining our policies. Your insights will definitely help guide us in those areas.

As we continue to work on making the project better, we’re grateful for input like yours. It helps us see things from different perspectives. Thank you for your support, and we’ll definitely keep pushing forward to make this a success.

Wishing you a great day as well! :blush:

2 Likes

I envy the style and patience with which you can express the same opinion as I have, but you are far from being so direct and maybe for some my style is even offensive, although that is never my goal.

@mawa like a sir :see_no_evil:
image

4 Likes

@USMANHEART I can see you support Area Light ??? can you share your Babylon implementation :slight_smile: ?

2 Likes
function addAreaLight(scene) {
  const light = new REAL.AreaLight(scene);
  light.position.set(0, 2, 1);
  light.intensity = 10;
  light.rotation.x = -Math.PI / 4;
  // or using rotationQuaternion 
  // light.rotationQuaternion = new BABYLON.Quaternion.FromEulerAngles(-Math.PI / 4,0,0);
}

49B65496-4BEB-4e57-904D-157EBD75183E

Result:
image

You can also add custom options:

import * as REAL from "real_api_bbl";

const options = {
    width: 1,
    height: 2,
    intensity: 2,
    diffuse: new BABYLON.Color3(0.66, 0.56, 0.2)
}
const light = new REAL.AreaLight(scene, options);

For refrence you can read Area Light docs

Thank you for your input but what is the relation of this with the product we posted? And it seems there might be some misunderstanding about the exact use of our product. Unlike other solutions, we don’t just provide screenshots of the scenes; we deliver fully rendered results of the scene. For example, we transform something like this:.
From this
image
To this
image
As for the products you mentioned, such as render farms, do you think users would really want to export their scene and recreate it inside Blender, 3ds Max, or Maya, only to render it again? Our solution is aimed at a completely different use case, especially for scenarios where runtime model creation is involved. If you want to render or bake models at runtime, I haven’t seen any available solutions that address this need effectively.

Most existing options require exporting a GLB file and redesigning the scene inside traditional rendering engines. Render farms can assist with GPU power, but they still rely on these external engines.

We genuinely believe our solution is unique in addressing these gaps, particularly when it comes to features like runtime rendering with area lights and more. If you happen to know of a similar solution, we’d love for you to share it with us, but based on our research, we haven’t found anything comparable yet.

It’s not as though we immediately launched into forums and started promoting the product. It has taken us a significant amount of time and effort to develop, and we’re committed to delivering the best possible solution for this era.

Hi there,
I’m glad to hear I didn’t offend you by sharing my thoughts. As I said, I wasn’t sure if I should comment. Obviously, I cannot comment the tech aspect. I’m simply not qualified for that :face_with_hand_over_mouth: So, the way I try to contribute in this forum, is more around the things I know, like design, com and digital marketing. Though, I’m also (and have always been) very close to tech (eng and devs) as I’m also close to ‘business’. It’s always hard for me to find a balance as I do know of the efforts required from each side. And I also value them.
Just to make this clear, it’s also worth mentionning here that I wouldn’t take the time to comment if the project would not already have a potential. Or if it’s not good enough.

It also seems like my first impression wasn’t that much accurate. I’m sorry for that. From what I read here, you are clearly a step ahead and already startet building a success in your market. Congrats for that :champagne:.

I guess my point is that, today, going GtM in INTL markets (and/or NA) is something that’s getting more and more challenging. There was a time where you could just go ‘global’, but I’m afraid this time is over. In the coming years, it will become more and more difficult to deploy globally and apply a same message and strat across regions and markets. It’s not just about the policies. It’s also about culture, ideology and facing these ‘immediate needs and deeds’ that are ruling our societies today. Mostly against all reason and logic. It is so that today, the factors of influence that are taken into account by the decision-makers, are often completely offset from the actual needs. There was a time where you could just sell a product or a service. And if it is good enough, it would sell by itself (nearly). But these days are over (at least, in our western democracies). I’m not so much into politics, so I won’t judge. I can just account the facts and the results. And try to find a go-around for my clients :grinning:

I think there’s not a day in the past 2-years, where I think how lucky I am (we are) to be part of this Community. We build together with trust and empathy, based on what brings us together rather than getting apart, based on our differences. I think our governments and politicians, and global companies, would have a lot to learn from the ecosystem we have here, we maintain and nurture all together. But that’s philosophy rather than tech :joy: :face_with_hand_over_mouth:

Anyway, again I’m happy you are here (and could add that I keep being impressed by the quality of the projects and the contributions made by the chinese community of the forum). I wish your long time efforts on the project will pay off. And meanwhile, I shall wish you a great day :sunglasses:

2 Likes

That is why must read here

And you dont have to pay for us. We are not offering you to pay. It is just a solution if meets someone’s desire can use it. In case if there are paid features and that are suitable for someone’s need can also use it.

Regarding security that is why needs you to singup and use app key and product key so that your side uniquely can access it.